summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www')
-rw-r--r--StoneIsland/platforms/ios/www/cordova_plugins.js143
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/console-via-logger.js1
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/logger.js1
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-device/www/device.js4
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-dialogs/www/notification.js60
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Position.js2
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/PositionError.js6
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/geolocation.js6
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js155
-rw-r--r--StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js14
-rw-r--r--StoneIsland/platforms/ios/www/plugins/ionic-plugin-keyboard/www/ios/keyboard.js (renamed from StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js)9
-rw-r--r--StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js232
12 files changed, 212 insertions, 421 deletions
diff --git a/StoneIsland/platforms/ios/www/cordova_plugins.js b/StoneIsland/platforms/ios/www/cordova_plugins.js
index c17b360b..b4bf1fc8 100644
--- a/StoneIsland/platforms/ios/www/cordova_plugins.js
+++ b/StoneIsland/platforms/ios/www/cordova_plugins.js
@@ -1,14 +1,6 @@
cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
{
- "id": "com.ionic.keyboard.keyboard",
- "file": "plugins/com.ionic.keyboard/www/keyboard.js",
- "pluginId": "com.ionic.keyboard",
- "clobbers": [
- "cordova.plugins.Keyboard"
- ]
- },
- {
"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",
@@ -17,19 +9,20 @@ module.exports = [
]
},
{
- "id": "cordova-plugin-console.logger",
- "file": "plugins/cordova-plugin-console/www/logger.js",
- "pluginId": "cordova-plugin-console",
+ "id": "cordova-plugin-inappbrowser.inappbrowser",
+ "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js",
+ "pluginId": "cordova-plugin-inappbrowser",
"clobbers": [
- "cordova.logger"
+ "cordova.InAppBrowser.open",
+ "window.open"
]
},
{
- "id": "cordova-plugin-console.console",
- "file": "plugins/cordova-plugin-console/www/console-via-logger.js",
- "pluginId": "cordova-plugin-console",
+ "id": "cordova-plugin-x-socialsharing.SocialSharing",
+ "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js",
+ "pluginId": "cordova-plugin-x-socialsharing",
"clobbers": [
- "console"
+ "window.plugins.socialsharing"
]
},
{
@@ -41,6 +34,22 @@ module.exports = [
]
},
{
+ "id": "cordova-plugin-console.console",
+ "file": "plugins/cordova-plugin-console/www/console-via-logger.js",
+ "pluginId": "cordova-plugin-console",
+ "clobbers": [
+ "console"
+ ]
+ },
+ {
+ "id": "cordova-plugin-console.logger",
+ "file": "plugins/cordova-plugin-console/www/logger.js",
+ "pluginId": "cordova-plugin-console",
+ "clobbers": [
+ "cordova.logger"
+ ]
+ },
+ {
"id": "cordova-plugin-device.device",
"file": "plugins/cordova-plugin-device/www/device.js",
"pluginId": "cordova-plugin-device",
@@ -49,6 +58,23 @@ module.exports = [
]
},
{
+ "id": "cordova-plugin-network-information.network",
+ "file": "plugins/cordova-plugin-network-information/www/network.js",
+ "pluginId": "cordova-plugin-network-information",
+ "clobbers": [
+ "navigator.connection",
+ "navigator.network.connection"
+ ]
+ },
+ {
+ "id": "cordova-plugin-network-information.Connection",
+ "file": "plugins/cordova-plugin-network-information/www/Connection.js",
+ "pluginId": "cordova-plugin-network-information",
+ "clobbers": [
+ "Connection"
+ ]
+ },
+ {
"id": "cordova-plugin-dialogs.notification",
"file": "plugins/cordova-plugin-dialogs/www/notification.js",
"pluginId": "cordova-plugin-dialogs",
@@ -57,6 +83,14 @@ module.exports = [
]
},
{
+ "id": "cordova-plugin-splashscreen.SplashScreen",
+ "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
+ "pluginId": "cordova-plugin-splashscreen",
+ "clobbers": [
+ "navigator.splashscreen"
+ ]
+ },
+ {
"id": "cordova-plugin-geolocation.Coordinates",
"file": "plugins/cordova-plugin-geolocation/www/Coordinates.js",
"pluginId": "cordova-plugin-geolocation",
@@ -89,72 +123,31 @@ module.exports = [
]
},
{
- "id": "cordova-plugin-inappbrowser.inappbrowser",
- "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js",
- "pluginId": "cordova-plugin-inappbrowser",
+ "id": "ionic-plugin-keyboard.keyboard",
+ "file": "plugins/ionic-plugin-keyboard/www/ios/keyboard.js",
+ "pluginId": "ionic-plugin-keyboard",
"clobbers": [
- "cordova.InAppBrowser.open",
- "window.open"
- ]
- },
- {
- "id": "cordova-plugin-network-information.network",
- "file": "plugins/cordova-plugin-network-information/www/network.js",
- "pluginId": "cordova-plugin-network-information",
- "clobbers": [
- "navigator.connection",
- "navigator.network.connection"
- ]
- },
- {
- "id": "cordova-plugin-network-information.Connection",
- "file": "plugins/cordova-plugin-network-information/www/Connection.js",
- "pluginId": "cordova-plugin-network-information",
- "clobbers": [
- "Connection"
- ]
- },
- {
- "id": "cordova-plugin-splashscreen.SplashScreen",
- "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
- "pluginId": "cordova-plugin-splashscreen",
- "clobbers": [
- "navigator.splashscreen"
- ]
- },
- {
- "id": "cordova-plugin-x-socialsharing.SocialSharing",
- "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js",
- "pluginId": "cordova-plugin-x-socialsharing",
- "clobbers": [
- "window.plugins.socialsharing"
- ]
- },
- {
- "id": "phonegap-plugin-push.PushNotification",
- "file": "plugins/phonegap-plugin-push/www/push.js",
- "pluginId": "phonegap-plugin-push",
- "clobbers": [
- "PushNotification"
- ]
+ "cordova.plugins.Keyboard"
+ ],
+ "runs": true
}
];
module.exports.metadata =
// TOP OF METADATA
{
- "com.ionic.keyboard": "1.0.4",
"com.parse.cordova.core.pushplugin": "0.1.0",
- "cordova-plugin-console": "1.0.1",
- "cordova-plugin-customurlscheme": "4.0.0",
- "cordova-plugin-device": "1.0.1",
- "cordova-plugin-dialogs": "1.1.1",
- "cordova-plugin-geolocation": "1.0.1",
- "cordova-plugin-inappbrowser": "1.1.0",
- "cordova-plugin-network-information": "1.0.1",
- "cordova-plugin-splashscreen": "3.0.0",
- "cordova-plugin-whitelist": "1.0.0",
- "cordova-plugin-x-socialsharing": "5.0.7",
- "phonegap-plugin-push": "1.4.4"
+ "cordova-plugin-inappbrowser": "1.5.0",
+ "cordova-plugin-x-socialsharing": "5.1.3",
+ "cordova-plugin-customurlscheme": "4.2.0",
+ "cordova-plugin-whitelist": "1.3.0",
+ "cordova-plugin-console": "1.0.4",
+ "cordova-plugin-device": "1.1.3",
+ "cordova-plugin-network-information": "1.3.0",
+ "cordova-plugin-dialogs": "1.3.0",
+ "cordova-plugin-splashscreen": "4.0.0",
+ "cordova-plugin-compat": "1.1.0",
+ "cordova-plugin-geolocation": "2.4.0",
+ "ionic-plugin-keyboard": "2.2.1"
};
// BOTTOM OF METADATA
}); \ No newline at end of file
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 f7de4b64..0ecd9cc3 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
@@ -23,7 +23,6 @@ cordova.define("cordova-plugin-console.console", function(require, exports, modu
//------------------------------------------------------------------------------
var logger = require("./logger");
-var utils = require("cordova/utils");
//------------------------------------------------------------------------------
// object that we're exporting
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 dd42c01d..deb07b57 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
@@ -44,7 +44,6 @@ cordova.define("cordova-plugin-console.logger", function(require, exports, modul
var logger = exports;
var exec = require('cordova/exec');
-var utils = require('cordova/utils');
var UseConsole = false;
var UseLogger = true;
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 775c123f..977dfc09 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
@@ -43,6 +43,8 @@ function Device() {
this.cordova = null;
this.model = null;
this.manufacturer = null;
+ this.isVirtual = null;
+ this.serial = null;
var me = this;
@@ -57,7 +59,9 @@ function Device() {
me.uuid = info.uuid;
me.cordova = buildLabel;
me.model = info.model;
+ me.isVirtual = info.isVirtual;
me.manufacturer = info.manufacturer || 'unknown';
+ me.serial = info.serial || 'unknown';
channel.onCordovaInfoReady.fire();
},function(e) {
me.available = false;
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 adc5c077..4ddf530b 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
@@ -38,9 +38,10 @@ module.exports = {
* @param {String} buttonLabel Label of the close button (default: OK)
*/
alert: function(message, completeCallback, title, buttonLabel) {
- var _title = (title || "Alert");
+ var _message = (typeof message === "string" ? message : JSON.stringify(message));
+ var _title = (typeof title === "string" ? title : "Alert");
var _buttonLabel = (buttonLabel || "OK");
- exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]);
+ exec(completeCallback, null, "Notification", "alert", [_message, _title, _buttonLabel]);
},
/**
@@ -53,7 +54,8 @@ module.exports = {
* @param {Array} buttonLabels Array of the labels of the buttons (default: ['OK', 'Cancel'])
*/
confirm: function(message, resultCallback, title, buttonLabels) {
- var _title = (title || "Confirm");
+ var _message = (typeof message === "string" ? message : JSON.stringify(message));
+ var _title = (typeof title === "string" ? title : "Confirm");
var _buttonLabels = (buttonLabels || ["OK", "Cancel"]);
// Strings are deprecated!
@@ -61,23 +63,9 @@ module.exports = {
console.log("Notification.confirm(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array).");
}
- // Some platforms take an array of button label names.
- // Other platforms take a comma separated list.
- // For compatibility, we convert to the desired type based on the platform.
- if (platform.id == "amazon-fireos" || platform.id == "android" || platform.id == "ios" ||
- platform.id == "windowsphone" || platform.id == "firefoxos" || platform.id == "ubuntu" ||
- platform.id == "windows8" || platform.id == "windows") {
+ _buttonLabels = convertButtonLabels(_buttonLabels);
- if (typeof _buttonLabels === 'string') {
- _buttonLabels = _buttonLabels.split(","); // not crazy about changing the var type here
- }
- } else {
- if (Array.isArray(_buttonLabels)) {
- var buttonLabelArray = _buttonLabels;
- _buttonLabels = buttonLabelArray.toString();
- }
- }
- exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]);
+ exec(resultCallback, null, "Notification", "confirm", [_message, _title, _buttonLabels]);
},
/**
@@ -93,9 +81,17 @@ module.exports = {
* @param {String} defaultText Textbox input value (default: empty string)
*/
prompt: function(message, resultCallback, title, buttonLabels, defaultText) {
- var _message = (message || "Prompt message");
- var _title = (title || "Prompt");
+ var _message = (typeof message === "string" ? message : JSON.stringify(message));
+ var _title = (typeof title === "string" ? title : "Prompt");
var _buttonLabels = (buttonLabels || ["OK","Cancel"]);
+
+ // Strings are deprecated!
+ if (typeof _buttonLabels === 'string') {
+ console.log("Notification.prompt(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array).");
+ }
+
+ _buttonLabels = convertButtonLabels(_buttonLabels);
+
var _defaultText = (defaultText || "");
exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels, _defaultText]);
},
@@ -112,4 +108,26 @@ module.exports = {
}
};
+function convertButtonLabels(buttonLabels) {
+
+ // Some platforms take an array of button label names.
+ // Other platforms take a comma separated list.
+ // For compatibility, we convert to the desired type based on the platform.
+ if (platform.id == "amazon-fireos" || platform.id == "android" || platform.id == "ios" ||
+ platform.id == "windowsphone" || platform.id == "firefoxos" || platform.id == "ubuntu" ||
+ platform.id == "windows8" || platform.id == "windows") {
+
+ if (typeof buttonLabels === 'string') {
+ buttonLabels = buttonLabels.split(","); // not crazy about changing the var type here
+ }
+ } else {
+ if (Array.isArray(buttonLabels)) {
+ var buttonLabelArray = buttonLabels;
+ buttonLabels = buttonLabelArray.toString();
+ }
+ }
+
+ return buttonLabels;
+}
+
});
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 116abb4f..97c6c2e3 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
@@ -28,7 +28,7 @@ var Position = function(coords, timestamp) {
} else {
this.coords = new Coordinates();
}
- this.timestamp = (timestamp !== undefined) ? timestamp : new Date();
+ this.timestamp = (timestamp !== undefined) ? timestamp : new Date().getTime();
};
module.exports = Position;
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 c335381e..c26dd754 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
@@ -32,9 +32,9 @@ var PositionError = function(code, message) {
this.message = message || '';
};
-PositionError.PERMISSION_DENIED = 1;
-PositionError.POSITION_UNAVAILABLE = 2;
-PositionError.TIMEOUT = 3;
+PositionError.prototype.PERMISSION_DENIED = PositionError.PERMISSION_DENIED = 1;
+PositionError.prototype.POSITION_UNAVAILABLE = PositionError.POSITION_UNAVAILABLE = 2;
+PositionError.prototype.TIMEOUT = PositionError.TIMEOUT = 3;
module.exports = PositionError;
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 37bdaabb..50f1f953 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
@@ -103,7 +103,7 @@ var geolocation = {
velocity:p.velocity,
altitudeAccuracy:p.altitudeAccuracy
},
- (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ p.timestamp
);
geolocation.lastPosition = pos;
successCallback(pos);
@@ -119,7 +119,7 @@ var geolocation = {
// Check our cached position, if its timestamp difference with current time is less than the maximumAge, then just
// fire the success callback with the cached position.
- if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) {
+ if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp) <= options.maximumAge)) {
successCallback(geolocation.lastPosition);
// If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object.
} else if (options.timeout === 0) {
@@ -185,7 +185,7 @@ var geolocation = {
velocity:p.velocity,
altitudeAccuracy:p.altitudeAccuracy
},
- (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp)))
+ p.timestamp
);
geolocation.lastPosition = pos;
successCallback(pos);
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 b18a2ba7..3e87a6e7 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
@@ -20,94 +20,95 @@ cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exp
*
*/
-// special patch to correctly work on Ripple emulator (CB-9760)
-if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021
- module.exports = window.open.bind(window); // fallback to default window.open behaviour
- return;
-}
+(function() {
+ // special patch to correctly work on Ripple emulator (CB-9760)
+ if (window.parent && !!window.parent.ripple) { // https://gist.github.com/triceam/4658021
+ module.exports = window.open.bind(window); // fallback to default window.open behaviour
+ return;
+ }
-var exec = require('cordova/exec');
-var channel = require('cordova/channel');
-var modulemapper = require('cordova/modulemapper');
-var urlutil = require('cordova/urlutil');
+ var exec = require('cordova/exec');
+ var channel = require('cordova/channel');
+ var modulemapper = require('cordova/modulemapper');
+ var urlutil = require('cordova/urlutil');
-function InAppBrowser() {
- this.channels = {
- 'loadstart': channel.create('loadstart'),
- 'loadstop' : channel.create('loadstop'),
- 'loaderror' : channel.create('loaderror'),
- 'exit' : channel.create('exit')
- };
-}
+ function InAppBrowser() {
+ this.channels = {
+ 'loadstart': channel.create('loadstart'),
+ 'loadstop' : channel.create('loadstop'),
+ 'loaderror' : channel.create('loaderror'),
+ 'exit' : channel.create('exit')
+ };
+ }
-InAppBrowser.prototype = {
- _eventHandler: function (event) {
- if (event && (event.type in this.channels)) {
- this.channels[event.type].fire(event);
- }
- },
- close: function (eventname) {
- exec(null, null, "InAppBrowser", "close", []);
- },
- show: function (eventname) {
- exec(null, null, "InAppBrowser", "show", []);
- },
- addEventListener: function (eventname,f) {
- if (eventname in this.channels) {
- this.channels[eventname].subscribe(f);
- }
- },
- removeEventListener: function(eventname, f) {
- if (eventname in this.channels) {
- this.channels[eventname].unsubscribe(f);
- }
- },
+ InAppBrowser.prototype = {
+ _eventHandler: function (event) {
+ if (event && (event.type in this.channels)) {
+ this.channels[event.type].fire(event);
+ }
+ },
+ close: function (eventname) {
+ exec(null, null, "InAppBrowser", "close", []);
+ },
+ show: function (eventname) {
+ exec(null, null, "InAppBrowser", "show", []);
+ },
+ addEventListener: function (eventname,f) {
+ if (eventname in this.channels) {
+ this.channels[eventname].subscribe(f);
+ }
+ },
+ removeEventListener: function(eventname, f) {
+ if (eventname in this.channels) {
+ this.channels[eventname].unsubscribe(f);
+ }
+ },
- executeScript: function(injectDetails, cb) {
- if (injectDetails.code) {
- exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]);
- } else if (injectDetails.file) {
- exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]);
- } else {
- throw new Error('executeScript requires exactly one of code or file to be specified');
- }
- },
+ executeScript: function(injectDetails, cb) {
+ if (injectDetails.code) {
+ exec(cb, null, "InAppBrowser", "injectScriptCode", [injectDetails.code, !!cb]);
+ } else if (injectDetails.file) {
+ exec(cb, null, "InAppBrowser", "injectScriptFile", [injectDetails.file, !!cb]);
+ } else {
+ throw new Error('executeScript requires exactly one of code or file to be specified');
+ }
+ },
- insertCSS: function(injectDetails, cb) {
- if (injectDetails.code) {
- exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]);
- } else if (injectDetails.file) {
- exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]);
- } else {
- throw new Error('insertCSS requires exactly one of code or file to be specified');
+ insertCSS: function(injectDetails, cb) {
+ if (injectDetails.code) {
+ exec(cb, null, "InAppBrowser", "injectStyleCode", [injectDetails.code, !!cb]);
+ } else if (injectDetails.file) {
+ exec(cb, null, "InAppBrowser", "injectStyleFile", [injectDetails.file, !!cb]);
+ } else {
+ throw new Error('insertCSS requires exactly one of code or file to be specified');
+ }
}
- }
-};
-
-module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) {
- // Don't catch calls that write to existing frames (e.g. named iframes).
- if (window.frames && window.frames[strWindowName]) {
- var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open');
- return origOpenFunc.apply(window, arguments);
- }
+ };
- strUrl = urlutil.makeAbsolute(strUrl);
- var iab = new InAppBrowser();
+ module.exports = function(strUrl, strWindowName, strWindowFeatures, callbacks) {
+ // Don't catch calls that write to existing frames (e.g. named iframes).
+ if (window.frames && window.frames[strWindowName]) {
+ var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open');
+ return origOpenFunc.apply(window, arguments);
+ }
- callbacks = callbacks || {};
- for (var callbackName in callbacks) {
- iab.addEventListener(callbackName, callbacks[callbackName]);
- }
+ strUrl = urlutil.makeAbsolute(strUrl);
+ var iab = new InAppBrowser();
- var cb = function(eventname) {
- iab._eventHandler(eventname);
- };
+ callbacks = callbacks || {};
+ for (var callbackName in callbacks) {
+ iab.addEventListener(callbackName, callbacks[callbackName]);
+ }
- strWindowFeatures = strWindowFeatures || "";
+ var cb = function(eventname) {
+ iab._eventHandler(eventname);
+ };
- exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
- return iab;
-};
+ strWindowFeatures = strWindowFeatures || "";
+ exec(cb, cb, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
+ return iab;
+ };
+})();
});
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 2e1295cd..fe0e83ad 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,6 +1,4 @@
cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) {
-var cordova = require('cordova');
-
function SocialSharing() {
}
@@ -26,6 +24,11 @@ SocialSharing.prototype.available = function (callback) {
}, null, "SocialSharing", "available", []);
};
+// this is the recommended way to share as it is the most feature-rich with respect to what you pass in and get back
+SocialSharing.prototype.shareWithOptions = function (options, successCallback, errorCallback) {
+ cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareWithOptions"), "SocialSharing", "shareWithOptions", [options]);
+};
+
SocialSharing.prototype.share = function (message, subject, fileOrFileArray, url, successCallback, errorCallback) {
cordova.exec(successCallback, this._getErrorCallback(errorCallback, "share"), "SocialSharing", "share", [message, subject, this._asArray(fileOrFileArray), url]);
};
@@ -50,7 +53,11 @@ SocialSharing.prototype.shareViaFacebookWithPasteMessageHint = function (message
};
SocialSharing.prototype.shareViaWhatsApp = function (message, fileOrFileArray, url, successCallback, errorCallback) {
- cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsApp"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url]);
+ cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsApp"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, null]);
+};
+
+SocialSharing.prototype.shareViaWhatsAppToReceiver = function (receiver, message, fileOrFileArray, url, successCallback, errorCallback) {
+ cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsAppToReceiver"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, receiver]);
};
SocialSharing.prototype.shareViaSMS = function (options, phonenumbers, successCallback, errorCallback) {
@@ -114,5 +121,4 @@ SocialSharing.install = function () {
};
cordova.addConstructor(SocialSharing.install);
-
});
diff --git a/StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js b/StoneIsland/platforms/ios/www/plugins/ionic-plugin-keyboard/www/ios/keyboard.js
index ad09ae2d..c74bb4d6 100644
--- a/StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js
+++ b/StoneIsland/platforms/ios/www/plugins/ionic-plugin-keyboard/www/ios/keyboard.js
@@ -1,4 +1,4 @@
-cordova.define("com.ionic.keyboard.keyboard", function(require, exports, module) {
+cordova.define("ionic-plugin-keyboard.keyboard", function(require, exports, module) {
var argscheck = require('cordova/argscheck'),
utils = require('cordova/utils'),
@@ -12,12 +12,15 @@ Keyboard.hideKeyboardAccessoryBar = function(hide) {
exec(null, null, "Keyboard", "hideKeyboardAccessoryBar", [hide]);
};
-Keyboard.close = function() {
+Keyboard.close = function() {
exec(null, null, "Keyboard", "close", []);
};
Keyboard.show = function() {
- exec(null, null, "Keyboard", "show", []);
+ console.warn('Showing keyboard not supported in iOS due to platform limitations.')
+ console.warn('Instead, use input.focus(), and ensure that you have the following setting in your config.xml: \n');
+ console.warn(' <preference name="KeyboardDisplayRequiresUserAction" value="false"/>\n');
+ // exec(null, null, "Keyboard", "show", []);
};
Keyboard.disableScroll = function(disable) {
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
deleted file mode 100644
index ea60bc9f..00000000
--- a/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js
+++ /dev/null
@@ -1,232 +0,0 @@
-cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) {
-/* global cordova:false */
-
-/*!
- * Module dependencies.
- */
-
-var exec = cordova.require('cordova/exec');
-
-/**
- * PushNotification constructor.
- *
- * @param {Object} options to initiate Push Notifications.
- * @return {PushNotification} instance that can be monitored and cancelled.
- */
-
-var PushNotification = function(options) {
- this._handlers = {
- 'registration': [],
- 'notification': [],
- 'error': []
- };
-
- // require options parameter
- if (typeof options === 'undefined') {
- throw new Error('The options argument is required.');
- }
-
- // store the options to this object instance
- this.options = options;
-
- // triggered on registration and notification
- var that = this;
- var success = function(result) {
- if (result && typeof result.registrationId !== 'undefined') {
- that.emit('registration', result);
- } else if (result && typeof result.callback !== 'undefined') {
- var executeFunctionByName = function(functionName, context /*, args */) {
- var args = Array.prototype.slice.call(arguments, 2);
- var namespaces = functionName.split(".");
- var func = namespaces.pop();
- for (var i = 0; i < namespaces.length; i++) {
- context = context[namespaces[i]];
- }
- return context[func].apply(context, args);
- }
-
- executeFunctionByName(result.callback, window, result);
- } else if (result) {
- that.emit('notification', result);
- }
- };
-
- // triggered on error
- var fail = function(msg) {
- var e = (typeof msg === 'string') ? new Error(msg) : msg;
- that.emit('error', e);
- };
-
- // wait at least one process tick to allow event subscriptions
- setTimeout(function() {
- exec(success, fail, 'PushNotification', 'init', [options]);
- }, 10);
-};
-
-/**
- * Unregister from push notifications
- */
-
-PushNotification.prototype.unregister = function(successCallback, errorCallback, options) {
- if (errorCallback == null) { errorCallback = function() {}}
-
- if (typeof errorCallback != "function") {
- console.log("PushNotification.unregister failure: failure parameter not a function");
- return
- }
-
- if (typeof successCallback != "function") {
- console.log("PushNotification.unregister failure: success callback parameter must be a function");
- return
- }
-
- exec(successCallback, errorCallback, "PushNotification", "unregister", [options]);
-};
-
-/**
- * Call this to set the application icon badge
- */
-
-PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, errorCallback, badge) {
- if (errorCallback == null) { errorCallback = function() {}}
-
- if (typeof errorCallback != "function") {
- console.log("PushNotification.setApplicationIconBadgeNumber failure: failure parameter not a function");
- return
- }
-
- if (typeof successCallback != "function") {
- console.log("PushNotification.setApplicationIconBadgeNumber failure: success callback parameter must be a function");
- return
- }
-
- exec(successCallback, errorCallback, "PushNotification", "setApplicationIconBadgeNumber", [{badge: badge}]);
-};
-
-/**
- * Get the application icon badge
- */
-
-PushNotification.prototype.getApplicationIconBadgeNumber = function(successCallback, errorCallback) {
- if (errorCallback == null) { errorCallback = function() {}}
-
- if (typeof errorCallback != "function") {
- console.log("PushNotification.getApplicationIconBadgeNumber failure: failure parameter not a function");
- return
- }
-
- if (typeof successCallback != "function") {
- console.log("PushNotification.getApplicationIconBadgeNumber failure: success callback parameter must be a function");
- return
- }
-
- exec(successCallback, errorCallback, "PushNotification", "getApplicationIconBadgeNumber", []);
-};
-
-/**
- * Listen for an event.
- *
- * The following events are supported:
- *
- * - registration
- * - notification
- * - error
- *
- * @param {String} eventName to subscribe to.
- * @param {Function} callback triggered on the event.
- */
-
-PushNotification.prototype.on = function(eventName, callback) {
- if (this._handlers.hasOwnProperty(eventName)) {
- this._handlers[eventName].push(callback);
- }
-};
-
-/**
- * Remove event listener.
- *
- * @param {String} eventName to match subscription.
- * @param {Function} handle function associated with event.
- */
-
-PushNotification.prototype.off = function (eventName, handle) {
- if (this._handlers.hasOwnProperty(eventName)) {
- var handleIndex = this._handlers[eventName].indexOf(handle);
- if (handleIndex >= 0)
- this._handlers[eventName].splice(handleIndex, 1);
- }
-};
-
-/**
- * Emit an event.
- *
- * This is intended for internal use only.
- *
- * @param {String} eventName is the event to trigger.
- * @param {*} all arguments are passed to the event listeners.
- *
- * @return {Boolean} is true when the event is triggered otherwise false.
- */
-
-PushNotification.prototype.emit = function() {
- var args = Array.prototype.slice.call(arguments);
- var eventName = args.shift();
-
- if (!this._handlers.hasOwnProperty(eventName)) {
- return false;
- }
-
- for (var i = 0, length = this._handlers[eventName].length; i < length; i++) {
- this._handlers[eventName][i].apply(undefined,args);
- }
-
- return true;
-};
-
-PushNotification.prototype.finish = function(successCallback, errorCallback) {
- if (successCallback == null) { successCallback = function() {}}
- if (errorCallback == null) { errorCallback = function() {}}
-
- if (typeof successCallback != "function") {
- console.log("finish failure: success callback parameter must be a function");
- return
- }
-
- if (typeof errorCallback != "function") {
- console.log("finish failure: failure parameter not a function");
- return
- }
-
- exec(successCallback, errorCallback, 'PushNotification', 'finish', []);
-}
-
-/*!
- * Push Notification Plugin.
- */
-
-module.exports = {
- /**
- * Register for Push Notifications.
- *
- * This method will instantiate a new copy of the PushNotification object
- * and start the registration process.
- *
- * @param {Object} options
- * @return {PushNotification} instance
- */
-
- init: function(options) {
- return new PushNotification(options);
- },
-
- /**
- * PushNotification Object.
- *
- * Expose the PushNotification object for direct use
- * and testing. Typically, you should use the
- * .init helper method.
- */
-
- PushNotification: PushNotification
-};
-});