Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #17 from manifoldjs/revert-16-v0.1.1-extendedsplas…
Browse files Browse the repository at this point in the history
…hscreen

Revert "V0.1.1 extendedsplashscreen (Issue #14)"
  • Loading branch information
msrodri committed Jun 10, 2015
2 parents 12ed61b + fc575a6 commit 6837d37
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 303 deletions.
Binary file modified assets/defaultImages/windows/1152x1920.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/defaultImages/wp8/480x800.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion assets/windows/wrapper.css

This file was deleted.

19 changes: 0 additions & 19 deletions assets/windows/wrapper.html

This file was deleted.

70 changes: 0 additions & 70 deletions assets/windows/wrapper.js

This file was deleted.

6 changes: 2 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

<dependency id="cordova-plugin-whitelist" version=">=1.0.1" />
<dependency id="cordova-plugin-network-information" version=">=1.0.0" />

<hook type="before_prepare" src="scripts/updateConfiguration.js" />
<hook type="after_prepare" src="scripts/updateConfigurationAfterPrepare.js" />
<hook type="after_build" src="scripts/updateConfigurationAfterBuild.js" />

<js-module src="www/hostedWebApp.js" name="hostedwebapp">
<clobbers target="hostedwebapp" />
</js-module>
Expand All @@ -37,8 +37,6 @@

<!-- windows -->
<platform name="windows">
<hook type="after_prepare" src="scripts/replaceWindowsWrapperFile.js" />
<hook type="before_plugin_rm" src="scripts/rollbackWindowsWrapperFiles.js" />
<js-module src="src/windows/HostedWebAppPluginProxy.js" name="HostedWebAppPluginProxy">
<merges target="" />
</js-module>
Expand Down
3 changes: 0 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,3 @@ Cordova for Android and iOS platforms provide a security policy to control which
The Windows and Windows Phone platforms do not provide control for these kind of requests, and they will be allowed.


## Changelog

Releases are documented in [GitHub](https://github.com/manifoldjs/ManifoldCordova/releases).
96 changes: 0 additions & 96 deletions scripts/replaceWindowsWrapperFile.js

This file was deleted.

97 changes: 0 additions & 97 deletions scripts/rollbackWindowsWrapperFiles.js

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/test/updateConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function initializeContext(testDir) {
var ctx = {
opts : {
plugin: {
id: 'cordova-plugin-hostedwebapp'
id: 'com-manifoldjs-hostedwebapp'
},
projectRoot : testDir
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/updateConfigurationAfterPrepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function configureParser(context) {

var xml = cordova_util.projectConfig(projectRoot);
config = createConfigParser(xml, etree, ConfigParser);

var windowsDir = path.join(projectRoot, 'platforms', 'windows');
if (fs.existsSync(windowsDir)) {
var windowsXml = cordova_util.projectConfig(windowsDir);
Expand All @@ -45,11 +45,11 @@ module.exports = function (context) {

// save the updated configuration
config.write();

if (windowsConfig) {
// Patch for windows: restoring the start page to index.html
logger.log('Restoring local start page in windows configuration...');
windowsConfig.setAttribute('content', 'src', 'wrapper.html');
windowsConfig.setAttribute('content', 'src', 'index.html');
windowsConfig.write();
}
}
15 changes: 6 additions & 9 deletions src/windows/HostedWebAppPluginProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ var _whiteList = [];

// creates a webview to host content
function configureHost(url, zOrder, display) {

// workaround to avoid the webview scaling issue
var div = document.getElementById("deviceready");
div.classList.remove("blink");

var webView = document.createElement(cordova.platformId === 'windows8' ? 'iframe' : 'x-ms-webview');
var style = webView.style;
style.position = 'absolute';
Expand Down Expand Up @@ -161,12 +166,6 @@ function configureWhiteList(manifest) {
}
}

// hides the extended splash screen
function hideExtendedSplashScreen(e) {
var extendedSplashScreen = document.getElementById("extendedSplashScreen");
extendedSplashScreen.style.display = "none";
}

module.exports = {
// loads the W3C manifest file and parses it
loadManifest: function (successCallback, errorCallback, args) {
Expand Down Expand Up @@ -232,7 +231,5 @@ module.exports.loadManifest(
configureOfflineSupport('offline.html');
configureWhiteList(manifest);
_mainView = configureHost(manifest ? manifest.start_url : 'about:blank', _zIndex);
_mainView.addEventListener("MSWebViewDOMContentLoaded", hideExtendedSplashScreen, false);

cordova.fireDocumentEvent("webviewCreated", { webView: _mainView });
});
});

0 comments on commit 6837d37

Please sign in to comment.