incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject bada-wac commit: updating to latest hello world app
Date Wed, 05 Sep 2012 00:03:24 GMT
Updated Branches:
  refs/heads/master 19d5be80c -> baf1e6326


updating to latest hello world app


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/commit/baf1e632
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/tree/baf1e632
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/diff/baf1e632

Branch: refs/heads/master
Commit: baf1e632631f35ba9123242a2feea8eeef075388
Parents: 19d5be8
Author: Anis Kadri <anis.kadri@gmail.com>
Authored: Tue Sep 4 17:03:18 2012 -0700
Committer: Anis Kadri <anis.kadri@gmail.com>
Committed: Tue Sep 4 17:03:18 2012 -0700

----------------------------------------------------------------------
 Res/css/index.css                                 |  109 +++++++++-------
 Res/img/logo.png                                  |  Bin 0 -> 21814 bytes
 Res/index.html                                    |   34 ++++-
 Res/js/index.js                                   |   50 ++++++-
 Res/res/icon/android/icon-36-ldpi.png             |  Bin 0 -> 3096 bytes
 Res/res/icon/android/icon-48-mdpi.png             |  Bin 0 -> 4090 bytes
 Res/res/icon/android/icon-72-hdpi.png             |  Bin 0 -> 6080 bytes
 Res/res/icon/android/icon-96-xhdpi.png            |  Bin 0 -> 7685 bytes
 Res/res/icon/bada-wac/icon-48-type5.png           |  Bin 0 -> 4111 bytes
 Res/res/icon/bada-wac/icon-50-type3.png           |  Bin 0 -> 5758 bytes
 Res/res/icon/bada-wac/icon-80-type4.png           |  Bin 0 -> 7287 bytes
 Res/res/icon/bada/icon-128.png                    |  Bin 0 -> 11401 bytes
 Res/res/icon/blackberry/icon-80.png               |  Bin 0 -> 7287 bytes
 Res/res/icon/ios/icon-57-2x.png                   |  Bin 0 -> 7869 bytes
 Res/res/icon/ios/icon-57.png                      |  Bin 0 -> 3908 bytes
 Res/res/icon/ios/icon-72-2x.png                   |  Bin 0 -> 11706 bytes
 Res/res/icon/ios/icon-72.png                      |  Bin 0 -> 4944 bytes
 Res/res/icon/webos/icon-64.png                    |  Bin 0 -> 5463 bytes
 Res/res/icon/windows-phone/icon-173-tile.png      |  Bin 0 -> 22878 bytes
 Res/res/icon/windows-phone/icon-48.png            |  Bin 0 -> 4111 bytes
 Res/res/icon/windows-phone/icon-62-tile.png       |  Bin 0 -> 7324 bytes
 Res/res/screen/android/screen-hdpi-landscape.png  |  Bin 0 -> 218302 bytes
 Res/res/screen/android/screen-hdpi-portrait.png   |  Bin 0 -> 222148 bytes
 Res/res/screen/android/screen-ldpi-landscape.png  |  Bin 0 -> 42616 bytes
 Res/res/screen/android/screen-ldpi-portrait.png   |  Bin 0 -> 42034 bytes
 Res/res/screen/android/screen-mdpi-landscape.png  |  Bin 0 -> 92347 bytes
 Res/res/screen/android/screen-mdpi-portrait.png   |  Bin 0 -> 90555 bytes
 Res/res/screen/android/screen-xhdpi-landscape.png |  Bin 0 -> 489604 bytes
 Res/res/screen/android/screen-xhdpi-portrait.png  |  Bin 0 -> 504508 bytes
 Res/res/screen/bada-wac/screen-type3.png          |  Bin 0 -> 90555 bytes
 Res/res/screen/bada-wac/screen-type4.png          |  Bin 0 -> 222148 bytes
 Res/res/screen/bada-wac/screen-type5.png          |  Bin 0 -> 107580 bytes
 Res/res/screen/bada/screen-portrait.png           |  Bin 0 -> 222148 bytes
 Res/res/screen/blackberry/screen-225.png          |  Bin 0 -> 16776 bytes
 Res/res/screen/ios/screen-ipad-landscape-2x.png   |  Bin 0 -> 1534088 bytes
 Res/res/screen/ios/screen-ipad-landscape.png      |  Bin 0 -> 407370 bytes
 Res/res/screen/ios/screen-ipad-portrait-2x.png    |  Bin 0 -> 1610434 bytes
 Res/res/screen/ios/screen-ipad-portrait.png       |  Bin 0 -> 422441 bytes
 Res/res/screen/ios/screen-iphone-landscape-2x.png |  Bin 0 -> 339639 bytes
 Res/res/screen/ios/screen-iphone-landscape.png    |  Bin 0 -> 92301 bytes
 Res/res/screen/ios/screen-iphone-portrait-2x.png  |  Bin 0 -> 350593 bytes
 Res/res/screen/ios/screen-iphone-portrait.png     |  Bin 0 -> 93897 bytes
 Res/res/screen/webos/screen-64.png                |  Bin 0 -> 5463 bytes
 Res/res/screen/windows-phone/screen-portrait.jpg  |  Bin 0 -> 22066 bytes
 Res/spec.html                                     |   18 +++
 Res/spec/helper.js                                |   22 +++
 Res/spec/index.js                                 |   56 ++++++---
 47 files changed, 207 insertions(+), 82 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/css/index.css
