incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CB-1095] Added "Hello Cordova" sample app as default
Date Thu, 19 Jul 2012 02:42:59 GMT
Updated Branches:
  refs/heads/master 566ebc2e9 -> 48549bb03


[CB-1095] Added "Hello Cordova" sample app as default


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/48549bb0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/48549bb0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/48549bb0

Branch: refs/heads/master
Commit: 48549bb03aed942356387d282df29bcc5959d4bb
Parents: 566ebc2
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Jul 18 19:42:40 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Jul 18 19:42:40 2012 -0700

----------------------------------------------------------------------
 bin/templates/project/www/config.xml               |   47 +++++++
 bin/templates/project/www/css/index.css            |  100 +++++++++++++++
 bin/templates/project/www/img/cordova.png          |  Bin 0 -> 19932 bytes
 bin/templates/project/www/index.html               |   82 +++---------
 bin/templates/project/www/js/index.js              |   20 +++
 bin/templates/project/www/res/icon/cordova_128.png |  Bin 0 -> 11401 bytes
 bin/templates/project/www/res/icon/cordova_16.png  |  Bin 0 -> 1699 bytes
 bin/templates/project/www/res/icon/cordova_24.png  |  Bin 0 -> 2215 bytes
 bin/templates/project/www/res/icon/cordova_256.png |  Bin 0 -> 27408 bytes
 bin/templates/project/www/res/icon/cordova_32.png  |  Bin 0 -> 2843 bytes
 bin/templates/project/www/res/icon/cordova_48.png  |  Bin 0 -> 4111 bytes
 bin/templates/project/www/res/icon/cordova_512.png |  Bin 0 -> 39830 bytes
 bin/templates/project/www/res/icon/cordova_64.png  |  Bin 0 -> 5463 bytes
 .../project/www/res/icon/cordova_android_36.png    |  Bin 0 -> 3096 bytes
 .../project/www/res/icon/cordova_android_48.png    |  Bin 0 -> 4090 bytes
 .../project/www/res/icon/cordova_android_72.png    |  Bin 0 -> 6080 bytes
 .../project/www/res/icon/cordova_android_96.png    |  Bin 0 -> 7685 bytes
 .../project/www/res/icon/cordova_bb_80.png         |  Bin 0 -> 7287 bytes
 .../project/www/res/icon/cordova_ios_114.png       |  Bin 0 -> 7869 bytes
 .../project/www/res/icon/cordova_ios_144.png       |  Bin 0 -> 11706 bytes
 .../project/www/res/icon/cordova_ios_57.png        |  Bin 0 -> 3908 bytes
 .../project/www/res/icon/cordova_ios_72.png        |  Bin 0 -> 4944 bytes
 .../www/res/screen/android_hdpi_landscape.png      |  Bin 0 -> 218302 bytes
 .../www/res/screen/android_hdpi_portrait.png       |  Bin 0 -> 222148 bytes
 .../www/res/screen/android_ldpi_landscape.png      |  Bin 0 -> 42616 bytes
 .../www/res/screen/android_ldpi_portrait.png       |  Bin 0 -> 42034 bytes
 .../www/res/screen/android_mdpi_landscape.png      |  Bin 0 -> 92347 bytes
 .../www/res/screen/android_mdpi_portrait.png       |  Bin 0 -> 90555 bytes
 .../www/res/screen/android_xhdpi_landscape.png     |  Bin 0 -> 489604 bytes
 .../www/res/screen/android_xhdpi_portrait.png      |  Bin 0 -> 504508 bytes
 .../www/res/screen/blackberry_transparent_300.png  |  Bin 0 -> 15823 bytes
 .../www/res/screen/blackberry_transparent_400.png  |  Bin 0 -> 11001 bytes
 .../project/www/res/screen/ipad_landscape.png      |  Bin 0 -> 407370 bytes
 .../project/www/res/screen/ipad_portrait.png       |  Bin 0 -> 422441 bytes
 .../www/res/screen/ipad_retina_landscape.png       |  Bin 0 -> 1534088 bytes
 .../www/res/screen/ipad_retina_portrait.png        |  Bin 0 -> 1610434 bytes
 .../project/www/res/screen/iphone_landscape.png    |  Bin 0 -> 92301 bytes
 .../project/www/res/screen/iphone_portrait.png     |  Bin 0 -> 93897 bytes
 .../www/res/screen/iphone_retina_landscape.png     |  Bin 0 -> 339639 bytes
 .../www/res/screen/iphone_retina_portrait.png      |  Bin 0 -> 350593 bytes
 .../www/res/screen/windows_phone_portrait.jpg      |  Bin 0 -> 11483 bytes
 bin/templates/project/www/spec.html                |   50 +++++++
 bin/templates/project/www/spec/helper.js           |   11 ++
 bin/templates/project/www/spec/index.js            |   49 +++++++
 44 files changed, 298 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/config.xml b/bin/templates/project/www/config.xml
