diff --git a/assets/windows/wrapper.css b/assets/windows/wrapper.css index 1c534f1..9a4ca67 100644 --- a/assets/windows/wrapper.css +++ b/assets/windows/wrapper.css @@ -1 +1 @@ -body { width: 100%; height: 100%; position: absolute; top: 0; left: 0; margin: 0; } .loading-progress { position: absolute; top: 50%; left: 45%; width: 10%; } .extendedSplashScreen .loading-progress { position: absolute; top: 50%; left: 20%; width: 60%; margin: 0; } .extendedSplashScreen { display: block; background-color: #000000; height: 100%; width: 100%; position: absolute; top: 0px; left: 0px; text-align: center; z-index: 10111; } .extendedSplashScreen .extendedSplashImage { position: absolute; } \ No newline at end of file +body { width: 100%; height: 100%; position: absolute; top: 0; left: 0; margin: 0; } .loading-progress { position: absolute; top: 50%; left: 45%; width: 10%; } .extendedSplashScreen .loading-progress { position: absolute; top: 50%; left: 20%; width: 60%; margin: 0; } .extendedSplashScreen { display: block; background-color: #000000; height: 100%; width: 100%; position: absolute; top: 0px; left: 0px; text-align: center; z-index: 10111; } .extendedSplashScreen .extendedSplashImage { position: absolute; } \ No newline at end of file diff --git a/assets/windows/wrapper.html b/assets/windows/wrapper.html index c9cb6a5..c159eaf 100644 --- a/assets/windows/wrapper.html +++ b/assets/windows/wrapper.html @@ -1,4 +1,4 @@ - + diff --git a/assets/windows/wrapper.js b/assets/windows/wrapper.js index 6399e53..b908f9d 100644 --- a/assets/windows/wrapper.js +++ b/assets/windows/wrapper.js @@ -1,24 +1,28 @@ -var setupExtendedSplashScreen, updateSplashScreenPositioning, +var setupExtendedSplashScreen, updateSplashScreenPositioning, splashScreen, splashScreenEl, splashScreenImageEl, - isWindows = navigator.appVersion.indexOf("Windows Phone 8.1") === -1; + isWindows = navigator.appVersion.indexOf("Windows Phone") === -1, + isWindowsPhone10 = navigator.appVersion.indexOf("Windows Phone 10") !== -1; -WinJS.Application.addEventListener("activated", function (e) { - if (e.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { - splashScreen = e.detail.splashScreen; +// TODO: Need to fix styling issues whith the extended splash screen for Windows Phone 10 (disabled for now) +if (!isWindowsPhone10) { + WinJS.Application.addEventListener("activated", function (e) { + if (e.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { + splashScreen = e.detail.splashScreen; - // Listen for window resize events to reposition the extended splash screen image accordingly. - // This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc... - window.addEventListener("resize", updateSplashPositioning, false); + // Listen for window resize events to reposition the extended splash screen image accordingly. + // This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc... + window.addEventListener("resize", updateSplashPositioning, false); - var previousExecutionState = e.detail.previousExecutionState; - var state = Windows.ApplicationModel.Activation.ApplicationExecutionState; - if (previousExecutionState === state.notRunning - || previousExecutionState === state.terminated - || previousExecutionState === state.closedByUser) { - setupExtendedSplashScreen(); + var previousExecutionState = e.detail.previousExecutionState; + var state = Windows.ApplicationModel.Activation.ApplicationExecutionState; + if (previousExecutionState === state.notRunning + || previousExecutionState === state.terminated + || previousExecutionState === state.closedByUser) { + setupExtendedSplashScreen(); + } } - } -}, false); + }, false); +} setupExtendedSplashScreen = function () { splashScreenEl = document.getElementById("extendedSplashScreen"); diff --git a/package.json b/package.json index 4453c58..001606e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-hostedwebapp", - "version": "0.1.2", + "version": "0.1.3", "description": "Hosted Web App Plugin", "cordova": { "id": "cordova-plugin-hostedwebapp", diff --git a/plugin.xml b/plugin.xml index c425570..8674eb6 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ + version="0.1.3"> HostedWebApp Hosted Web App Plugin MIT License