----------------------------------------------------------------------
diff --git a/Res/css/index.css b/Res/css/index.css
index c869f87..f1f9d76 100644
--- a/Res/css/index.css
+++ b/Res/css/index.css
@@ -1,16 +1,30 @@
-html,
-body {
-    height:100%;
-    font-size:12px;
-    width:100%;
-}
-
-html {
-    display:table;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+* {
+    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when
tap to hold */
+    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit
*/
+    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust
last value opacity 0 to 1.0 */
+    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none'
to 'text' */
 }
 
 body {
-    background-color:#A7A7A7;
+    background-color:#E4E4E4;
     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%);
@@ -21,46 +35,65 @@ body {
         color-stop(0, #A7A7A7),
         color-stop(0.51, #E4E4E4)
     );
-    display:table-cell;
+    background-attachment:fixed;
     font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
+    font-size:12px;
+    height:100%;
+    margin:0px;
+    padding:0px;
     text-transform:uppercase;
-    vertical-align:middle;
+    width:100%;
 }
 
+/* Portrait layout (default) */
 .app {
-    background-image:url(../img/cordova.png);
-    background-repeat:no-repeat;
-    margin:0px auto;
-    width:275px;
+    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
+    position:absolute;             /* position in the center of the screen */
+    left:50%;
+    top:50%;
+    height:50px;                   /* text area height */
+    width:225px;                   /* text area width */
+    text-align:center;
+    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with
text) */
+    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area
height */
+                                   /* offset horizontal: half of text area width */
+}
+
+/* Landscape layout (with min-width) */
+@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
+    .app {
+        background-position:left center;
+        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image
height */
+        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
+                                      /* offset horizontal: half of image width and text
area width */
+    }
 }
 
 h1 {
-    font-size:2em;
-    font-weight:300;
+    font-size:24px;
+    font-weight:normal;
     margin:0px;
     overflow:visible;
     padding:0px;
     text-align:center;
 }
 