new file mode 100644
index 0000000..a7e35db
--- /dev/null
+++ b/bin/templates/project/www/config.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns     = "http://www.w3.org/ns/widgets"
+        xmlns:gap = "http://phonegap.com/ns/1.0"
+        id        = "io.cordova.hello-cordova"
+        version   = "2.0.0">
+    <name>Hello Cordova</name>
+
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
+
+    <author href="http://cordova.io" email="callback-dev@incubator.apache.org">
+        Apache Cordova Team
+    </author>
+
+    <icon src="res/icon/cordova_512.png"        width="512" height="512" />
+    <icon src="res/icon/cordova_android_96.png" width="96"  height="96"  gap:platform="android"
/>
+    <icon src="res/icon/cordova_bb_80.png"      width="80"  height="80"  gap:platform="blackberry"
/>
+    <icon src="res/icon/cordova_ios_144.png"    width="144" height="144" gap:platform="ios"
/>
+
+    <gap:splash src="res/screen/android_hdpi_landscape.png"      width="800"  height="480"
 gap:platform="android" />
+    <gap:splash src="res/screen/android_hdpi_portrait.png"       width="480"  height="800"
 gap:platform="android" />
+    <gap:splash src="res/screen/android_ldpi_landscape.png"      width="320"  height="200"
 gap:platform="android" />
+    <gap:splash src="res/screen/android_ldpi_portrait.png"       width="200"  height="320"
 gap:platform="android" />
+    <gap:splash src="res/screen/android_mdpi_landscape.png"      width="480"  height="320"
 gap:platform="android" />
+    <gap:splash src="res/screen/android_mdpi_portrait.png"       width="320"  height="480"
 gap:platform="android" />
+    <gap:splash src="res/screen/android_xhdpi_landscape.png"     width="1280" height="720"
 gap:platform="android" />
+    <gap:splash src="res/screen/android_xhdpi_portrait.png"      width="720"  height="1280"
gap:platform="android" />
+    <gap:splash src="res/screen/blackberry_transparent_300.png"  width="300"  height="300"
 gap:platform="blackberry" />
+    <gap:splash src="res/screen/blackberry_transparent_400.png"  width="200"  height="200"
 gap:platform="blackberry" />
+    <gap:splash src="res/screen/ipad_landscape.png"              width="1024" height="748"
 gap:platform="ios" />
+    <gap:splash src="res/screen/ipad_portrait.png"               width="768"  height="1004"
gap:platform="ios" />
+    <gap:splash src="res/screen/ipad_retina_landscape.png"       width="2048" height="1496"
gap:platform="ios" />
+    <gap:splash src="res/screen/ipad_retina_portrait.png"        width="1536" height="2008"
gap:platform="ios" />
+    <gap:splash src="res/screen/iphone_landscape.png"            width="480"  height="320"
 gap:platform="ios" />
+    <gap:splash src="res/screen/iphone_portrait.png"             width="320"  height="480"
 gap:platform="ios" />
+    <gap:splash src="res/screen/iphone_retina_landscape.png"     width="960"  height="640"
 gap:platform="ios" />
+    <gap:splash src="res/screen/iphone_retina_portrait.png"      width="640"  height="960"
 gap:platform="ios" />
+    <gap:splash src="res/screen/windows_phone_portrait.jpg"      width="480"  height="800"
 gap:platform="winphone" />
