images become part of the template, test project uses new PLAT version and 
cordova-incl.js


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/6aa8ef65
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/6aa8ef65
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/6aa8ef65

Branch: refs/heads/master
Commit: 6aa8ef65c517dc004c394b6e712c28270b7b7807
Parents: 4ea376d
Author: Jesse MacFadyen <[email protected]>
Authored: Tue May 28 12:31:52 2013 -0700
Committer: Jesse MacFadyen <[email protected]>
Committed: Tue May 28 12:31:52 2013 -0700

----------------------------------------------------------------------
 windows8/template/CordovaApp.jsproj       |    4 +
 windows8/template/images/logo.png         |  Bin 0 -> 11600 bytes
 windows8/template/images/smalllogo.png    |  Bin 0 -> 2831 bytes
 windows8/template/images/splashscreen.png |  Bin 0 -> 24855 bytes
 windows8/template/images/storelogo.png    |  Bin 0 -> 4052 bytes
 windows8/template/package.appxmanifest    |    7 +-
 windows8/test/CordovaTestApp.jsproj       |    2 +-
 windows8/test/cordova-incl.js             |   37 +-
 windows8/test/cordova.js                  | 8153 ------------------------
 windows8/test/cordova.windows8.js         | 8153 ++++++++++++++++++++++++
 10 files changed, 8188 insertions(+), 8168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/template/CordovaApp.jsproj
----------------------------------------------------------------------
diff --git a/windows8/template/CordovaApp.jsproj 
b/windows8/template/CordovaApp.jsproj
index 91853d1..d78baa7 100644
--- a/windows8/template/CordovaApp.jsproj
+++ b/windows8/template/CordovaApp.jsproj
@@ -53,6 +53,10 @@
     <AppxManifest Include="package.appxmanifest">
       <SubType>Designer</SubType>
     </AppxManifest>
+    <Content Include="images\logo.png" />
+    <Content Include="images\smalllogo.png" />
+    <Content Include="images\splashscreen.png" />
+    <Content Include="images\storelogo.png" />
     <Content Include="www\cordova.js" />
     <Content Include="www\css\index.css" />
     <Content Include="www\img\logo.png" />

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/template/images/logo.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/logo.png 
b/windows8/template/images/logo.png
new file mode 100644
index 0000000..86a48a8
Binary files /dev/null and b/windows8/template/images/logo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/template/images/smalllogo.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/smalllogo.png 
b/windows8/template/images/smalllogo.png
new file mode 100644
index 0000000..0e648ef
Binary files /dev/null and b/windows8/template/images/smalllogo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/template/images/splashscreen.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/splashscreen.png 
b/windows8/template/images/splashscreen.png
new file mode 100644
index 0000000..d1e6c98
Binary files /dev/null and b/windows8/template/images/splashscreen.png differ

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/template/images/storelogo.png
----------------------------------------------------------------------
diff --git a/windows8/template/images/storelogo.png 
b/windows8/template/images/storelogo.png
new file mode 100644
index 0000000..dd00478
Binary files /dev/null and b/windows8/template/images/storelogo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/template/package.appxmanifest
----------------------------------------------------------------------
diff --git a/windows8/template/package.appxmanifest 
b/windows8/template/package.appxmanifest
index 62c8f28..c864386 100644
--- a/windows8/template/package.appxmanifest
+++ b/windows8/template/package.appxmanifest
@@ -15,7 +15,12 @@
   </Resources>
   <Applications>
     <Application Id="App" StartPage="www/index.html">
-      <VisualElements DisplayName="CordovaApp" Logo="www\img\logo.png" 
SmallLogo="www\img\smalllogo.png" Description="CordovaApp" 
ForegroundText="light" BackgroundColor="#464646">
+      <VisualElements DisplayName="CordovaApp" 
+                      Logo="www\img\logo.png" 
+                      SmallLogo="www\img\smalllogo.png"
+                      Description="CordovaApp" 
+                      ForegroundText="light" 
+                      BackgroundColor="#464646">
         <DefaultTile ShowName="allLogos" />
         <SplashScreen Image="www\img\splashscreen.png" />
       </VisualElements>

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/test/CordovaTestApp.jsproj
----------------------------------------------------------------------
diff --git a/windows8/test/CordovaTestApp.jsproj 
b/windows8/test/CordovaTestApp.jsproj
index dd72c37..a12098f 100644
--- a/windows8/test/CordovaTestApp.jsproj
+++ b/windows8/test/CordovaTestApp.jsproj
@@ -100,7 +100,7 @@
     <Content Include="compass\index.html" />
     <Content Include="contacts\index.html" />
     <Content Include="cordova-incl.js" />
-    <Content Include="cordova.js" />
+    <Content Include="cordova.windows8.js" />
     <Content Include="events\index.html" />
     <Content Include="images\logo.png" />
     <Content Include="images\smalllogo.png" />

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/6aa8ef65/windows8/test/cordova-incl.js
----------------------------------------------------------------------
diff --git a/windows8/test/cordova-incl.js b/windows8/test/cordova-incl.js
index 458e10a..9c2c545 100644
--- a/windows8/test/cordova-incl.js
+++ b/windows8/test/cordova-incl.js
@@ -20,15 +20,22 @@
 */
 
 var PLAT;
-if (/Android/.exec(navigator.userAgent)) {
-    PLAT = 'android';
-} else if (/(iPad)|(iPhone)|(iPod)/.exec(navigator.userAgent)) {
-    PLAT = 'ios';
-} else if (/(BB10)/.exec(navigator.userAgent)) {
-    PLAT = 'blackberry10';
-} else if (/(PlayBook)|(BlackBerry)/.exec(navigator.userAgent)) {
-    PLAT = 'blackberry';
-}
+(function getPlatform() {
+    var platforms = {
+        android: /Android/,
+        ios: /(iPad)|(iPhone)|(iPod)/,
+        blackberry10: /(BB10)/,
+        blackberry: /(PlayBook)|(BlackBerry)/,
+        windows8: /MSAppHost/,
+        windowsphone: /Windows Phone/
+    };
+    for (var key in platforms) {
+        if (platforms[key].exec(navigator.userAgent)) {
+            PLAT = key;
+            break;
+        }
+    }
+})();
 
 var scripts = document.getElementsByTagName('script');
 var currentPath = scripts[scripts.length - 1].src;
@@ -59,14 +66,18 @@ if (PLAT) {
 }
 
 if (!window._doNotWriteCordovaScript) {
-    var script = document.createElement("script");
-    script.src = cordovaPath;
-    document.head.appendChild(script);
+    if (PLAT != "windows8") {
+        document.write('<script type="text/javascript" charset="utf-8" src="' 
+ cordovaPath + '"></script>');
+    } else {
+        var s = document.createElement('script');
+        s.src = cordovaPath;
+        document.head.appendChild(s);
+    }
 }
 
 function backHome() {
        if (window.device && device.platform && device.platform.toLowerCase() 
== 'android') {
-            navigator.app.backHistory();
+        navigator.app.backHistory();
        }
        else {
            window.history.go(-1);

Reply via email to