-.status {
-    background-color:#333333;
+.event {
     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;
+    font-size:12px;
+    margin:0px 30px;
+    padding:2px 0px;
 }
 
-.status.complete {
-    background-color:#4B946A;
+.event.listening {
+    background-color:#333333;
+    display:block;
 }
 
-.hide {
+.event.received {
+    background-color:#4B946A;
     display:none;
 }
 
@@ -80,21 +113,3 @@ h1 {
     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-bada-wac/blob/baf1e632/Res/img/logo.png
----------------------------------------------------------------------
diff --git a/Res/img/logo.png b/Res/img/logo.png
new file mode 100644
index 0000000..9519e7d
Binary files /dev/null and b/Res/img/logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/index.html
----------------------------------------------------------------------
diff --git a/Res/index.html b/Res/index.html
index c6c9d7f..e7a4c9e 100644
--- a/Res/index.html
+++ b/Res/index.html
@@ -1,21 +1,39 @@
 <!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+     KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
 <html>
     <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;" />
+        <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, height=device-height, target-densitydpi=device-dpi" />
         <link rel="stylesheet" type="text/css" href="css/index.css" />
-        <title>Hello Cordova</title>
+        <title>Hello World</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>
+            <h1>Apache Cordova</h1>
+            <div id="deviceready" class="blink">
+                <p class="event listening">Connecting to Device</p>
+                <p class="event received">Device is Ready</p>
             </div>
         </div>
-        <script type="text/javascript" src="js/cordova.js"></script>
+        <script type="text/javascript" src="cordova.js"></script>
         <script type="text/javascript" src="js/index.js"></script>
         <script type="text/javascript">
             app.initialize();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/js/index.js
----------------------------------------------------------------------
diff --git a/Res/js/index.js b/Res/js/index.js
index f3894b8..31d9064 100644
--- a/Res/js/index.js
+++ b/Res/js/index.js
@@ -1,15 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 var app = {
+    // Application Constructor
     initialize: function() {
-        this.bind();
+        this.bindEvents();
     },
-    bind: function() {
-        document.addEventListener('deviceready', this.deviceready, false);
+    // Bind Event Listeners
+    //
+    // Bind any events that are required on startup. Common events are:
+    // 'load', 'deviceready', 'offline', and 'online'.
+    bindEvents: function() {
+        document.addEventListener('deviceready', this.onDeviceReady, false);
     },
-    deviceready: function() {
-        app.report('deviceready');
+    // deviceready Event Handler
+    //
+    // The scope of 'this' is the event. In order to call the 'receivedEvent'
+    // function, we must explicity call 'app.receivedEvent(...);'
+    onDeviceReady: function() {
+        app.receivedEvent('deviceready');
     },
-    report: function(id) {
-        document.querySelector('#' + id + ' .pending').classList.add('hide');
-        document.querySelector('#' + id + ' .complete').classList.remove('hide');
+    // Update DOM on a Received Event
+    receivedEvent: function(id) {
+        var parentElement = document.getElementById(id);
+        var listeningElement = parentElement.querySelector('.listening');
+        var receivedElement = parentElement.querySelector('.received');
+
+        listeningElement.setAttribute('style', 'display:none;');
+        receivedElement.setAttribute('style', 'display:block;');
+
+        console.log('Received Event: ' + id);
     }
 };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/android/icon-36-ldpi.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/android/icon-36-ldpi.png b/Res/res/icon/android/icon-36-ldpi.png
new file mode 100644
index 0000000..cd5032a
Binary files /dev/null and b/Res/res/icon/android/icon-36-ldpi.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/android/icon-48-mdpi.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/android/icon-48-mdpi.png b/Res/res/icon/android/icon-48-mdpi.png
new file mode 100644
index 0000000..e79c606
Binary files /dev/null and b/Res/res/icon/android/icon-48-mdpi.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/android/icon-72-hdpi.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/android/icon-72-hdpi.png b/Res/res/icon/android/icon-72-hdpi.png
new file mode 100644
index 0000000..4d27634
Binary files /dev/null and b/Res/res/icon/android/icon-72-hdpi.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/android/icon-96-xhdpi.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/android/icon-96-xhdpi.png b/Res/res/icon/android/icon-96-xhdpi.png
new file mode 100644
index 0000000..ec7ffbf
Binary files /dev/null and b/Res/res/icon/android/icon-96-xhdpi.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/bada-wac/icon-48-type5.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/bada-wac/icon-48-type5.png b/Res/res/icon/bada-wac/icon-48-type5.png
new file mode 100644
index 0000000..8ad8bac
Binary files /dev/null and b/Res/res/icon/bada-wac/icon-48-type5.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/bada-wac/icon-50-type3.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/bada-wac/icon-50-type3.png b/Res/res/icon/bada-wac/icon-50-type3.png
new file mode 100644
index 0000000..c6ddf84
Binary files /dev/null and b/Res/res/icon/bada-wac/icon-50-type3.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/bada-wac/icon-80-type4.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/bada-wac/icon-80-type4.png b/Res/res/icon/bada-wac/icon-80-type4.png
new file mode 100644
index 0000000..f86a27a
Binary files /dev/null and b/Res/res/icon/bada-wac/icon-80-type4.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/bada/icon-128.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/bada/icon-128.png b/Res/res/icon/bada/icon-128.png
new file mode 100644
index 0000000..3516df3
Binary files /dev/null and b/Res/res/icon/bada/icon-128.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/blackberry/icon-80.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/blackberry/icon-80.png b/Res/res/icon/blackberry/icon-80.png
new file mode 100644
index 0000000..f86a27a
Binary files /dev/null and b/Res/res/icon/blackberry/icon-80.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/ios/icon-57-2x.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/ios/icon-57-2x.png b/Res/res/icon/ios/icon-57-2x.png
new file mode 100644
index 0000000..efd9c37
Binary files /dev/null and b/Res/res/icon/ios/icon-57-2x.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/ios/icon-57.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/ios/icon-57.png b/Res/res/icon/ios/icon-57.png
new file mode 100644
index 0000000..c795fc4
Binary files /dev/null and b/Res/res/icon/ios/icon-57.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/ios/icon-72-2x.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/ios/icon-72-2x.png b/Res/res/icon/ios/icon-72-2x.png
new file mode 100644
index 0000000..dd819da
Binary files /dev/null and b/Res/res/icon/ios/icon-72-2x.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/ios/icon-72.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/ios/icon-72.png b/Res/res/icon/ios/icon-72.png
new file mode 100644
index 0000000..b1cfde7
Binary files /dev/null and b/Res/res/icon/ios/icon-72.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/webos/icon-64.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/webos/icon-64.png b/Res/res/icon/webos/icon-64.png
new file mode 100644
index 0000000..03b3849
Binary files /dev/null and b/Res/res/icon/webos/icon-64.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/windows-phone/icon-173-tile.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/windows-phone/icon-173-tile.png b/Res/res/icon/windows-phone/icon-173-tile.png
new file mode 100644
index 0000000..4f15e20
Binary files /dev/null and b/Res/res/icon/windows-phone/icon-173-tile.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/windows-phone/icon-48.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/windows-phone/icon-48.png b/Res/res/icon/windows-phone/icon-48.png
new file mode 100644
index 0000000..8ad8bac
Binary files /dev/null and b/Res/res/icon/windows-phone/icon-48.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/icon/windows-phone/icon-62-tile.png
----------------------------------------------------------------------
diff --git a/Res/res/icon/windows-phone/icon-62-tile.png b/Res/res/icon/windows-phone/icon-62-tile.png
new file mode 100644
index 0000000..aab6061
Binary files /dev/null and b/Res/res/icon/windows-phone/icon-62-tile.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-hdpi-landscape.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-hdpi-landscape.png b/Res/res/screen/android/screen-hdpi-landscape.png
new file mode 100644
index 0000000..a61e2b1
Binary files /dev/null and b/Res/res/screen/android/screen-hdpi-landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-hdpi-portrait.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-hdpi-portrait.png b/Res/res/screen/android/screen-hdpi-portrait.png
new file mode 100644
index 0000000..5d6a28a
Binary files /dev/null and b/Res/res/screen/android/screen-hdpi-portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-ldpi-landscape.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-ldpi-landscape.png b/Res/res/screen/android/screen-ldpi-landscape.png
new file mode 100644
index 0000000..f3934cd
Binary files /dev/null and b/Res/res/screen/android/screen-ldpi-landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-ldpi-portrait.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-ldpi-portrait.png b/Res/res/screen/android/screen-ldpi-portrait.png
new file mode 100644
index 0000000..65ad163
Binary files /dev/null and b/Res/res/screen/android/screen-ldpi-portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-mdpi-landscape.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-mdpi-landscape.png b/Res/res/screen/android/screen-mdpi-landscape.png
new file mode 100644
index 0000000..a1b697c
Binary files /dev/null and b/Res/res/screen/android/screen-mdpi-landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-mdpi-portrait.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-mdpi-portrait.png b/Res/res/screen/android/screen-mdpi-portrait.png
new file mode 100644
index 0000000..ea15693
Binary files /dev/null and b/Res/res/screen/android/screen-mdpi-portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-xhdpi-landscape.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-xhdpi-landscape.png b/Res/res/screen/android/screen-xhdpi-landscape.png
new file mode 100644
index 0000000..79f2f09
Binary files /dev/null and b/Res/res/screen/android/screen-xhdpi-landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/android/screen-xhdpi-portrait.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/android/screen-xhdpi-portrait.png b/Res/res/screen/android/screen-xhdpi-portrait.png
new file mode 100644
index 0000000..c2e8042
Binary files /dev/null and b/Res/res/screen/android/screen-xhdpi-portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/bada-wac/screen-type3.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/bada-wac/screen-type3.png b/Res/res/screen/bada-wac/screen-type3.png
new file mode 100644
index 0000000..ea15693
Binary files /dev/null and b/Res/res/screen/bada-wac/screen-type3.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/bada-wac/screen-type4.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/bada-wac/screen-type4.png b/Res/res/screen/bada-wac/screen-type4.png
new file mode 100644
index 0000000..5d6a28a
Binary files /dev/null and b/Res/res/screen/bada-wac/screen-type4.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/bada-wac/screen-type5.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/bada-wac/screen-type5.png b/Res/res/screen/bada-wac/screen-type5.png
new file mode 100644
index 0000000..bd64f76
Binary files /dev/null and b/Res/res/screen/bada-wac/screen-type5.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/bada/screen-portrait.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/bada/screen-portrait.png b/Res/res/screen/bada/screen-portrait.png
new file mode 100644
index 0000000..5d6a28a
Binary files /dev/null and b/Res/res/screen/bada/screen-portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/blackberry/screen-225.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/blackberry/screen-225.png b/Res/res/screen/blackberry/screen-225.png
new file mode 100644
index 0000000..29873e9
Binary files /dev/null and b/Res/res/screen/blackberry/screen-225.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-ipad-landscape-2x.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-ipad-landscape-2x.png b/Res/res/screen/ios/screen-ipad-landscape-2x.png
new file mode 100644
index 0000000..95c542d
Binary files /dev/null and b/Res/res/screen/ios/screen-ipad-landscape-2x.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-ipad-landscape.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-ipad-landscape.png b/Res/res/screen/ios/screen-ipad-landscape.png
new file mode 100644
index 0000000..04be5ac
Binary files /dev/null and b/Res/res/screen/ios/screen-ipad-landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-ipad-portrait-2x.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-ipad-portrait-2x.png b/Res/res/screen/ios/screen-ipad-portrait-2x.png
new file mode 100644
index 0000000..aae1862
Binary files /dev/null and b/Res/res/screen/ios/screen-ipad-portrait-2x.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-ipad-portrait.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-ipad-portrait.png b/Res/res/screen/ios/screen-ipad-portrait.png
new file mode 100644
index 0000000..41e839d
Binary files /dev/null and b/Res/res/screen/ios/screen-ipad-portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-iphone-landscape-2x.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-iphone-landscape-2x.png b/Res/res/screen/ios/screen-iphone-landscape-2x.png
new file mode 100644
index 0000000..0165669
Binary files /dev/null and b/Res/res/screen/ios/screen-iphone-landscape-2x.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-iphone-landscape.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-iphone-landscape.png b/Res/res/screen/ios/screen-iphone-landscape.png
new file mode 100644
index 0000000..d154883
Binary files /dev/null and b/Res/res/screen/ios/screen-iphone-landscape.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-iphone-portrait-2x.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-iphone-portrait-2x.png b/Res/res/screen/ios/screen-iphone-portrait-2x.png
new file mode 100644
index 0000000..bd24886
Binary files /dev/null and b/Res/res/screen/ios/screen-iphone-portrait-2x.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/ios/screen-iphone-portrait.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/ios/screen-iphone-portrait.png b/Res/res/screen/ios/screen-iphone-portrait.png
new file mode 100644
index 0000000..6fcba56
Binary files /dev/null and b/Res/res/screen/ios/screen-iphone-portrait.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/webos/screen-64.png
----------------------------------------------------------------------
diff --git a/Res/res/screen/webos/screen-64.png b/Res/res/screen/webos/screen-64.png
new file mode 100644
index 0000000..03b3849
Binary files /dev/null and b/Res/res/screen/webos/screen-64.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/res/screen/windows-phone/screen-portrait.jpg
----------------------------------------------------------------------
diff --git a/Res/res/screen/windows-phone/screen-portrait.jpg b/Res/res/screen/windows-phone/screen-portrait.jpg
new file mode 100644
index 0000000..479d3e4
Binary files /dev/null and b/Res/res/screen/windows-phone/screen-portrait.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/spec.html
----------------------------------------------------------------------
diff --git a/Res/spec.html b/Res/spec.html
index 83d7d2e..71f00de 100644
--- a/Res/spec.html
+++ b/Res/spec.html
@@ -1,4 +1,22 @@
 <!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+     KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
 <html>
     <head>
         <title>Jasmine Spec Runner</title>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/spec/helper.js
----------------------------------------------------------------------
diff --git a/Res/spec/helper.js b/Res/spec/helper.js
index 9f99445..929f776 100644
--- a/Res/spec/helper.js
+++ b/Res/spec/helper.js
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 afterEach(function() {
     document.getElementById('stage').innerHTML = '';
 });
@@ -7,5 +25,9 @@ var helper = {
         var e = document.createEvent('Event');
         e.initEvent(name, true, true);
         obj.dispatchEvent(e);
+    },
+    getComputedStyle: function(querySelector, property) {
+        var element = document.querySelector(querySelector);
+        return window.getComputedStyle(element).getPropertyValue(property);
     }
 };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada-wac/blob/baf1e632/Res/spec/index.js
----------------------------------------------------------------------
diff --git a/Res/spec/index.js b/Res/spec/index.js
index 121cf63..20f8be5 100644
--- a/Res/spec/index.js
+++ b/Res/spec/index.js
@@ -1,49 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 describe('app', function() {
     describe('initialize', function() {
         it('should bind deviceready', function() {
             runs(function() {
-                spyOn(app, 'deviceready');
+                spyOn(app, 'onDeviceReady');
                 app.initialize();
                 helper.trigger(window.document, 'deviceready');
             });
 
             waitsFor(function() {
-                return (app.deviceready.calls.length > 0);
-            }, 'deviceready should be called once', 500);
+                return (app.onDeviceReady.calls.length > 0);
+            }, 'onDeviceReady should be called once', 500);
 
             runs(function() {
-                expect(app.deviceready).toHaveBeenCalled();
+                expect(app.onDeviceReady).toHaveBeenCalled();
             });
         });
     });
 
-    describe('deviceready', function() {
+    describe('onDeviceReady', function() {
         it('should report that it fired', function() {
-            spyOn(app, 'report');
-            app.deviceready();
-            expect(app.report).toHaveBeenCalledWith('deviceready');
+            spyOn(app, 'receivedEvent');
+            app.onDeviceReady();
+            expect(app.receivedEvent).toHaveBeenCalledWith('deviceready');
         });
     });
 
-    describe('report', function() {
+    describe('receivedEvent', 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>',
+                            '    <p class="event listening">Listening</p>',
+                            '    <p class="event received">Received</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 listening element', function() {
+            app.receivedEvent('deviceready');
+            var displayStyle = helper.getComputedStyle('#deviceready .listening', 'display');
+            expect(displayStyle).toEqual('none');
         });
 
-        it('should hide the pending state', function() {
-            app.report('deviceready');
-            var el = document.querySelector('#deviceready .pending.hide');
-            expect(el).toBeTruthy();
+        it('should show the received element', function() {
+            app.receivedEvent('deviceready');
+            var displayStyle = helper.getComputedStyle('#deviceready .received', 'display');
+            expect(displayStyle).toEqual('block');
         });
     });
 });


Mime
View raw message