+
+    <feature name="http://api.phonegap.com/1.0/device" />
+
+    <preference name="phonegap-version" value="1.9.0" />
+    <preference name="orientation"      value="default" />
+    <preference name="target-device"    value="universal" />
+    <preference name="fullscreen"       value="false" />
+</widget>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/css/index.css
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/css/index.css b/bin/templates/project/www/css/index.css
new file mode 100644
index 0000000..c869f87
--- /dev/null
+++ b/bin/templates/project/www/css/index.css
@@ -0,0 +1,100 @@
+html,
+body {
+    height:100%;
+    font-size:12px;
+    width:100%;
+}
+
+html {
+    display:table;
+}
+
+body {
+    background-color:#A7A7A7;
+    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0, #A7A7A7),
+        color-stop(0.51, #E4E4E4)
+    );
+    display:table-cell;
+    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
+    text-transform:uppercase;
+    vertical-align:middle;
+}
+
+.app {
+    background-image:url(../img/cordova.png);
+    background-repeat:no-repeat;
+    margin:0px auto;
+    width:275px;
+}
+
+h1 {
+    font-size:2em;
+    font-weight:300;
+    margin:0px;
+    overflow:visible;
+    padding:0px;
+    text-align:center;
+}
+
+.status {
+    background-color:#333333;
+    border-radius:4px;
+    -webkit-border-radius:4px;
+    color:#FFFFFF;
+    font-size:1em;
+    margin:0px auto;
+    padding:2px 10px;
+    text-align:center;
+    width:100%;
+    max-width:175px;
+}
+
+.status.complete {
+    background-color:#4B946A;
+}
+
+.hide {
+    display:none;
+}
+
+@keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+@-webkit-keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+.blink {
+    animation:fade 3000ms infinite;
+    -webkit-animation:fade 3000ms infinite;
+}
+
+/* portrait */
+/* @media screen and (max-aspect-ratio: 1/1) */
+.app {
+    background-position:center top;
+    height:100px;              /* adds enough room for text */
+    padding:180px 0px 0px 0px; /* background height - shadow offset */
+}
+
+/* lanscape (when wide enough) */
+@media screen and (min-aspect-ratio: 1/1) and (min-width:445px) {
+    .app {
+        background-position:left center;
+        height:140px;       /* height + padding = background image size */
+        padding-left:170px; /* background width */
+        padding-top:60px;   /* center the text */
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/img/cordova.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/img/cordova.png b/bin/templates/project/www/img/cordova.png
new file mode 100644
index 0000000..e8169cf
Binary files /dev/null and b/bin/templates/project/www/img/cordova.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/index.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/index.html b/bin/templates/project/www/index.html
index cce35ac..a9041f3 100644
--- a/bin/templates/project/www/index.html
+++ b/bin/templates/project/www/index.html
@@ -20,65 +20,25 @@
 # under the License.
 #
 -->
-  <head>
-  <title></title>
-  
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no;" />
-	<meta charset="utf-8">
-
-
-	<!-- iPad/iPhone specific css below, add after your main css >
-	<link rel="stylesheet" media="only screen and (max-device-width: 1024px)" href="ipad.css"
type="text/css" />		
-	<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="iphone.css"
type="text/css" />		
-	-->
-	<!-- If your application is targeting iOS BEFORE 4.0 you MUST put json2.js from http://www.JSON.org/json2.js
into your www directory and include it here -->
-	<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
-    <script type="text/javascript">
-
-
-	// If you want to prevent dragging, uncomment this section
-	/*
-	function preventBehavior(e) 
-	{ 
-      e.preventDefault(); 
-    };
-	document.addEventListener("touchmove", preventBehavior, false);
-	*/
-	
-	/* If you are supporting your own protocol, the var invokeString will contain any arguments
to the app launch.
-	see http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
-	for more details -jm */
-	/*
-	function handleOpenURL(url)
-	{
-		// TODO: do something with the url passed in.
-	}
-	*/
-	
-	function onBodyLoad()
-	{		
-		document.addEventListener("deviceready", onDeviceReady, false);
-	}
-	
-	/* When this function is called, Cordova has been initialized and is ready to roll */
-	/* If you are supporting your own protocol, the var invokeString will contain any arguments
to the app launch.
-	see http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
-	for more details -jm */
-	function onDeviceReady()
-	{
-		// do your thing!
-		navigator.notification.alert("Cordova is working")
-	}
-    
-    </script>
-  </head>
-  <body onload="onBodyLoad()">
-	<h1>Hey, it's Cordova!</h1>
-	<p>Don't know how to get started? Check out our <em><a target="_blank" href="http://docs.phonegap.com/en/edge/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS">Getting
Started Guide</a></em>
-	<br />
-	<ol>
-		<li>Check your console log for any white-list rejection errors.</li>
-		<li>Add your allowed <strong>hosts</strong> in Cordova.plist/ExternalHosts
(wildcards OK, don't enter the URL scheme)</li>
-	</ol>
-  </body>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+        <meta name = "format-detection" content = "telephone=no"/>
+        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1,
minimum-scale=1, width=device-width;" />
+        <link rel="stylesheet" type="text/css" href="css/index.css" />
+        <title>Hello Cordova</title>
+    </head>
+    <body>
+        <div class="app">
+            <h1>Apache Cordova™</h1>
+            <div id="deviceready">
+                <p class="status pending blink">Connecting to Device</p>
+                <p class="status complete blink hide">Device is Ready</p>
+            </div>
+        </div>
+        <script type="text/javascript" src="cordova-2.0.0.js"></script>
+        <script type="text/javascript" src="js/index.js"></script>
+        <script type="text/javascript">
+            app.initialize();
+        </script>
+    </body>
 </html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/js/index.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/js/index.js b/bin/templates/project/www/js/index.js
new file mode 100644
index 0000000..6140331
--- /dev/null
+++ b/bin/templates/project/www/js/index.js
@@ -0,0 +1,20 @@
+var app = {
+    initialize: function() {
+        this.bind();
+    },
+    bind: function() {
+        document.addEventListener('deviceready', this.deviceready, false);
+    },
+    deviceready: function() {
+        // note that this is an event handler so the scope is that of the event
+        // so we need to call app.report(), and not this.report()
+        app.report('deviceready');
+    },
+    report: function(id) { 
+        console.log("report:" + id);
+        // hide the .pending <p> and show the .complete <p>
+        document.querySelector('#' + id + ' .pending').className += ' hide';
+        var completeElem = document.querySelector('#' + id + ' .complete');
+        completeElem.className = completeElem.className.split('hide').join('');
+    }
+};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_128.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_128.png b/bin/templates/project/www/res/icon/cordova_128.png
new file mode 100644
index 0000000..3516df3
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_128.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_16.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_16.png b/bin/templates/project/www/res/icon/cordova_16.png
new file mode 100644
index 0000000..54e19c5
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_16.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_24.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_24.png b/bin/templates/project/www/res/icon/cordova_24.png
new file mode 100644
index 0000000..c7d43ad
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_24.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_256.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_256.png b/bin/templates/project/www/res/icon/cordova_256.png
new file mode 100644
index 0000000..e1cd0e6
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_256.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_32.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_32.png b/bin/templates/project/www/res/icon/cordova_32.png
new file mode 100644
index 0000000..734fffc
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_32.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_48.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_48.png b/bin/templates/project/www/res/icon/cordova_48.png
new file mode 100644
index 0000000..8ad8bac
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_48.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_512.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_512.png b/bin/templates/project/www/res/icon/cordova_512.png
new file mode 100644
index 0000000..c9465f3
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_512.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_64.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_64.png b/bin/templates/project/www/res/icon/cordova_64.png
new file mode 100644
index 0000000..03b3849
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_64.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_android_36.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_android_36.png b/bin/templates/project/www/res/icon/cordova_android_36.png
new file mode 100644
index 0000000..cd5032a
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_android_36.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_android_48.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_android_48.png b/bin/templates/project/www/res/icon/cordova_android_48.png
new file mode 100644
index 0000000..e79c606
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_android_48.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_android_72.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_android_72.png b/bin/templates/project/www/res/icon/cordova_android_72.png
new file mode 100644
index 0000000..4d27634
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_android_72.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_android_96.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_android_96.png b/bin/templates/project/www/res/icon/cordova_android_96.png
new file mode 100644
index 0000000..ec7ffbf
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_android_96.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_bb_80.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_bb_80.png b/bin/templates/project/www/res/icon/cordova_bb_80.png
new file mode 100644
index 0000000..f86a27a
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_bb_80.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_ios_114.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_ios_114.png b/bin/templates/project/www/res/icon/cordova_ios_114.png
new file mode 100644
index 0000000..efd9c37
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_ios_114.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_ios_144.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_ios_144.png b/bin/templates/project/www/res/icon/cordova_ios_144.png
new file mode 100644
index 0000000..dd819da
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_ios_144.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_ios_57.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_ios_57.png b/bin/templates/project/www/res/icon/cordova_ios_57.png
new file mode 100644
index 0000000..c795fc4
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_ios_57.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/icon/cordova_ios_72.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_ios_72.png b/bin/templates/project/www/res/icon/cordova_ios_72.png
new file mode 100644
index 0000000..b1cfde7
Binary files /dev/null and b/bin/templates/project/www/res/icon/cordova_ios_72.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_hdpi_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_hdpi_landscape.png b/bin/templates/project/www/res/screen/android_hdpi_landscape.png
new file mode 100644
index 0000000..a61e2b1
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_hdpi_landscape.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_hdpi_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_hdpi_portrait.png b/bin/templates/project/www/res/screen/android_hdpi_portrait.png
new file mode 100644
index 0000000..5d6a28a
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_hdpi_portrait.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_ldpi_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_ldpi_landscape.png b/bin/templates/project/www/res/screen/android_ldpi_landscape.png
new file mode 100644
index 0000000..f3934cd
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_ldpi_landscape.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_ldpi_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_ldpi_portrait.png b/bin/templates/project/www/res/screen/android_ldpi_portrait.png
new file mode 100644
index 0000000..65ad163
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_ldpi_portrait.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_mdpi_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_mdpi_landscape.png b/bin/templates/project/www/res/screen/android_mdpi_landscape.png
new file mode 100644
index 0000000..a1b697c
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_mdpi_landscape.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_mdpi_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_mdpi_portrait.png b/bin/templates/project/www/res/screen/android_mdpi_portrait.png
new file mode 100644
index 0000000..ea15693
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_mdpi_portrait.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_xhdpi_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_xhdpi_landscape.png b/bin/templates/project/www/res/screen/android_xhdpi_landscape.png
new file mode 100644
index 0000000..79f2f09
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_xhdpi_landscape.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/android_xhdpi_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/android_xhdpi_portrait.png b/bin/templates/project/www/res/screen/android_xhdpi_portrait.png
new file mode 100644
index 0000000..c2e8042
Binary files /dev/null and b/bin/templates/project/www/res/screen/android_xhdpi_portrait.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/blackberry_transparent_300.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/blackberry_transparent_300.png b/bin/templates/project/www/res/screen/blackberry_transparent_300.png
new file mode 100644
index 0000000..b548bdc
Binary files /dev/null and b/bin/templates/project/www/res/screen/blackberry_transparent_300.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/blackberry_transparent_400.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/blackberry_transparent_400.png b/bin/templates/project/www/res/screen/blackberry_transparent_400.png
new file mode 100644
index 0000000..3facdf9
Binary files /dev/null and b/bin/templates/project/www/res/screen/blackberry_transparent_400.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/ipad_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/ipad_landscape.png b/bin/templates/project/www/res/screen/ipad_landscape.png
new file mode 100644
index 0000000..04be5ac
Binary files /dev/null and b/bin/templates/project/www/res/screen/ipad_landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/ipad_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/ipad_portrait.png b/bin/templates/project/www/res/screen/ipad_portrait.png
new file mode 100644
index 0000000..41e839d
Binary files /dev/null and b/bin/templates/project/www/res/screen/ipad_portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/ipad_retina_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/ipad_retina_landscape.png b/bin/templates/project/www/res/screen/ipad_retina_landscape.png
new file mode 100644
index 0000000..95c542d
Binary files /dev/null and b/bin/templates/project/www/res/screen/ipad_retina_landscape.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/ipad_retina_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/ipad_retina_portrait.png b/bin/templates/project/www/res/screen/ipad_retina_portrait.png
new file mode 100644
index 0000000..aae1862
Binary files /dev/null and b/bin/templates/project/www/res/screen/ipad_retina_portrait.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/iphone_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/iphone_landscape.png b/bin/templates/project/www/res/screen/iphone_landscape.png
new file mode 100644
index 0000000..d154883
Binary files /dev/null and b/bin/templates/project/www/res/screen/iphone_landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/iphone_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/iphone_portrait.png b/bin/templates/project/www/res/screen/iphone_portrait.png
new file mode 100644
index 0000000..6fcba56
Binary files /dev/null and b/bin/templates/project/www/res/screen/iphone_portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/iphone_retina_landscape.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/iphone_retina_landscape.png b/bin/templates/project/www/res/screen/iphone_retina_landscape.png
new file mode 100644
index 0000000..0165669
Binary files /dev/null and b/bin/templates/project/www/res/screen/iphone_retina_landscape.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/iphone_retina_portrait.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/iphone_retina_portrait.png b/bin/templates/project/www/res/screen/iphone_retina_portrait.png
new file mode 100644
index 0000000..bd24886
Binary files /dev/null and b/bin/templates/project/www/res/screen/iphone_retina_portrait.png
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/res/screen/windows_phone_portrait.jpg
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/windows_phone_portrait.jpg b/bin/templates/project/www/res/screen/windows_phone_portrait.jpg
new file mode 100644
index 0000000..9f95387
Binary files /dev/null and b/bin/templates/project/www/res/screen/windows_phone_portrait.jpg
differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/spec.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/spec.html b/bin/templates/project/www/spec.html
new file mode 100644
index 0000000..83d7d2e
--- /dev/null
+++ b/bin/templates/project/www/spec.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Jasmine Spec Runner</title>
+
+        <!-- jasmine source -->
+        <link rel="shortcut icon" type="image/png" href="spec/lib/jasmine-1.2.0/jasmine_favicon.png">
+        <link rel="stylesheet" type="text/css" href="spec/lib/jasmine-1.2.0/jasmine.css">
+        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine.js"></script>
+        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine-html.js"></script>
+
+        <!-- include source files here... -->
+        <script type="text/javascript" src="js/index.js"></script>
+
+        <!-- include spec files here... -->
+        <script type="text/javascript" src="spec/helper.js"></script>
+        <script type="text/javascript" src="spec/index.js"></script>
+
+        <script type="text/javascript">
+            (function() {
+                var jasmineEnv = jasmine.getEnv();
+                jasmineEnv.updateInterval = 1000;
+
+                var htmlReporter = new jasmine.HtmlReporter();
+
+                jasmineEnv.addReporter(htmlReporter);
+
+                jasmineEnv.specFilter = function(spec) {
+                    return htmlReporter.specFilter(spec);
+                };
+
+                var currentWindowOnload = window.onload;
+
+                window.onload = function() {
+                    if (currentWindowOnload) {
+                        currentWindowOnload();
+                    }
+                    execJasmine();
+                };
+
+                function execJasmine() {
+                    jasmineEnv.execute();
+                }
+            })();
+        </script>
+    </head>
+    <body>
+        <div id="stage" style="display:none;"></div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/spec/helper.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/spec/helper.js b/bin/templates/project/www/spec/helper.js
new file mode 100644
index 0000000..9f99445
--- /dev/null
+++ b/bin/templates/project/www/spec/helper.js
@@ -0,0 +1,11 @@
+afterEach(function() {
+    document.getElementById('stage').innerHTML = '';
+});
+
+var helper = {
+    trigger: function(obj, name) {
+        var e = document.createEvent('Event');
+        e.initEvent(name, true, true);
+        obj.dispatchEvent(e);
+    }
+};

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/48549bb0/bin/templates/project/www/spec/index.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/spec/index.js b/bin/templates/project/www/spec/index.js
new file mode 100644
index 0000000..121cf63
--- /dev/null
+++ b/bin/templates/project/www/spec/index.js
@@ -0,0 +1,49 @@
+describe('app', function() {
+    describe('initialize', function() {
+        it('should bind deviceready', function() {
+            runs(function() {
+                spyOn(app, 'deviceready');
+                app.initialize();
+                helper.trigger(window.document, 'deviceready');
+            });
+
+            waitsFor(function() {
+                return (app.deviceready.calls.length > 0);
+            }, 'deviceready should be called once', 500);
+
+            runs(function() {
+                expect(app.deviceready).toHaveBeenCalled();
+            });
+        });
+    });
+
+    describe('deviceready', function() {
+        it('should report that it fired', function() {
+            spyOn(app, 'report');
+            app.deviceready();
+            expect(app.report).toHaveBeenCalledWith('deviceready');
+        });
+    });
+
+    describe('report', function() {
+        beforeEach(function() {
+            var el = document.getElementById('stage');
+            el.innerHTML = ['<div id="deviceready">',
+                            '    <p class="status pending">Pending</p>',
+                            '    <p class="status complete hide">Complete</p>',
+                            '</div>'].join('\n');
+        });
+
+        it('should show the completion state', function() {
+            app.report('deviceready');
+            var el = document.querySelector('#deviceready .complete:not(.hide)');
+            expect(el).toBeTruthy();
+        });
+
+        it('should hide the pending state', function() {
+            app.report('deviceready');
+            var el = document.querySelector('#deviceready .pending.hide');
+            expect(el).toBeTruthy();
+        });
+    });
+});


Mime
View raw message