diff options
Diffstat (limited to 'StoneIsland/platforms/ios/www')
27 files changed, 408 insertions, 462 deletions
diff --git a/StoneIsland/platforms/ios/www/cordova-js-src/exec.js b/StoneIsland/platforms/ios/www/cordova-js-src/exec.js index 32a3f8b5..3fb7fa19 100644 --- a/StoneIsland/platforms/ios/www/cordova-js-src/exec.js +++ b/StoneIsland/platforms/ios/www/cordova-js-src/exec.js @@ -19,55 +19,20 @@ * */ +/*global require, module, atob, document */ + /** * Creates a gap bridge iframe used to notify the native code about queued * commands. */ var cordova = require('cordova'), - channel = require('cordova/channel'), utils = require('cordova/utils'), base64 = require('cordova/base64'), - // XHR mode does not work on iOS 4.2. - // XHR mode's main advantage is working around a bug in -webkit-scroll, which - // doesn't exist only on iOS 5.x devices. - // IFRAME_NAV is the fastest. - // IFRAME_HASH could be made to enable synchronous bridge calls if we wanted this feature. - jsToNativeModes = { - IFRAME_NAV: 0, // Default. Uses a new iframe for each poke. - // XHR bridge appears to be flaky sometimes: CB-3900, CB-3359, CB-5457, CB-4970, CB-4998, CB-5134 - XHR_NO_PAYLOAD: 1, // About the same speed as IFRAME_NAV. Performance not about the same as IFRAME_NAV, but more variable. - XHR_WITH_PAYLOAD: 2, // Flakey, and not as performant - XHR_OPTIONAL_PAYLOAD: 3, // Flakey, and not as performant - IFRAME_HASH_NO_PAYLOAD: 4, // Not fully baked. A bit faster than IFRAME_NAV, but risks jank since poke happens synchronously. - IFRAME_HASH_WITH_PAYLOAD: 5, // Slower than no payload. Maybe since it has to be URI encoded / decoded. - WK_WEBVIEW_BINDING: 6 // Only way that works for WKWebView :) - }, - bridgeMode, execIframe, - execHashIframe, - hashToggle = 1, - execXhr, - requestCount = 0, - vcHeaderValue = null, commandQueue = [], // Contains pending JS->Native messages. isInContextOfEvalJs = 0, failSafeTimerId = 0; -function shouldBundleCommandJson() { - if (bridgeMode === jsToNativeModes.XHR_WITH_PAYLOAD) { - return true; - } - if (bridgeMode === jsToNativeModes.XHR_OPTIONAL_PAYLOAD) { - var payloadLength = 0; - for (var i = 0; i < commandQueue.length; ++i) { - payloadLength += commandQueue[i].length; - } - // The value here was determined using the benchmark within CordovaLibApp on an iPad 3. - return payloadLength < 4500; - } - return false; -} - function massageArgsJsToNative(args) { if (!args || utils.typeName(args) != 'Array') { return args; @@ -118,17 +83,10 @@ function convertMessageToArgsNativeToJs(message) { } function iOSExec() { - if (bridgeMode === undefined) { - bridgeMode = jsToNativeModes.IFRAME_NAV; - } - - if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.cordova && window.webkit.messageHandlers.cordova.postMessage) { - bridgeMode = jsToNativeModes.WK_WEBVIEW_BINDING; - } - var successCallback, failCallback, service, action, actionArgs, splitCommand; + var successCallback, failCallback, service, action, actionArgs; var callbackId = null; - if (typeof arguments[0] !== "string") { + if (typeof arguments[0] !== 'string') { // FORMAT ONE successCallback = arguments[0]; failCallback = arguments[1]; @@ -142,18 +100,9 @@ function iOSExec() { // an invalid callbackId and passes it even if no callbacks were given. callbackId = 'INVALID'; } else { - // FORMAT TWO, REMOVED - try { - splitCommand = arguments[0].split("."); - action = splitCommand.pop(); - service = splitCommand.join("."); - actionArgs = Array.prototype.splice.call(arguments, 1); - - console.log('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + - "cordova.exec(null, null, \"" + service + "\", \"" + action + "\"," + JSON.stringify(actionArgs) + ");" - ); - return; - } catch (e) {} + throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + + 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);' + ); } // If actionArgs is not provided, default to an empty array @@ -175,116 +124,79 @@ function iOSExec() { // effectively clone the command arguments in case they are mutated before // the command is executed. commandQueue.push(JSON.stringify(command)); - - if (bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING) { - window.webkit.messageHandlers.cordova.postMessage(command); - } else { - // If we're in the context of a stringByEvaluatingJavaScriptFromString call, - // then the queue will be flushed when it returns; no need for a poke. - // Also, if there is already a command in the queue, then we've already - // poked the native side, so there is no reason to do so again. - if (!isInContextOfEvalJs && commandQueue.length == 1) { - pokeNative(); - } + + // If we're in the context of a stringByEvaluatingJavaScriptFromString call, + // then the queue will be flushed when it returns; no need for a poke. + // Also, if there is already a command in the queue, then we've already + // poked the native side, so there is no reason to do so again. + if (!isInContextOfEvalJs && commandQueue.length == 1) { + pokeNative(); } } -function pokeNative() { - switch (bridgeMode) { - case jsToNativeModes.XHR_NO_PAYLOAD: - case jsToNativeModes.XHR_WITH_PAYLOAD: - case jsToNativeModes.XHR_OPTIONAL_PAYLOAD: - pokeNativeViaXhr(); - break; - default: // iframe-based. - pokeNativeViaIframe(); - } +// CB-10530 +function proxyChanged() { + var cexec = cordovaExec(); + + return (execProxy !== cexec && // proxy objects are different + iOSExec !== cexec // proxy object is not the current iOSExec + ); } -function pokeNativeViaXhr() { - // This prevents sending an XHR when there is already one being sent. - // This should happen only in rare circumstances (refer to unit tests). - if (execXhr && execXhr.readyState != 4) { - execXhr = null; - } - // Re-using the XHR improves exec() performance by about 10%. - execXhr = execXhr || new XMLHttpRequest(); - // Changing this to a GET will make the XHR reach the URIProtocol on 4.2. - // For some reason it still doesn't work though... - // Add a timestamp to the query param to prevent caching. - execXhr.open('HEAD', "/!gap_exec?" + (+new Date()), true); - if (!vcHeaderValue) { - vcHeaderValue = /.*\((.*)\)$/.exec(navigator.userAgent)[1]; - } - execXhr.setRequestHeader('vc', vcHeaderValue); - execXhr.setRequestHeader('rc', ++requestCount); - if (shouldBundleCommandJson()) { - execXhr.setRequestHeader('cmds', iOSExec.nativeFetchMessages()); +// CB-10106 +function handleBridgeChange() { + if (proxyChanged()) { + var commandString = commandQueue.shift(); + while(commandString) { + var command = JSON.parse(commandString); + var callbackId = command[0]; + var service = command[1]; + var action = command[2]; + var actionArgs = command[3]; + var callbacks = cordova.callbacks[callbackId] || {}; + + execProxy(callbacks.success, callbacks.fail, service, action, actionArgs); + + commandString = commandQueue.shift(); + }; + return true; } - execXhr.send(null); + + return false; } -function pokeNativeViaIframe() { +function pokeNative() { // CB-5488 - Don't attempt to create iframe before document.body is available. if (!document.body) { - setTimeout(pokeNativeViaIframe); + setTimeout(pokeNative); return; } - if (bridgeMode === jsToNativeModes.IFRAME_HASH_NO_PAYLOAD || bridgeMode === jsToNativeModes.IFRAME_HASH_WITH_PAYLOAD) { - // TODO: This bridge mode doesn't properly support being removed from the DOM (CB-7735) - if (!execHashIframe) { - execHashIframe = document.createElement('iframe'); - execHashIframe.style.display = 'none'; - document.body.appendChild(execHashIframe); - // Hash changes don't work on about:blank, so switch it to file:///. - execHashIframe.contentWindow.history.replaceState(null, null, 'file:///#'); - } - // The delegate method is called only when the hash changes, so toggle it back and forth. - hashToggle = hashToggle ^ 3; - var hashValue = '%0' + hashToggle; - if (bridgeMode === jsToNativeModes.IFRAME_HASH_WITH_PAYLOAD) { - hashValue += iOSExec.nativeFetchMessages(); - } - execHashIframe.contentWindow.location.hash = hashValue; + + // Check if they've removed it from the DOM, and put it back if so. + if (execIframe && execIframe.contentWindow) { + execIframe.contentWindow.location = 'gap://ready'; } else { - // Check if they've removed it from the DOM, and put it back if so. - if (execIframe && execIframe.contentWindow) { - execIframe.contentWindow.location = 'gap://ready'; - } else { - execIframe = document.createElement('iframe'); - execIframe.style.display = 'none'; - execIframe.src = 'gap://ready'; - document.body.appendChild(execIframe); - } - // Use a timer to protect against iframe being unloaded during the poke (CB-7735). - // This makes the bridge ~ 7% slower, but works around the poke getting lost - // when the iframe is removed from the DOM. - // An onunload listener could be used in the case where the iframe has just been - // created, but since unload events fire only once, it doesn't work in the normal - // case of iframe reuse (where unload will have already fired due to the attempted - // navigation of the page). - failSafeTimerId = setTimeout(function() { - if (commandQueue.length) { - pokeNative(); - } - }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). + execIframe = document.createElement('iframe'); + execIframe.style.display = 'none'; + execIframe.src = 'gap://ready'; + document.body.appendChild(execIframe); } -} - -iOSExec.jsToNativeModes = jsToNativeModes; - -iOSExec.setJsToNativeBridgeMode = function(mode) { - // Remove the iFrame since it may be no longer required, and its existence - // can trigger browser bugs. - // https://issues.apache.org/jira/browse/CB-593 - if (execIframe) { - if (execIframe.parentNode) { - execIframe.parentNode.removeChild(execIframe); + // Use a timer to protect against iframe being unloaded during the poke (CB-7735). + // This makes the bridge ~ 7% slower, but works around the poke getting lost + // when the iframe is removed from the DOM. + // An onunload listener could be used in the case where the iframe has just been + // created, but since unload events fire only once, it doesn't work in the normal + // case of iframe reuse (where unload will have already fired due to the attempted + // navigation of the page). + failSafeTimerId = setTimeout(function() { + if (commandQueue.length) { + // CB-10106 - flush the queue on bridge change + if (!handleBridgeChange()) { + pokeNative(); + } } - execIframe = null; - } - bridgeMode = mode; -}; + }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). +} iOSExec.nativeFetchMessages = function() { // Stop listing for window detatch once native side confirms poke. @@ -301,11 +213,14 @@ iOSExec.nativeFetchMessages = function() { return json; }; -iOSExec.nativeCallback = function(callbackId, status, message, keepCallback) { +iOSExec.nativeCallback = function(callbackId, status, message, keepCallback, debug) { return iOSExec.nativeEvalAndFetch(function() { var success = status === 0 || status === 1; var args = convertMessageToArgsNativeToJs(message); - cordova.callbackFromNative(callbackId, success, status, args, keepCallback); + function nc2() { + cordova.callbackFromNative(callbackId, success, status, args, keepCallback); + } + setTimeout(nc2, 0); }); }; @@ -320,4 +235,28 @@ iOSExec.nativeEvalAndFetch = function(func) { } }; -module.exports = iOSExec; +// Proxy the exec for bridge changes. See CB-10106 + +function cordovaExec() { + var cexec = require('cordova/exec'); + var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); + return (cexec_valid && execProxy !== cexec)? cexec : iOSExec; +} + +function execProxy() { + cordovaExec().apply(null, arguments); +}; + +execProxy.nativeFetchMessages = function() { + return cordovaExec().nativeFetchMessages.apply(null, arguments); +}; + +execProxy.nativeEvalAndFetch = function() { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); +}; + +execProxy.nativeCallback = function() { + return cordovaExec().nativeCallback.apply(null, arguments); +}; + +module.exports = execProxy; diff --git a/StoneIsland/platforms/ios/www/cordova.js b/StoneIsland/platforms/ios/www/cordova.js index 46ab90b7..9dce1f9f 100644 --- a/StoneIsland/platforms/ios/www/cordova.js +++ b/StoneIsland/platforms/ios/www/cordova.js @@ -1,5 +1,5 @@ // Platform: ios -// 49a8db57fa070d20ea7b304a53ffec3d7250c5af +// f28234fbc27c578b9a335f1dabfa2d1b96bfc03d /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '3.9.2'; +var PLATFORM_VERSION_BUILD_LABEL = '4.3.0'; // file: src/scripts/require.js /*jshint -W079 */ @@ -697,8 +697,13 @@ var Channel = function(type, sticky) { } }; -function forceFunction(f) { - if (typeof f != 'function') throw "Function required as first argument!"; +function checkSubscriptionArgument(argument) { + if (typeof argument !== "function" && typeof argument.handleEvent !== "function") { + throw new Error( + "Must provide a function or an EventListener object " + + "implementing the handleEvent interface." + ); + } } /** @@ -708,28 +713,39 @@ function forceFunction(f) { * and a guid that can be used to stop subscribing to the channel. * Returns the guid. */ -Channel.prototype.subscribe = function(f, c) { - // need a function to call - forceFunction(f); +Channel.prototype.subscribe = function(eventListenerOrFunction, eventListener) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid; + + if (eventListenerOrFunction && typeof eventListenerOrFunction === "object") { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + eventListener = eventListenerOrFunction; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } + if (this.state == 2) { - f.apply(c || this, this.fireArgs); + handleEvent.apply(eventListener || this, this.fireArgs); return; } - var func = f, - guid = f.observer_guid; - if (typeof c == "object") { func = utils.close(c, f); } + guid = eventListenerOrFunction.observer_guid; + if (typeof eventListener === "object") { + handleEvent = utils.close(eventListener, handleEvent); + } if (!guid) { - // first time any channel has seen this subscriber + // First time any channel has seen this subscriber guid = '' + nextGuid++; } - func.observer_guid = guid; - f.observer_guid = guid; + handleEvent.observer_guid = guid; + eventListenerOrFunction.observer_guid = guid; // Don't add the same handler more than once. if (!this.handlers[guid]) { - this.handlers[guid] = func; + this.handlers[guid] = handleEvent; this.numHandlers++; if (this.numHandlers == 1) { this.onHasSubscribersChange && this.onHasSubscribersChange(); @@ -740,12 +756,20 @@ Channel.prototype.subscribe = function(f, c) { /** * Unsubscribes the function with the given guid from the channel. */ -Channel.prototype.unsubscribe = function(f) { - // need a function to unsubscribe - forceFunction(f); +Channel.prototype.unsubscribe = function(eventListenerOrFunction) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid, handler; + + if (eventListenerOrFunction && typeof eventListenerOrFunction === "object") { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } - var guid = f.observer_guid, - handler = this.handlers[guid]; + guid = handleEvent.observer_guid; + handler = this.handlers[guid]; if (handler) { delete this.handlers[guid]; this.numHandlers--; @@ -817,58 +841,23 @@ module.exports = channel; }); -// file: e:/cordova/cordova-ios/cordova-js-src/exec.js +// file: /Users/shazron/Documents/git/apache/cordova-ios/cordova-js-src/exec.js define("cordova/exec", function(require, exports, module) { +/*global require, module, atob, document */ + /** * Creates a gap bridge iframe used to notify the native code about queued * commands. */ var cordova = require('cordova'), - channel = require('cordova/channel'), utils = require('cordova/utils'), base64 = require('cordova/base64'), - // XHR mode does not work on iOS 4.2. - // XHR mode's main advantage is working around a bug in -webkit-scroll, which - // doesn't exist only on iOS 5.x devices. - // IFRAME_NAV is the fastest. - // IFRAME_HASH could be made to enable synchronous bridge calls if we wanted this feature. - jsToNativeModes = { - IFRAME_NAV: 0, // Default. Uses a new iframe for each poke. - // XHR bridge appears to be flaky sometimes: CB-3900, CB-3359, CB-5457, CB-4970, CB-4998, CB-5134 - XHR_NO_PAYLOAD: 1, // About the same speed as IFRAME_NAV. Performance not about the same as IFRAME_NAV, but more variable. - XHR_WITH_PAYLOAD: 2, // Flakey, and not as performant - XHR_OPTIONAL_PAYLOAD: 3, // Flakey, and not as performant - IFRAME_HASH_NO_PAYLOAD: 4, // Not fully baked. A bit faster than IFRAME_NAV, but risks jank since poke happens synchronously. - IFRAME_HASH_WITH_PAYLOAD: 5, // Slower than no payload. Maybe since it has to be URI encoded / decoded. - WK_WEBVIEW_BINDING: 6 // Only way that works for WKWebView :) - }, - bridgeMode, execIframe, - execHashIframe, - hashToggle = 1, - execXhr, - requestCount = 0, - vcHeaderValue = null, commandQueue = [], // Contains pending JS->Native messages. isInContextOfEvalJs = 0, failSafeTimerId = 0; -function shouldBundleCommandJson() { - if (bridgeMode === jsToNativeModes.XHR_WITH_PAYLOAD) { - return true; - } - if (bridgeMode === jsToNativeModes.XHR_OPTIONAL_PAYLOAD) { - var payloadLength = 0; - for (var i = 0; i < commandQueue.length; ++i) { - payloadLength += commandQueue[i].length; - } - // The value here was determined using the benchmark within CordovaLibApp on an iPad 3. - return payloadLength < 4500; - } - return false; -} - function massageArgsJsToNative(args) { if (!args || utils.typeName(args) != 'Array') { return args; @@ -919,17 +908,10 @@ function convertMessageToArgsNativeToJs(message) { } function iOSExec() { - if (bridgeMode === undefined) { - bridgeMode = jsToNativeModes.IFRAME_NAV; - } - - if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.cordova && window.webkit.messageHandlers.cordova.postMessage) { - bridgeMode = jsToNativeModes.WK_WEBVIEW_BINDING; - } - var successCallback, failCallback, service, action, actionArgs, splitCommand; + var successCallback, failCallback, service, action, actionArgs; var callbackId = null; - if (typeof arguments[0] !== "string") { + if (typeof arguments[0] !== 'string') { // FORMAT ONE successCallback = arguments[0]; failCallback = arguments[1]; @@ -943,18 +925,9 @@ function iOSExec() { // an invalid callbackId and passes it even if no callbacks were given. callbackId = 'INVALID'; } else { - // FORMAT TWO, REMOVED - try { - splitCommand = arguments[0].split("."); - action = splitCommand.pop(); - service = splitCommand.join("."); - actionArgs = Array.prototype.splice.call(arguments, 1); - - console.log('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + - "cordova.exec(null, null, \"" + service + "\", \"" + action + "\"," + JSON.stringify(actionArgs) + ");" - ); - return; - } catch (e) {} + throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + + 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);' + ); } // If actionArgs is not provided, default to an empty array @@ -976,116 +949,79 @@ function iOSExec() { // effectively clone the command arguments in case they are mutated before // the command is executed. commandQueue.push(JSON.stringify(command)); - - if (bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING) { - window.webkit.messageHandlers.cordova.postMessage(command); - } else { - // If we're in the context of a stringByEvaluatingJavaScriptFromString call, - // then the queue will be flushed when it returns; no need for a poke. - // Also, if there is already a command in the queue, then we've already - // poked the native side, so there is no reason to do so again. - if (!isInContextOfEvalJs && commandQueue.length == 1) { - pokeNative(); - } + + // If we're in the context of a stringByEvaluatingJavaScriptFromString call, + // then the queue will be flushed when it returns; no need for a poke. + // Also, if there is already a command in the queue, then we've already + // poked the native side, so there is no reason to do so again. + if (!isInContextOfEvalJs && commandQueue.length == 1) { + pokeNative(); } } -function pokeNative() { - switch (bridgeMode) { - case jsToNativeModes.XHR_NO_PAYLOAD: - case jsToNativeModes.XHR_WITH_PAYLOAD: - case jsToNativeModes.XHR_OPTIONAL_PAYLOAD: - pokeNativeViaXhr(); - break; - default: // iframe-based. - pokeNativeViaIframe(); - } +// CB-10530 +function proxyChanged() { + var cexec = cordovaExec(); + + return (execProxy !== cexec && // proxy objects are different + iOSExec !== cexec // proxy object is not the current iOSExec + ); } -function pokeNativeViaXhr() { - // This prevents sending an XHR when there is already one being sent. - // This should happen only in rare circumstances (refer to unit tests). - if (execXhr && execXhr.readyState != 4) { - execXhr = null; - } - // Re-using the XHR improves exec() performance by about 10%. - execXhr = execXhr || new XMLHttpRequest(); - // Changing this to a GET will make the XHR reach the URIProtocol on 4.2. - // For some reason it still doesn't work though... - // Add a timestamp to the query param to prevent caching. - execXhr.open('HEAD', "/!gap_exec?" + (+new Date()), true); - if (!vcHeaderValue) { - vcHeaderValue = /.*\((.*)\)$/.exec(navigator.userAgent)[1]; - } - execXhr.setRequestHeader('vc', vcHeaderValue); - execXhr.setRequestHeader('rc', ++requestCount); - if (shouldBundleCommandJson()) { - execXhr.setRequestHeader('cmds', iOSExec.nativeFetchMessages()); +// CB-10106 +function handleBridgeChange() { + if (proxyChanged()) { + var commandString = commandQueue.shift(); + while(commandString) { + var command = JSON.parse(commandString); + var callbackId = command[0]; + var service = command[1]; + var action = command[2]; + var actionArgs = command[3]; + var callbacks = cordova.callbacks[callbackId] || {}; + + execProxy(callbacks.success, callbacks.fail, service, action, actionArgs); + + commandString = commandQueue.shift(); + }; + return true; } - execXhr.send(null); + + return false; } -function pokeNativeViaIframe() { +function pokeNative() { // CB-5488 - Don't attempt to create iframe before document.body is available. if (!document.body) { - setTimeout(pokeNativeViaIframe); + setTimeout(pokeNative); return; } - if (bridgeMode === jsToNativeModes.IFRAME_HASH_NO_PAYLOAD || bridgeMode === jsToNativeModes.IFRAME_HASH_WITH_PAYLOAD) { - // TODO: This bridge mode doesn't properly support being removed from the DOM (CB-7735) - if (!execHashIframe) { - execHashIframe = document.createElement('iframe'); - execHashIframe.style.display = 'none'; - document.body.appendChild(execHashIframe); - // Hash changes don't work on about:blank, so switch it to file:///. - execHashIframe.contentWindow.history.replaceState(null, null, 'file:///#'); - } - // The delegate method is called only when the hash changes, so toggle it back and forth. - hashToggle = hashToggle ^ 3; - var hashValue = '%0' + hashToggle; - if (bridgeMode === jsToNativeModes.IFRAME_HASH_WITH_PAYLOAD) { - hashValue += iOSExec.nativeFetchMessages(); - } - execHashIframe.contentWindow.location.hash = hashValue; + + // Check if they've removed it from the DOM, and put it back if so. + if (execIframe && execIframe.contentWindow) { + execIframe.contentWindow.location = 'gap://ready'; } else { - // Check if they've removed it from the DOM, and put it back if so. - if (execIframe && execIframe.contentWindow) { - execIframe.contentWindow.location = 'gap://ready'; - } else { - execIframe = document.createElement('iframe'); - execIframe.style.display = 'none'; - execIframe.src = 'gap://ready'; - document.body.appendChild(execIframe); - } - // Use a timer to protect against iframe being unloaded during the poke (CB-7735). - // This makes the bridge ~ 7% slower, but works around the poke getting lost - // when the iframe is removed from the DOM. - // An onunload listener could be used in the case where the iframe has just been - // created, but since unload events fire only once, it doesn't work in the normal - // case of iframe reuse (where unload will have already fired due to the attempted - // navigation of the page). - failSafeTimerId = setTimeout(function() { - if (commandQueue.length) { - pokeNative(); - } - }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). + execIframe = document.createElement('iframe'); + execIframe.style.display = 'none'; + execIframe.src = 'gap://ready'; + document.body.appendChild(execIframe); } -} - -iOSExec.jsToNativeModes = jsToNativeModes; - -iOSExec.setJsToNativeBridgeMode = function(mode) { - // Remove the iFrame since it may be no longer required, and its existence - // can trigger browser bugs. - // https://issues.apache.org/jira/browse/CB-593 - if (execIframe) { - if (execIframe.parentNode) { - execIframe.parentNode.removeChild(execIframe); + // Use a timer to protect against iframe being unloaded during the poke (CB-7735). + // This makes the bridge ~ 7% slower, but works around the poke getting lost + // when the iframe is removed from the DOM. + // An onunload listener could be used in the case where the iframe has just been + // created, but since unload events fire only once, it doesn't work in the normal + // case of iframe reuse (where unload will have already fired due to the attempted + // navigation of the page). + failSafeTimerId = setTimeout(function() { + if (commandQueue.length) { + // CB-10106 - flush the queue on bridge change + if (!handleBridgeChange()) { + pokeNative(); + } } - execIframe = null; - } - bridgeMode = mode; -}; + }, 50); // Making this > 0 improves performance (marginally) in the normal case (where it doesn't fire). +} iOSExec.nativeFetchMessages = function() { // Stop listing for window detatch once native side confirms poke. @@ -1102,11 +1038,14 @@ iOSExec.nativeFetchMessages = function() { return json; }; -iOSExec.nativeCallback = function(callbackId, status, message, keepCallback) { +iOSExec.nativeCallback = function(callbackId, status, message, keepCallback, debug) { return iOSExec.nativeEvalAndFetch(function() { var success = status === 0 || status === 1; var args = convertMessageToArgsNativeToJs(message); - cordova.callbackFromNative(callbackId, success, status, args, keepCallback); + function nc2() { + cordova.callbackFromNative(callbackId, success, status, args, keepCallback); + } + setTimeout(nc2, 0); }); }; @@ -1121,7 +1060,31 @@ iOSExec.nativeEvalAndFetch = function(func) { } }; -module.exports = iOSExec; +// Proxy the exec for bridge changes. See CB-10106 + +function cordovaExec() { + var cexec = require('cordova/exec'); + var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); + return (cexec_valid && execProxy !== cexec)? cexec : iOSExec; +} + +function execProxy() { + cordovaExec().apply(null, arguments); +}; + +execProxy.nativeFetchMessages = function() { + return cordovaExec().nativeFetchMessages.apply(null, arguments); +}; + +execProxy.nativeEvalAndFetch = function() { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); +}; + +execProxy.nativeCallback = function() { + return cordovaExec().nativeCallback.apply(null, arguments); +}; + +module.exports = execProxy; }); @@ -1606,7 +1569,7 @@ exports.reset(); }); -// file: e:/cordova/cordova-ios/cordova-js-src/platform.js +// file: /Users/shazron/Documents/git/apache/cordova-ios/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { module.exports = { @@ -1888,7 +1851,10 @@ utils.clone = function(obj) { retVal = {}; for(i in obj){ - if(!(i in retVal) || retVal[i] != obj[i]) { + // https://issues.apache.org/jira/browse/CB-11522 'unknown' type may be returned in + // custom protocol activation case on Windows Phone 8.1 causing "No such interface supported" exception + // on cloning. + if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined' && typeof obj[i] != 'unknown') { retVal[i] = utils.clone(obj[i]); } } diff --git a/StoneIsland/platforms/ios/www/cordova_plugins.js b/StoneIsland/platforms/ios/www/cordova_plugins.js index 1c1c9718..c17b360b 100644 --- a/StoneIsland/platforms/ios/www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/www/cordova_plugins.js @@ -1,96 +1,96 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { module.exports = [ { - "file": "plugins/com.ionic.keyboard/www/keyboard.js", "id": "com.ionic.keyboard.keyboard", + "file": "plugins/com.ionic.keyboard/www/keyboard.js", "pluginId": "com.ionic.keyboard", "clobbers": [ "cordova.plugins.Keyboard" ] }, { - "file": "plugins/com.parse.cordova.core.pushplugin/www/cdv-plugin-parse.js", "id": "com.parse.cordova.core.pushplugin.ParsePlugin", + "file": "plugins/com.parse.cordova.core.pushplugin/www/cdv-plugin-parse.js", "pluginId": "com.parse.cordova.core.pushplugin", "clobbers": [ "window.parsePlugin" ] }, { - "file": "plugins/cordova-plugin-console/www/logger.js", "id": "cordova-plugin-console.logger", + "file": "plugins/cordova-plugin-console/www/logger.js", "pluginId": "cordova-plugin-console", "clobbers": [ "cordova.logger" ] }, { - "file": "plugins/cordova-plugin-console/www/console-via-logger.js", "id": "cordova-plugin-console.console", + "file": "plugins/cordova-plugin-console/www/console-via-logger.js", "pluginId": "cordova-plugin-console", "clobbers": [ "console" ] }, { - "file": "plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js", "id": "cordova-plugin-customurlscheme.LaunchMyApp", + "file": "plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js", "pluginId": "cordova-plugin-customurlscheme", "clobbers": [ "window.plugins.launchmyapp" ] }, { - "file": "plugins/cordova-plugin-device/www/device.js", "id": "cordova-plugin-device.device", + "file": "plugins/cordova-plugin-device/www/device.js", "pluginId": "cordova-plugin-device", "clobbers": [ "device" ] }, { - "file": "plugins/cordova-plugin-dialogs/www/notification.js", "id": "cordova-plugin-dialogs.notification", + "file": "plugins/cordova-plugin-dialogs/www/notification.js", "pluginId": "cordova-plugin-dialogs", "merges": [ "navigator.notification" ] }, { - "file": "plugins/cordova-plugin-geolocation/www/Coordinates.js", "id": "cordova-plugin-geolocation.Coordinates", + "file": "plugins/cordova-plugin-geolocation/www/Coordinates.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "Coordinates" ] }, { - "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", "id": "cordova-plugin-geolocation.PositionError", + "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "PositionError" ] }, { - "file": "plugins/cordova-plugin-geolocation/www/Position.js", "id": "cordova-plugin-geolocation.Position", + "file": "plugins/cordova-plugin-geolocation/www/Position.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "Position" ] }, { - "file": "plugins/cordova-plugin-geolocation/www/geolocation.js", "id": "cordova-plugin-geolocation.geolocation", + "file": "plugins/cordova-plugin-geolocation/www/geolocation.js", "pluginId": "cordova-plugin-geolocation", "clobbers": [ "navigator.geolocation" ] }, { - "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", "id": "cordova-plugin-inappbrowser.inappbrowser", + "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", "pluginId": "cordova-plugin-inappbrowser", "clobbers": [ "cordova.InAppBrowser.open", @@ -98,8 +98,8 @@ module.exports = [ ] }, { - "file": "plugins/cordova-plugin-network-information/www/network.js", "id": "cordova-plugin-network-information.network", + "file": "plugins/cordova-plugin-network-information/www/network.js", "pluginId": "cordova-plugin-network-information", "clobbers": [ "navigator.connection", @@ -107,32 +107,32 @@ module.exports = [ ] }, { - "file": "plugins/cordova-plugin-network-information/www/Connection.js", "id": "cordova-plugin-network-information.Connection", + "file": "plugins/cordova-plugin-network-information/www/Connection.js", "pluginId": "cordova-plugin-network-information", "clobbers": [ "Connection" ] }, { - "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", "id": "cordova-plugin-splashscreen.SplashScreen", + "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", "pluginId": "cordova-plugin-splashscreen", "clobbers": [ "navigator.splashscreen" ] }, { - "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", "id": "cordova-plugin-x-socialsharing.SocialSharing", + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", "pluginId": "cordova-plugin-x-socialsharing", "clobbers": [ "window.plugins.socialsharing" ] }, { - "file": "plugins/phonegap-plugin-push/www/push.js", "id": "phonegap-plugin-push.PushNotification", + "file": "plugins/phonegap-plugin-push/www/push.js", "pluginId": "phonegap-plugin-push", "clobbers": [ "PushNotification" @@ -155,6 +155,6 @@ module.exports.metadata = "cordova-plugin-whitelist": "1.0.0", "cordova-plugin-x-socialsharing": "5.0.7", "phonegap-plugin-push": "1.4.4" -} +}; // BOTTOM OF METADATA });
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/css/nav.css b/StoneIsland/platforms/ios/www/css/nav.css index c84b5b30..30f1af18 100755 --- a/StoneIsland/platforms/ios/www/css/nav.css +++ b/StoneIsland/platforms/ios/www/css/nav.css @@ -412,6 +412,10 @@ padding-bottom:0px; width: 100%; overflow: hidden; } +#collection.single { + height: -webkit-calc(100% - 43px); + height: calc(100% - 43px); +} #story, #hub, #archive, .page, #closed { /* these things do not have a footer */ height: -webkit-calc(100% - 43px); diff --git a/StoneIsland/platforms/ios/www/css/products.css b/StoneIsland/platforms/ios/www/css/products.css index 96a6afd4..e067e05a 100755 --- a/StoneIsland/platforms/ios/www/css/products.css +++ b/StoneIsland/platforms/ios/www/css/products.css @@ -16,10 +16,10 @@ background: rgba(245,245,245,1.0); } -#collection .single .item { +#collection.single .item { max-width: 98vw; } -#collection .single .item img { +#collection.single .item img { width: 98vw; height: 126vw; } diff --git a/StoneIsland/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html index 0d6cd6c6..768e3140 100755 --- a/StoneIsland/platforms/ios/www/index.html +++ b/StoneIsland/platforms/ios/www/index.html @@ -12,7 +12,7 @@ --> -<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; object-src * 'unsafe-inline' 'unsafe-eval'; style-src * 'unsafe-inline' 'unsafe-eval'; img-src * 'unsafe-inline' 'unsafe-eval'; media-src * 'unsafe-inline' 'unsafe-eval'; frame-src * 'unsafe-inline' 'unsafe-eval'; font-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline' 'unsafe-eval'"> +<meta http-equiv="Content-Security-Policy" content="default-src * gap: 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; object-src * 'unsafe-inline' 'unsafe-eval'; style-src * 'unsafe-inline' 'unsafe-eval'; img-src * 'unsafe-inline' 'unsafe-eval'; media-src * 'unsafe-inline' 'unsafe-eval'; frame-src * gap: 'unsafe-inline' 'unsafe-eval'; font-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline' 'unsafe-eval'"> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js index 06e051cb..b7c80520 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js @@ -9,8 +9,8 @@ var BlogView = View.extend({ fetch: function(fn){ $.ajax({ method: "GET", -// url: sdk.env == 'test' ? '/db.json' : "http://stone.sup.land/db.json", - url: "http://stone.sup.land/db.json", +// url: sdk.env == 'test' ? '/db.json' : "https://stone.sup.land/db.json", + url: "https://stone.sup.land/db.json", success: function(data){ this.success(data) fn && fn() diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js index cef2d07a..1657d295 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js @@ -15,6 +15,7 @@ var HubView = ScrollableView.extend({ this.$content = this.$(".content") this.$loader = this.$(".loader") this.scroller = new IScroll('#hub', app.iscroll_options) + HubLoader.init(this) }, show: function(){ @@ -42,91 +43,74 @@ var HubView = ScrollableView.extend({ this.$loader.hide() this.$content.empty() this.galleries = {} + HubLoader.add(this.data) + + this.deferScrollToTop() + }, + + append: function(row){ // id date subtitle body link store image[uri caption] - this.data.forEach(function(row){ - // console.log(row) - // console.log(moment(row.date)) - var t = this.template.replace(/{{id}}/g, row.id) - .replace(/{{date}}/, moment(row.date).format("MM.DD.YYYY")) - .replace(/{{title}}/, row.title) - .replace(/{{subtitle}}/, row.subtitle) - .replace(/{{link}}/, row.link) - .replace(/{{body}}/, row.body.replace(/\n/g, "<br>")) - var $t = $(t) - if (row.store != "true") { - $t.find(".store").remove() + // console.log(row) + // console.log(moment(row.date)) + var t = this.template.replace(/{{id}}/g, row.id) + .replace(/{{date}}/, moment(row.date).format("MM.DD.YYYY")) + .replace(/{{title}}/, row.title) + .replace(/{{subtitle}}/, row.subtitle) + .replace(/{{link}}/, row.link) + .replace(/{{body}}/, row.body.replace(/\n/g, "<br>")) + var $t = $(t) + if (row.store != "true") { + $t.find(".store").remove() + } + this.$content.append($t) + + if (row.image && row.image.length > 1) { + // image gallery + var $gallery = $(".gallery-" + row.id) + row.image.forEach(function(img){ + var el = document.createElement("div") + el.style.backgroundImage = "url(" + img.uri + ")" + el.className = "item" + $gallery.append(el) + }) + this.galleries[row.id] = new Flickity( ".gallery-" + row.id, { + selector: '.item', + cellAlign: 'center', + autoPlay: false, + freeScroll: false, + wrapAround: true, + imagesLoaded: true, + prevNextButtons: false, + pageDots: false, + contain: true, + draggable: true, + }) + } + else { + // single image + var el = document.createElement("div") + if (row.image && row.image.length) { + el.style.backgroundImage = "url(" + row.image[0].uri + ")" } - this.$content.append($t) + el.className = "item" + $(".gallery-" + row.id).append(el) + $(".gallery-" + row.id).data("row", row) - if (row.image && row.image.length > 1) { - // image gallery - var $gallery = $(".gallery-" + row.id) - row.image.forEach(function(img){ - var el = document.createElement("div") - el.style.backgroundImage = "url(" + img.uri + ")" - el.className = "item" - $gallery.append(el) - }) - this.galleries[row.id] = new Flickity( ".gallery-" + row.id, { - selector: '.item', - cellAlign: 'center', - autoPlay: false, - freeScroll: false, - wrapAround: true, - imagesLoaded: true, - prevNextButtons: false, - pageDots: false, - contain: true, - draggable: true, - }) - } - else { - // single image - var url = row.link - var is_video = url.match(/youtube|youtu.be|vimeo/) - var image_url - if (row.image && row.image.length) { - image_url = row.image[0].uri - } - else if (is_video && url.match(/youtube|youtu.be/)) { + // video, append play button + if (row.link.match(/youtube|youtu.be|vimeo/)) { + var play = document.createElement("div") + play.className = "play" + $(".gallery-" + row.id).append(play) + $(".gallery-" + row.id).addClass("gallery-video-post") + if (! row.image) { + var url = row.link var ytid = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0]; - image_url = "http://i.ytimg.com/vi/" + ytid + "/hqdefault.jpg" - } - else { - image_url = "" + e.style.backgroundImage = "url(https://i.ytimg.com/vi/" + ytid + "/maxresdefault.jpg" } - - var el = document.createElement("div") - - if (is_video) { - var ytid = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0]; - var tag = '<iframe src="https://www.youtube.com/embed/' + ytid + '?showinfo=0&rel=0&modestbranding=1&iv_load_policy=3&controls=0" frameborder="0"></iframe>' - el.innerHTML = tag - - // webkit-playsinline (html attribute) - // &playsinline=1 (yt iframe api param) - } - else { - el.style.backgroundImage = "url(" + image_url + ")" - } - el.className = "item" - $(".gallery-" + row.id).append(el) - $(".gallery-" + row.id).data("row", row) - - // video, append play button -// if (is_video) { -// var play = document.createElement("div") -// play.className = "play" -// $(".gallery-" + row.id).append(play) -// $(".gallery-" + row.id).addClass("gallery-video-post") -// } - $t.find(".gallery-left").remove() - $t.find(".gallery-right").remove() } - - }.bind(this)) - - this.deferScrollToTop() + $t.find(".gallery-left").remove() + $t.find(".gallery-right").remove() + } }, store_link: function(){ @@ -152,4 +136,38 @@ var HubView = ScrollableView.extend({ window.plugins.socialsharing.share(title, null, null, "http://deeplink.me/www.stoneisland.com/hub" ) }, -})
\ No newline at end of file +}) + +var HubLoader = (function(){ + var queue, view, item, loader + var HubLoader = {} + var loader + HubLoader.init = function(v){ + view = v + } + HubLoader.add = function(items){ + queue = items + this.load() + } + HubLoader.load = function(){ + item = queue.shift() + if (! item) return + if (item.image && item.image.length) { + loader = new Loader (HubLoader.build) + images = item.image.map(function(img){ + return img.uri.replace("http:","https:") + }).filter(function(img){ + return img.uri + }) + loader.preloadImages(images) + } + else { + HubLoader.build() + } + } + HubLoader.build = function(){ + view.append(item) + setTimeout(HubLoader.load, 20) + } + return HubLoader +})() diff --git a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js index 55f3b080..b9a7755f 100755 --- a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js @@ -33,7 +33,7 @@ var CollectionView = ScrollableView.extend({ if (sdk.env !== "test" && app.closed.storeIsClosed) { return app.closed.show() } - if (this.data && this.data.SearchResponseFull.Results.Items.length == 1) { + if (this.data && this.data.SearchResponseFull.Results.Items.length < 4) { app.footer.hide() } else { @@ -91,8 +91,8 @@ var CollectionView = ScrollableView.extend({ this.$content.empty() // DefaultCode10 // data.SearchResponseFull.Results.Items.length = 1 - var is_single_product = (data.SearchResponseFull.Results.Items.length == 1) - this.$content.toggleClass("single", is_single_product) + var is_single_product = (data.SearchResponseFull.Results.Items.length < 4) + this.$el.toggleClass("single", is_single_product) if (is_single_product) { console.log("IS SINGLE PRODUCT") diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js index 390d2f6a..cfb39f20 100755 --- a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js @@ -113,15 +113,13 @@ var ProductView = ScrollableView.extend({ var descriptions = this.get_descriptions(details) - this.gallery.populate( data['Code8'], details['Item']['ImageTypes'] ) - var name_partz = data['ModelNames'].split(' ') var num = name_partz.shift() var title = name_partz.join(' ') var type = title_case( data['MicroCategory'] ) var price = "$" + data['DiscountedPrice'] + ".00" var body = descriptions['Details'] + "<br>" + descriptions['EditorialDescription'] - body = body.replace(/<br>/g, "<br><br>") + body = body.replace(/<br>/g, "<br><br>").replace(/(<br>)+$/, "") var default_color_id = this.populate_selectors(data, details) @@ -129,15 +127,19 @@ var ProductView = ScrollableView.extend({ this.$style.css("opacity", 0) this.$color.html("NOT AVAILABLE") this.$size.hide() + this.gallery.populate( data['Code8'], details['Item']['ImageTypes'] ) } else { this.$style.css("opacity", 1) + var color = this.colors[default_color_id] var color_label = color.label var sizes = this.find_sizes_for_color(default_color_id) var size = sizes[0] var size_label = this.sizes[size].label + this.gallery.populate( color.code, details['Item']['ImageTypes'] ) + this.color = color this.size = size @@ -475,4 +477,4 @@ ModelFabric: "631520081CC-6315-81" ModelNames: "20081 DATA DRIP PIN" Neckline: "Claudine or round collar" -*/
\ No newline at end of file +*/ diff --git a/StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js b/StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js index 7d30ba59..ad09ae2d 100644 --- a/StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js +++ b/StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js @@ -1,4 +1,5 @@ -cordova.define("com.ionic.keyboard.keyboard", function(require, exports, module) { +cordova.define("com.ionic.keyboard.keyboard", function(require, exports, module) { + var argscheck = require('cordova/argscheck'), utils = require('cordova/utils'), exec = require('cordova/exec'); diff --git a/StoneIsland/platforms/ios/www/plugins/com.parse.cordova.core.pushplugin/www/cdv-plugin-parse.js b/StoneIsland/platforms/ios/www/plugins/com.parse.cordova.core.pushplugin/www/cdv-plugin-parse.js index e732f80d..983c4764 100644 --- a/StoneIsland/platforms/ios/www/plugins/com.parse.cordova.core.pushplugin/www/cdv-plugin-parse.js +++ b/StoneIsland/platforms/ios/www/plugins/com.parse.cordova.core.pushplugin/www/cdv-plugin-parse.js @@ -1,4 +1,5 @@ -cordova.define("com.parse.cordova.core.pushplugin.ParsePlugin", function(require, exports, module) { var parsePlugin = { +cordova.define("com.parse.cordova.core.pushplugin.ParsePlugin", function(require, exports, module) { +var parsePlugin = { registerCallback: function(ecb, successCallback, errorCallback) { cordova.exec( diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/console-via-logger.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/console-via-logger.js index 0ce8cea8..f7de4b64 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/console-via-logger.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/console-via-logger.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-console.console", function(require, exports, module) { /* +cordova.define("cordova-plugin-console.console", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/logger.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/logger.js index 7a9a75d3..dd42c01d 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/logger.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/logger.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-console.logger", function(require, exports, module) { /* +cordova.define("cordova-plugin-console.logger", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js index 3568c73f..72fee9e3 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-customurlscheme.LaunchMyApp", function(require, exports, module) { "use strict"; +cordova.define("cordova-plugin-customurlscheme.LaunchMyApp", function(require, exports, module) { +"use strict"; /* Q: Why an empty file? diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-device/www/device.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-device/www/device.js index 023bafd2..775c123f 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-device/www/device.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-device/www/device.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-device.device", function(require, exports, module) { /* +cordova.define("cordova-plugin-device.device", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-dialogs/www/notification.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-dialogs/www/notification.js index ea97eefb..adc5c077 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-dialogs/www/notification.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-dialogs/www/notification.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-dialogs.notification", function(require, exports, module) { /* +cordova.define("cordova-plugin-dialogs.notification", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Coordinates.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Coordinates.js index f7255659..4a995077 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Coordinates.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Coordinates.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-geolocation.Coordinates", function(require, exports, module) { /* +cordova.define("cordova-plugin-geolocation.Coordinates", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Position.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Position.js index 206bf8b4..116abb4f 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Position.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Position.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-geolocation.Position", function(require, exports, module) { /* +cordova.define("cordova-plugin-geolocation.Position", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/PositionError.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/PositionError.js index 11ffe491..c335381e 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/PositionError.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/PositionError.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-geolocation.PositionError", function(require, exports, module) { /* +cordova.define("cordova-plugin-geolocation.PositionError", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/geolocation.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/geolocation.js index ec9bb6e8..37bdaabb 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/geolocation.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/geolocation.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-geolocation.geolocation", function(require, exports, module) { /* +cordova.define("cordova-plugin-geolocation.geolocation", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js index 6c7a844a..b18a2ba7 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { /* +cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js index 1450e953..5f7279c5 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-network-information.Connection", function(require, exports, module) { /* +cordova.define("cordova-plugin-network-information.Connection", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js index bfac2e3f..770e6ba5 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-network-information.network", function(require, exports, module) { /* +cordova.define("cordova-plugin-network-information.network", function(require, exports, module) { +/* * 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 diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js index 0e6a10af..5beaa5fd 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-splashscreen.SplashScreen", function(require, exports, module) { /* +cordova.define("cordova-plugin-splashscreen.SplashScreen", function(require, exports, module) { +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js index aa82acf6..2e1295cd 100644 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js @@ -1,4 +1,5 @@ -cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { var cordova = require('cordova'); +cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { +var cordova = require('cordova'); function SocialSharing() { } diff --git a/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js b/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js index 7aa30fd7..ea60bc9f 100644 --- a/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js +++ b/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js @@ -1,4 +1,5 @@ -cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) { /* global cordova:false */ +cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) { +/* global cordova:false */ /*! * Module dependencies. |
