You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/03/20 16:48:45 UTC

[01/40] js commit: [all] Minor clean-up in bootstrap. No logic change.

Updated Branches:
  refs/heads/cb2227 0ca992e97 -> cce90cfc2 (forced update)


[all] Minor clean-up in bootstrap. No logic change.

It was waiting on onNativeReady twice. Once explicitly, and once by the
channel.join().

This also removes the _self object, which did nothing.


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

Branch: refs/heads/cb2227
Commit: ad13c9a13d62fff4fa170d8b8ac7bb2bc587144a
Parents: c218442
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 08:44:59 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Feb 21 08:44:59 2013 -0500

----------------------------------------------------------------------
 lib/scripts/bootstrap.js |   58 ++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ad13c9a1/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 45c70aa..396862e 100644
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -28,38 +28,7 @@
         context.navigator = new CordovaNavigator();
     }
 
-    var channel = require("cordova/channel"),
-        _self = {
-            boot: function () {
-                /**
-                 * Create all cordova objects once page has fully loaded and native side is ready.
-                 */
-                channel.join(function() {
-                    var builder = require('cordova/builder'),
-                        platform = require('cordova/platform');
-
-                    builder.buildIntoButDoNotClobber(platform.defaults, context);
-                    builder.buildIntoAndClobber(platform.clobbers, context);
-                    builder.buildIntoAndMerge(platform.merges, context);
-
-                    // Call the platform-specific initialization
-                    platform.initialize();
-
-                    // Fire event to notify that all objects are created
-                    channel.onCordovaReady.fire();
-
-                    // Fire onDeviceReady event once all constructors have run and
-                    // cordova info has been received from native side.
-                    channel.join(function() {
-                        require('cordova').fireDocumentEvent('deviceready');
-                    }, channel.deviceReadyChannelsArray);
-
-                }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
-            }
-        };
-
-    // boot up once native side is ready
-    channel.onNativeReady.subscribe(_self.boot);
+    var channel = require("cordova/channel");
 
     // _nativeReady is global variable that the native side can set
     // to signify that the native code is ready. It is a global since
@@ -68,4 +37,29 @@
         channel.onNativeReady.fire();
     }
 
+    /**
+     * Create all cordova objects once page has fully loaded and native side is ready.
+     */
+    channel.join(function() {
+        var builder = require('cordova/builder'),
+            platform = require('cordova/platform');
+
+        builder.buildIntoButDoNotClobber(platform.defaults, context);
+        builder.buildIntoAndClobber(platform.clobbers, context);
+        builder.buildIntoAndMerge(platform.merges, context);
+
+        // Call the platform-specific initialization
+        platform.initialize();
+
+        // Fire event to notify that all objects are created
+        channel.onCordovaReady.fire();
+
+        // Fire onDeviceReady event once all constructors have run and
+        // cordova info has been received from native side.
+        channel.join(function() {
+            require('cordova').fireDocumentEvent('deviceready');
+        }, channel.deviceReadyChannelsArray);
+
+    }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
+
 }(window));


[05/40] js commit: [2526] Ensure navigator keeps "this" object for native functions

Posted by ag...@apache.org.
[2526] Ensure navigator keeps "this" object for native functions


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

Branch: refs/heads/cb2227
Commit: efefa97dfe97a05aaad7d2d283b672ebf313a8f7
Parents: 6abe4c9
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Feb 22 14:01:40 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Feb 22 14:01:40 2013 -0500

----------------------------------------------------------------------
 lib/scripts/bootstrap.js |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/efefa97d/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 437604d..6213165 100644
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -22,10 +22,23 @@
 (function (context) {
     // Replace navigator before any modules are required(), to ensure it happens as soon as possible.
     // We replace it so that properties that can't be clobbered can instead be overridden.
-    if (context.navigator) {
+    function replaceNavigator(origNavigator) {
         var CordovaNavigator = function() {};
-        CordovaNavigator.prototype = context.navigator;
-        context.navigator = new CordovaNavigator();
+        CordovaNavigator.prototype = origNavigator;
+        var newNavigator = new CordovaNavigator();
+        // This work-around really only applies to new APIs that are newer than Function.bind.
+        // Without it, APIs such as getGamepads() break.
+        if (CordovaNavigator.bind) {
+            for (var key in origNavigator) {
+                if (typeof origNavigator[key] == 'function') {
+                    newNavigator[key] = origNavigator[key].bind(origNavigator);
+                }
+            }
+        }
+        return newNavigator;
+    }
+    if (context.navigator) {
+        context.navigator = replaceNavigator(context.navigator);
     }
 
     var channel = require("cordova/channel");


[38/40] js commit: [windowsphone] modulemapper refactor for console.

Posted by ag...@apache.org.
[windowsphone] modulemapper refactor for console.


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

Branch: refs/heads/cb2227
Commit: f08ba5764c05ae6692b98767248ac7cee3fb882b
Parents: 06a0b40
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:28 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:44:07 2013 -0400

----------------------------------------------------------------------
 lib/windowsphone/platform.js                       |   11 +-----
 .../plugin/windowsphone/console/symbols.js         |   25 +++++++++++++++
 2 files changed, 27 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f08ba576/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index 6f26531..2fb103c 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -39,15 +39,8 @@ module.exports = {
         };
     },
     clobbers: {
-        navigator: {
-            children: {
-                console: {
-                    path: "cordova/plugin/windowsphone/console"
-                }
-            }
-        },
-        console:{
-          path: "cordova/plugin/windowsphone/console"
+        CordovaCommandResult: {
+            path:"cordova/plugin/windowsphone/CordovaCommandResult"
         },
         FileTransfer: {
             path: 'cordova/plugin/windowsphone/FileTransfer'

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f08ba576/lib/windowsphone/plugin/windowsphone/console/symbols.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/console/symbols.js b/lib/windowsphone/plugin/windowsphone/console/symbols.js
new file mode 100644
index 0000000..5990b72
--- /dev/null
+++ b/lib/windowsphone/plugin/windowsphone/console/symbols.js
@@ -0,0 +1,25 @@
+/*
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/windowsphone/console', 'navigator.console');
+modulemapper.clobbers('cordova/plugin/windowsphone/console', 'console');


[26/40] js commit: [CB-1933] Changed button labels to an array.

Posted by ag...@apache.org.
[CB-1933] Changed button labels to an array.

This allows commas to be included in button label text.
The use of comma-separated strings for this purpose is deprecated.


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

Branch: refs/heads/cb2227
Commit: d79881dc27eae933103b0841e47af68319d08de8
Parents: 0b88895
Author: Max Woghiren <ma...@gmail.com>
Authored: Fri Feb 15 15:16:28 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Mar 14 11:32:42 2013 -0400

----------------------------------------------------------------------
 lib/common/plugin/notification.js |   25 +++++++++++++++++++++++--
 test/test.notification.js         |    2 +-
 2 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/d79881dc/lib/common/plugin/notification.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/notification.js b/lib/common/plugin/notification.js
index fbf9046..16b3877 100644
--- a/lib/common/plugin/notification.js
+++ b/lib/common/plugin/notification.js
@@ -20,6 +20,7 @@
 */
 
 var exec = require('cordova/exec');
+var platform = require('cordova/platform');
 
 /**
  * Provides access to notifications on the device.
@@ -48,11 +49,31 @@ module.exports = {
      * @param {String} message              Message to print in the body of the alert
      * @param {Function} resultCallback     The callback that is called when user clicks on a button.
      * @param {String} title                Title of the alert dialog (default: Confirm)
-     * @param {String} buttonLabels         Comma separated list of the labels of the buttons (default: 'OK,Cancel')
+     * @param {Array} buttonLabels          Array of the labels of the buttons (default: ['OK', 'Cancel'])
      */
     confirm: function(message, resultCallback, title, buttonLabels) {
         var _title = (title || "Confirm");
-        var _buttonLabels = (buttonLabels || "OK,Cancel");
+        var _buttonLabels = (buttonLabels || ["OK", "Cancel"]);
+
+        // Strings are deprecated!
+        if (typeof _buttonLabels === 'string') {
+            console.log("Notification.confirm(string, function, string, string) is deprecated.  Use Notification.confirm(string, function, string, array).");
+        }
+
+        // Android and iOS 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 == "android" || platform.id == "ios") {
+            if (typeof _buttonLabels === 'string') {
+                var buttonLabelString = _buttonLabels;
+                _buttonLabels = buttonLabelString.split(",");
+            }
+        } else {
+            if (Array.isArray(_buttonLabels)) {
+                var buttonLabelArray = _buttonLabels;
+                _buttonLabels = buttonLabelArray.toString();
+            }
+        }
         exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]);
     },
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/d79881dc/test/test.notification.js
----------------------------------------------------------------------
diff --git a/test/test.notification.js b/test/test.notification.js
index 1ab5ef5..7e670b9 100644
--- a/test/test.notification.js
+++ b/test/test.notification.js
@@ -50,7 +50,7 @@ describe("notification", function () {
 
         it("passes the provided params to the exec method", function () {
             var cb = jasmine.createSpy();
-            notification.confirm("and thats the way it is", cb, "It's like that", "Yes,Yes");
+            notification.confirm("and thats the way it is", cb, "It's like that", ["Yes", "Yes"]);
             expect(exec).toHaveBeenCalledWith(
                 cb, null, "Notification", "confirm",
                 ["and thats the way it is", "It's like that", "Yes,Yes"]);


[32/40] js commit: [win8] modulemapper refactor for App plugin.

Posted by ag...@apache.org.
[win8] modulemapper refactor for App plugin.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/2dea9283
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/2dea9283
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/2dea9283

Branch: refs/heads/cb2227
Commit: 2dea9283f341432a4ddd9ae3977955421e2bde65
Parents: 5f40578
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:07 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:42:18 2013 -0400

----------------------------------------------------------------------
 lib/windows8/platform.js                        |    7 -----
 lib/windows8/plugin/windows8/console/symbols.js |   24 ++++++++++++++++++
 2 files changed, 24 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2dea9283/lib/windows8/platform.js
----------------------------------------------------------------------
diff --git a/lib/windows8/platform.js b/lib/windows8/platform.js
index 03d83bc..f3626db 100755
--- a/lib/windows8/platform.js
+++ b/lib/windows8/platform.js
@@ -75,13 +75,6 @@ module.exports = {
                     path: 'cordova/commandProxy'
                 }
             }
-        },
-        navigator: {
-            children: {
-                console: {
-                    path: "cordova/plugin/windows8/console"
-                }
-            }
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2dea9283/lib/windows8/plugin/windows8/console/symbols.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/console/symbols.js b/lib/windows8/plugin/windows8/console/symbols.js
new file mode 100644
index 0000000..c91f429
--- /dev/null
+++ b/lib/windows8/plugin/windows8/console/symbols.js
@@ -0,0 +1,24 @@
+/*
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/windows8/console', 'navigator.console');


[19/40] js commit: [CB-2621] Added OS X platform

Posted by ag...@apache.org.
[CB-2621] Added OS X platform


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/090ab873
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/090ab873
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/090ab873

Branch: refs/heads/cb2227
Commit: 090ab8737ec27d33609b69d2b7d01fe4567c1511
Parents: d53601e
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 5 17:40:08 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 5 17:40:08 2013 -0800

----------------------------------------------------------------------
 Jakefile            |    1 +
 build/packager.js   |    1 +
 lib/osx/exec.js     |  124 ++++++++++++++++++++++++++++++++++++++++++++++
 lib/osx/platform.js |   33 ++++++++++++
 package.json        |    4 ++
 5 files changed, 163 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/090ab873/Jakefile
----------------------------------------------------------------------
diff --git a/Jakefile b/Jakefile
index aec4b69..5acee33 100644
--- a/Jakefile
+++ b/Jakefile
@@ -96,6 +96,7 @@ task('build', ['clean', 'hint', 'update-version'], function () {
         packager.generate("bada",commitId);
         packager.generate("tizen",commitId);
         packager.generate("webos", commitId);
+        packager.generate("osx", commitId);
         packager.generate("errgen",commitId);
         packager.generate("test",commitId);
         complete();

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/090ab873/build/packager.js
----------------------------------------------------------------------
diff --git a/build/packager.js b/build/packager.js
index b630f5b..c5f1636 100644
--- a/build/packager.js
+++ b/build/packager.js
@@ -64,6 +64,7 @@ packager.bundle = function(platform, debug, commitId ) {
         copyProps(modules, collectFiles(path.join('lib', 'ios', 'plugin', 'ios'), 'plugin/ios/'));
         copyProps(modules, collectFiles(path.join('lib', 'bada', 'plugin', 'bada'), 'plugin/bada/'));
         copyProps(modules, collectFiles(path.join('lib', 'android', 'plugin', 'android'), 'plugin/android/'));
+        copyProps(modules, collectFiles(path.join('lib', 'osx', 'plugin', 'osx'), 'plugin/osx/'));
     }
     else {
         copyProps(modules, collectFiles(path.join('lib', platform)))

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/090ab873/lib/osx/exec.js
----------------------------------------------------------------------
diff --git a/lib/osx/exec.js b/lib/osx/exec.js
new file mode 100644
index 0000000..facb1c4
--- /dev/null
+++ b/lib/osx/exec.js
@@ -0,0 +1,124 @@
+/*
+ *
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+/**
+ * Creates a gap bridge used to notify the native code about commands.
+
+ * @private
+ */
+var cordova = require('cordova'),
+    channel = require('cordova/channel'),
+    utils = require('cordova/utils');
+
+
+function massageMessageNativeToJs(message) {
+    if (message.CDVType == 'ArrayBuffer') {
+        var stringToArrayBuffer = function(str) {
+            var ret = new Uint8Array(str.length);
+            for (var i = 0; i < str.length; i++) {
+                ret[i] = str.charCodeAt(i);
+            }
+            return ret.buffer;
+        };
+        var base64ToArrayBuffer = function(b64) {
+            return stringToArrayBuffer(atob(b64));
+        };
+        message = base64ToArrayBuffer(message.data);
+    }
+    return message;
+}
+
+function convertMessageToArgsNativeToJs(message) {
+    var args = [];
+    if (!message || !message.hasOwnProperty('CDVType')) {
+        args.push(message);
+    } else if (message.CDVType == 'MultiPart') {
+        message.messages.forEach(function(e) {
+            args.push(massageMessageNativeToJs(e));
+        });
+    } else {
+        args.push(massageMessageNativeToJs(message));
+    }
+    return args;
+}
+
+function massageArgsJsToNative(args) {
+    if (!args || utils.typeName(args) != 'Array') {
+       return args;
+    }
+    var ret = [];
+    var encodeArrayBufferAs8bitString = function(ab) {
+        return String.fromCharCode.apply(null, new Uint8Array(ab));
+    };
+    var encodeArrayBufferAsBase64 = function(ab) {
+        return window.btoa(encodeArrayBufferAs8bitString(ab));
+    };
+    args.forEach(function(arg, i) {
+        if (utils.typeName(arg) == 'ArrayBuffer') {
+            ret.push({
+                'CDVType': 'ArrayBuffer',
+                'data': encodeArrayBufferAsBase64(arg)
+            });
+        } else {
+            ret.push(arg);
+        }
+    });
+    return ret;
+}
+
+function OSXExec() {
+
+    var successCallback, failCallback, service, action, actionArgs, splitCommand;
+    var callbackId = 'INVALID';
+
+    successCallback = arguments[0];
+    failCallback = arguments[1];
+    service = arguments[2];
+    action = arguments[3];
+    actionArgs = arguments[4];
+
+    // Register the callbacks and add the callbackId to the positional
+    // arguments if given.
+    if (successCallback || failCallback) {
+        callbackId = service + cordova.callbackId++;
+        cordova.callbacks[callbackId] =
+            {success:successCallback, fail:failCallback};
+    }
+
+     actionArgs = massageArgsJsToNative(actionArgs);
+
+    if (window.cordovabridge && window.cordovabridge.exec) {
+        window.cordovabridge.exec(callbackId, service, action, actionArgs);
+    } else {
+        alert('window.cordovabridge binding is missing.');
+    }
+}
+
+
+OSXExec.nativeCallback = function(callbackId, status, message, keepCallback) {
+    return (function() {
+        var success = status === 0 || status === 1;
+        var args = convertMessageToArgsNativeToJs(message);
+        cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
+    });
+};
+
+module.exports = OSXExec;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/090ab873/lib/osx/platform.js
----------------------------------------------------------------------
diff --git a/lib/osx/platform.js b/lib/osx/platform.js
new file mode 100644
index 0000000..be40bf5
--- /dev/null
+++ b/lib/osx/platform.js
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+module.exports = {
+    id: "osx",
+    initialize:function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
+    }
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/090ab873/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 938412d..2565cf9 100644
--- a/package.json
+++ b/package.json
@@ -47,6 +47,10 @@
     {
       "name":"Dan Silivestru",
       "email":"dansilivestru@apache.org"
+    },
+    {
+      "name":"Shazron Abdullah",
+      "email":"shazron@apache.org"
     }
   ],
   "dependencies": {


[27/40] js commit: [CB-1686] Added a camera direction option.

Posted by ag...@apache.org.
[CB-1686] Added a camera direction option.


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

Branch: refs/heads/cb2227
Commit: ee045175931ab6b6f21f0321a26579d9273aafdd
Parents: d79881d
Author: Max Woghiren <ma...@gmail.com>
Authored: Wed Mar 13 14:27:34 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Mar 14 13:55:50 2013 -0400

----------------------------------------------------------------------
 lib/common/plugin/Camera.js          |    3 ++-
 lib/common/plugin/CameraConstants.js |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ee045175/lib/common/plugin/Camera.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Camera.js b/lib/common/plugin/Camera.js
index 5794b91..b197bd7 100644
--- a/lib/common/plugin/Camera.js
+++ b/lib/common/plugin/Camera.js
@@ -57,9 +57,10 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
     var correctOrientation = !!options.correctOrientation;
     var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
     var popoverOptions = getValue(options.popoverOptions, null);
+    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
 
     var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
-                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions];
+                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions, cameraDirection];
 
     exec(successCallback, errorCallback, "Camera", "takePicture", args);
     return new CameraPopoverHandle();

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ee045175/lib/common/plugin/CameraConstants.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CameraConstants.js b/lib/common/plugin/CameraConstants.js
index ac23926..ae4e534 100644
--- a/lib/common/plugin/CameraConstants.js
+++ b/lib/common/plugin/CameraConstants.js
@@ -45,5 +45,9 @@ module.exports = {
       ARROW_LEFT : 4,
       ARROW_RIGHT : 8,
       ARROW_ANY : 15
+  },
+  Direction:{
+      BACK: 0,
+      FRONT: 1
   }
 };


[07/40] js commit: CB-2103: File Transfer didn't send the body to the FileTransferError constructor.

Posted by ag...@apache.org.
CB-2103: File Transfer didn't send the body to the FileTransferError constructor.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/91d53eb6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/91d53eb6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/91d53eb6

Branch: refs/heads/cb2227
Commit: 91d53eb6f26cd097caed3d11561bf026326fc1a4
Parents: cded0ad
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Feb 22 11:46:25 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Feb 22 11:46:25 2013 -0800

----------------------------------------------------------------------
 lib/common/plugin/FileTransfer.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/91d53eb6/lib/common/plugin/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/FileTransfer.js b/lib/common/plugin/FileTransfer.js
index 7e7af61..3a9fda2 100644
--- a/lib/common/plugin/FileTransfer.js
+++ b/lib/common/plugin/FileTransfer.js
@@ -79,7 +79,7 @@ FileTransfer.prototype.upload = function(filePath, server, successCallback, erro
     }
 
     var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status);
+        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
         errorCallback(error);
     };
 
@@ -129,7 +129,7 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
     };
 
     var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status);
+        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
         errorCallback(error);
     };
 


[09/40] js commit: CB-2530 and CB-2239 Multipart plugin result

Posted by ag...@apache.org.
CB-2530 and CB-2239 Multipart plugin result

This patch does a bunch:
* [ios&android] Adds support for multiple argument callbacks for
  win/fail (by way of updating callbackFromNative)
* Adds MultiPart message type, which supports an array or return
  arguments from a plugin result (and will massage each argument, such
  as ArrayBuffers)
* Update Echo plugin to test MultiPart messages


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

Branch: refs/heads/cb2227
Commit: f4142e7d76abfbc1082c7b79732a7fe62d4e4e58
Parents: aa5548f
Author: Michal Mocny <mm...@gmail.com>
Authored: Mon Feb 25 13:22:41 2013 -0500
Committer: Michal Mocny <mm...@gmail.com>
Committed: Mon Feb 25 13:25:32 2013 -0500

----------------------------------------------------------------------
 lib/android/exec.js       |    2 +-
 lib/common/plugin/echo.js |   25 ++++++++++++++++++++-----
 lib/cordova.js            |   10 +++++-----
 lib/ios/exec.js           |   37 +++++++++++++++++++++++++++----------
 4 files changed, 53 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f4142e7d/lib/android/exec.js
----------------------------------------------------------------------
diff --git a/lib/android/exec.js b/lib/android/exec.js
index 506fd3d..7a101c6 100644
--- a/lib/android/exec.js
+++ b/lib/android/exec.js
@@ -203,7 +203,7 @@ function processMessage(message) {
             } else {
                 payload = JSON.parse(message.slice(nextSpaceIdx + 1));
             }
-            cordova.callbackFromNative(callbackId, success, status, payload, keepCallback);
+            cordova.callbackFromNative(callbackId, success, status, [payload], keepCallback);
         } else {
             console.log("processMessage failed: invalid message:" + message);
         }

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f4142e7d/lib/common/plugin/echo.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/echo.js b/lib/common/plugin/echo.js
index 87a495f..76fe3f0 100644
--- a/lib/common/plugin/echo.js
+++ b/lib/common/plugin/echo.js
@@ -19,7 +19,8 @@
  *
 */
 
-var exec = require('cordova/exec');
+var exec = require('cordova/exec'),
+    utils = require('cordova/utils');
 
 /**
  * Sends the given message through exec() to the Echo plugin, which sends it back to the successCallback.
@@ -29,10 +30,24 @@ var exec = require('cordova/exec');
  * @param forceAsync  Whether to force an async return value (for testing native->js bridge).
  */
 module.exports = function(successCallback, errorCallback, message, forceAsync) {
-    var action = forceAsync ? 'echoAsync' : 'echo';
-    if (!forceAsync && message.constructor == ArrayBuffer) {
-        action = 'echoArrayBuffer';
+    var action = 'echo';
+    var messageIsMultipart = (utils.typeName(message) == "Array");
+    var args = messageIsMultipart ? message : [message];
+
+    if (utils.typeName(message) == 'ArrayBuffer') {
+        if (forceAsync) {
+            console.warn('Cannot echo ArrayBuffer with forced async, falling back to sync.');
+        }
+        action += 'ArrayBuffer';
+    } else if (messageIsMultipart) {
+        if (forceAsync) {
+            console.warn('Cannot echo MultiPart Array with forced async, falling back to sync.');
+        }
+        action += 'MultiPart';
+    } else if (forceAsync) {
+        action += 'Async';
     }
-    exec(successCallback, errorCallback, "Echo", action, [message]);
+
+    exec(successCallback, errorCallback, "Echo", action, args);
 };
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f4142e7d/lib/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova.js b/lib/cordova.js
index ef68b2b..a31c40e 100644
--- a/lib/cordova.js
+++ b/lib/cordova.js
@@ -189,7 +189,7 @@ var cordova = {
      */
     callbackSuccess: function(callbackId, args) {
         try {
-            cordova.callbackFromNative(callbackId, true, args.status, args.message, args.keepCallback);
+            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
         } catch (e) {
             console.log("Error in error callback: " + callbackId + " = "+e);
         }
@@ -202,7 +202,7 @@ var cordova = {
         // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
         // Derive success from status.
         try {
-            cordova.callbackFromNative(callbackId, false, args.status, args.message, args.keepCallback);
+            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
         } catch (e) {
             console.log("Error in error callback: " + callbackId + " = "+e);
         }
@@ -211,13 +211,13 @@ var cordova = {
     /**
      * Called by native code when returning the result from an action.
      */
-    callbackFromNative: function(callbackId, success, status, message, keepCallback) {
+    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
         var callback = cordova.callbacks[callbackId];
         if (callback) {
             if (success && status == cordova.callbackStatus.OK) {
-                callback.success && callback.success(message);
+                callback.success && callback.success.apply(null, args);
             } else if (!success) {
-                callback.fail && callback.fail(message);
+                callback.fail && callback.fail.apply(null, args);
             }
 
             // Clear callback if not expecting any more results

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f4142e7d/lib/ios/exec.js
----------------------------------------------------------------------
diff --git a/lib/ios/exec.js b/lib/ios/exec.js
index 58e73d2..5e237d9 100644
--- a/lib/ios/exec.js
+++ b/lib/ios/exec.js
@@ -68,6 +68,7 @@ function massageArgsJsToNative(args) {
     if (!args || utils.typeName(args) != 'Array') {
        return args;
     }
+    var ret = [];
     var encodeArrayBufferAs8bitString = function(ab) {
         return String.fromCharCode.apply(null, new Uint8Array(ab));
     };
@@ -76,17 +77,19 @@ function massageArgsJsToNative(args) {
     };
     args.forEach(function(arg, i) {
         if (utils.typeName(arg) == 'ArrayBuffer') {
-            args[i] = {
+            ret.push({
                 'CDVType': 'ArrayBuffer',
                 'data': encodeArrayBufferAsBase64(arg)
-            };
+            });
+        } else {
+            ret.push(arg);
         }
     });
-    return args;
+    return ret;
 }
 
-function massagePayloadNativeToJs(payload) {
-    if (payload && payload.hasOwnProperty('CDVType') && payload.CDVType == 'ArrayBuffer') {
+function massageMessageNativeToJs(message) {
+    if (message.CDVType == 'ArrayBuffer') {
         var stringToArrayBuffer = function(str) {
             var ret = new Uint8Array(str.length);
             for (var i = 0; i < str.length; i++) {
@@ -97,9 +100,23 @@ function massagePayloadNativeToJs(payload) {
         var base64ToArrayBuffer = function(b64) {
             return stringToArrayBuffer(atob(b64));
         };
-        payload = base64ToArrayBuffer(payload.data);
+        message = base64ToArrayBuffer(message.data);
     }
-    return payload;
+    return message;
+}
+
+function convertMessageToArgsNativeToJs(message) {
+    var args = [];
+    if (!message || !message.hasOwnProperty('CDVType')) {
+        args.push(message);
+    } else if (message.CDVType == 'MultiPart') {
+        message.messages.forEach(function(e) {
+            args.push(massageMessageNativeToJs(e));
+        });
+    } else {
+        args.push(massageMessageNativeToJs(message));
+    }
+    return args;
 }
 
 function iOSExec() {
@@ -206,11 +223,11 @@ iOSExec.nativeFetchMessages = function() {
     return json;
 };
 
-iOSExec.nativeCallback = function(callbackId, status, payload, keepCallback) {
+iOSExec.nativeCallback = function(callbackId, status, message, keepCallback) {
     return iOSExec.nativeEvalAndFetch(function() {
         var success = status === 0 || status === 1;
-        payload = massagePayloadNativeToJs(payload);
-        cordova.callbackFromNative(callbackId, success, status, payload, keepCallback);
+        var args = convertMessageToArgsNativeToJs(message);
+        cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
     });
 };
 


[03/40] js commit: merging iOS popover change [CB-2411]

Posted by ag...@apache.org.
merging iOS popover change [CB-2411]


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/48220f8b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/48220f8b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/48220f8b

Branch: refs/heads/cb2227
Commit: 48220f8b949cdd2824483ff5312720b846f56b21
Parents: ad13c9a 73b6ece
Author: Becky Gibson <be...@apache.org>
Authored: Thu Feb 21 13:52:12 2013 -0500
Committer: Becky Gibson <be...@apache.org>
Committed: Thu Feb 21 13:52:12 2013 -0500

----------------------------------------------------------------------
 lib/common/plugin/Camera.js              |    4 ++-
 lib/common/plugin/CameraPopoverHandle.js |   33 ++++++++++++++++++++++++
 lib/ios/plugin/CameraPopoverHandle.js    |   34 +++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 1 deletions(-)
----------------------------------------------------------------------



[24/40] js commit: CB-2595: Prompt mode emits confusing log message When Android switches to PROMPT mode, the log message causes confusion for users, especially for those having to support Gingerbread. It is tough though since it can be a legitimate erro

Posted by ag...@apache.org.
CB-2595: Prompt mode emits confusing log message
When Android switches to PROMPT mode, the log message causes confusion
for users, especially for those having to support Gingerbread. It is tough
though since it can be a legitimate error when restoring state.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/0b88895e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/0b88895e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/0b88895e

Branch: refs/heads/cb2227
Commit: 0b88895ed43e9a04b68b91f2c4c0a6a72d3bf2a4
Parents: 22aa62f
Author: mbillau <mi...@gmail.com>
Authored: Thu Feb 28 15:28:23 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 13 11:20:33 2013 -0400

----------------------------------------------------------------------
 lib/android/exec.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/0b88895e/lib/android/exec.js
----------------------------------------------------------------------
diff --git a/lib/android/exec.js b/lib/android/exec.js
index 7a101c6..90ea186 100644
--- a/lib/android/exec.js
+++ b/lib/android/exec.js
@@ -142,7 +142,7 @@ androidExec.nativeToJsModes = nativeToJsModes;
 
 androidExec.setJsToNativeBridgeMode = function(mode) {
     if (mode == jsToNativeModes.JS_OBJECT && !window._cordovaNative) {
-        console.log('Falling back on PROMPT mode since _cordovaNative is missing.');
+        console.log('Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only.');
         mode = jsToNativeModes.PROMPT;
     }
     nativeApiProvider.setPreferPrompt(mode == jsToNativeModes.PROMPT);


[40/40] js commit: [all] Remove remaining usage of builder.

Posted by ag...@apache.org.
[all] Remove remaining usage of builder.


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

Branch: refs/heads/cb2227
Commit: cce90cfc21be88699cb649f83dbe3e6569d8c7e4
Parents: 3d50c36
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:46 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:46:37 2013 -0400

----------------------------------------------------------------------
 lib/scripts/bootstrap.js |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/cce90cfc/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 6213165..1eed43c 100644
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -63,12 +63,7 @@
     }
 
     channel.join(function() {
-        var builder = require('cordova/builder'),
-            platform = require('cordova/platform');
-
-        builder.buildIntoButDoNotClobber(platform.defaults, context);
-        builder.buildIntoAndClobber(platform.clobbers, context);
-        builder.buildIntoAndMerge(platform.merges, context);
+        var platform = require('cordova/platform');
 
         // Call the platform-specific initialization
         platform.initialize();


[14/40] js commit: switch alert to console.error for fail to load webworks.js

Posted by ag...@apache.org.
switch alert to console.error for fail to load webworks.js


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/03a4b305
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/03a4b305
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/03a4b305

Branch: refs/heads/cb2227
Commit: 03a4b305393735717b5775390695036fa6e43fcc
Parents: 7cb3604
Author: Gord Tanner <gt...@gmail.com>
Authored: Tue Feb 26 17:36:38 2013 -0800
Committer: Gord Tanner <gt...@gmail.com>
Committed: Tue Feb 26 17:36:38 2013 -0800

----------------------------------------------------------------------
 lib/scripts/bootstrap-blackberry.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/03a4b305/lib/scripts/bootstrap-blackberry.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap-blackberry.js b/lib/scripts/bootstrap-blackberry.js
index f5d11fc..8dbf65e 100644
--- a/lib/scripts/bootstrap-blackberry.js
+++ b/lib/scripts/bootstrap-blackberry.js
@@ -30,7 +30,7 @@ document.addEventListener("DOMContentLoaded", function () {
             });
         };
         wwjs.onerror = function () {
-            alert('there was a problem loading webworks.js');
+            console.error('there was a problem loading webworks.js');
         };
         document.head.appendChild(wwjs);
         break;


[13/40] js commit: Implement FileTransfer with XHR for qnx

Posted by ag...@apache.org.
Implement FileTransfer with XHR for qnx


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/7cb3604b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/7cb3604b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/7cb3604b

Branch: refs/heads/cb2227
Commit: 7cb3604b21ce77c442ce469ae7de85f8ccb4b818
Parents: f50d20a
Author: Hasan Ahmad <ha...@rim.com>
Authored: Wed Jan 23 13:37:54 2013 -0500
Committer: Gord Tanner <gt...@gmail.com>
Committed: Tue Feb 26 15:07:14 2013 -0800

----------------------------------------------------------------------
 lib/blackberry/plugin/qnx/fileTransfer.js |  191 +++++++++++++++++++++--
 test/blackberry/qnx/test.fileTransfer.js  |   32 +++-
 2 files changed, 197 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7cb3604b/lib/blackberry/plugin/qnx/fileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/qnx/fileTransfer.js b/lib/blackberry/plugin/qnx/fileTransfer.js
index 0433f0c..7148e17 100644
--- a/lib/blackberry/plugin/qnx/fileTransfer.js
+++ b/lib/blackberry/plugin/qnx/fileTransfer.js
@@ -19,29 +19,186 @@
  *
 */
 
-var cordova = require('cordova');
+var cordova = require('cordova'),
+    FileEntry = require('cordova/plugin/FileEntry'),
+    FileTransferError = require('cordova/plugin/FileTransferError'),
+    FileUploadResult = require('cordova/plugin/FileUploadResult'),
+    ProgressEvent = require('cordova/plugin/ProgressEvent'),
+    nativeResolveLocalFileSystemURI = function(uri, success, fail) {
+        if (uri.substring(0,11) !== "filesystem:") {
+            uri = "filesystem:" + uri;
+        }
+        window.webkitResolveLocalFileSystemURL(uri, success, fail);
+    },
+    xhr;
 
-module.exports = {
-    download: function (args, win, fail) {
-        var source = args[0],
-            target = args[1];
+function getParentPath(filePath) {
+    var pos = filePath.lastIndexOf('/');
+    return filePath.substring(0, pos + 1);
+}
+
+function getFileName(filePath) {
+    var pos = filePath.lastIndexOf('/');
+    return filePath.substring(pos + 1);
+}
+
+function cleanUpPath(filePath) {
+    var pos = filePath.lastIndexOf('/');
+    return filePath.substring(0, pos) + filePath.substring(pos + 1, filePath.length);
+}
+
+function checkURL(url) {
+    return url.indexOf(' ') === -1 ?  true : false;
+}
 
-        blackberry.io.filetransfer.download(source, target, win, fail);
+module.exports = {
+    abort: function () {
         return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "async"};
     },
 
-    upload: function (args, win, fail) {
-        var path = args[0],
+    upload: function(args, win, fail) {
+        var filePath = args[0],
             server = args[1],
-            options = {
-                fileKey: args[2],
-                fileName: args[3],
-                mimeType: args[4],
-                params: args[5],
-                chunkedMode: args[6]
-            };
-
-        blackberry.io.filetransfer.upload(path, server, win, fail, options);
+            fileKey = args[2],
+            fileName = args[3],
+            mimeType = args[4],
+            params = args[5],
+            /*trustAllHosts = args[6],*/
+            chunkedMode = args[7],
+            headers = args[8];
+
+        if (!checkURL(server)) {
+            fail(new FileTransferError(FileTransferError.INVALID_URL_ERR));
+        }
+
+        nativeResolveLocalFileSystemURI(filePath, function(entry) {
+            entry.file(function(file) {
+                function uploadFile(blobFile) {
+                    var fd = new FormData();
+
+                    fd.append(fileKey, blobFile, fileName);
+                    for (var prop in params) {
+                        if(params.hasOwnProperty(prop)) {
+                            fd.append(prop, params[prop]);
+                        }
+                    }
+
+                    xhr = new XMLHttpRequest();
+                    xhr.open("POST", server);
+                    xhr.onload = function(evt) {
+                        if (xhr.status == 200) {
+                            var result = new FileUploadResult();
+                            result.bytesSent = file.size;
+                            result.responseCode = xhr.status;
+                            result.response = xhr.response;
+                            win(result);
+                        } else if (xhr.status == 404) {
+                            fail(new FileTransferError(FileTransferError.INVALID_URL_ERR, server, filePath, xhr.status));
+                        } else {
+                            fail(new FileTransferError(FileTransferError.CONNECTION_ERR, server, filePath, xhr.status));
+                        }
+                    };
+                    xhr.ontimeout = function(evt) {
+                        fail(new FileTransferError(FileTransferError.CONNECTION_ERR, server, filePath, xhr.status));
+                    };
+                    xhr.onerror = function () {
+                        fail(new FileTransferError(FileTransferError.CONNECTION_ERR, server, filePath, this.status));
+                    };
+                    xhr.onprogress = function (evt) {
+                        win(evt);
+                    };
+
+                    for (var header in headers) {
+                        if (headers.hasOwnProperty(header)) {
+                            xhr.setRequestHeader(header, headers[header]);
+                        }
+                    }
+
+                    xhr.send(fd);
+                }
+
+                var bytesPerChunk;
+                if (chunkedMode === true) {
+                    bytesPerChunk = 1024 * 1024; // 1MB chunk sizes.
+                } else {
+                    bytesPerChunk = file.size;
+                }
+                var start = 0;
+                var end = bytesPerChunk;
+                while (start < file.size) {
+                    var chunk = file.slice(start, end, mimeType);
+                    uploadFile(chunk);
+                    start = end;
+                    end = start + bytesPerChunk;
+                }
+            }, function(error) {
+                fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+            });
+        }, function(error) {
+            fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+        });
+
+        return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "async"};
+    },
+
+    download: function (args, win, fail) {
+        var source = args[0],
+            target = cleanUpPath(args[1]),
+            fileWriter;
+
+        if (!checkURL(source)) {
+            fail(new FileTransferError(FileTransferError.INVALID_URL_ERR));
+        }
+
+        xhr = new XMLHttpRequest();
+
+        function writeFile(entry) {
+            entry.createWriter(function (writer) {
+                fileWriter = writer;
+                fileWriter.onwriteend = function (evt) {
+                    if (!evt.target.error) {
+                        win(new FileEntry(entry.name, entry.toURL()));
+                    } else {
+                        fail(evt.target.error);
+                    }
+                };
+                fileWriter.onerror = function (evt) {
+                    fail(evt.target.error);
+                };
+                fileWriter.write(new Blob([xhr.response]));
+            }, function (error) {
+                fail(error);
+            });
+        }
+
+        xhr.onerror = function (e) {
+            fail(new FileTransferError(FileTransferError.CONNECTION_ERR, source, target, xhr.status));
+        };
+
+        xhr.onload = function () {
+            if (xhr.readyState === xhr.DONE) {
+                if (xhr.status === 200 && xhr.response) {
+                    nativeResolveLocalFileSystemURI(getParentPath(target), function (dir) {
+                        dir.getFile(getFileName(target), {create: true}, writeFile, function (error) {
+                            fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+                        });
+                    }, function (error) {
+                        fail(new FileTransferError(FileTransferError.FILE_NOT_FOUND_ERR));
+                    });
+                } else if (xhr.status === 404) {
+                    fail(new FileTransferError(FileTransferError.INVALID_URL_ERR, source, target, xhr.status));
+                } else {
+                    fail(new FileTransferError(FileTransferError.CONNECTION_ERR, source, target, xhr.status));
+                }
+            }
+        };
+        xhr.onprogress = function (evt) {
+            win(evt);
+        };
+
+        xhr.responseType = "blob";
+        xhr.open("GET", source, true);
+        xhr.send();
         return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "async"};
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/7cb3604b/test/blackberry/qnx/test.fileTransfer.js
----------------------------------------------------------------------
diff --git a/test/blackberry/qnx/test.fileTransfer.js b/test/blackberry/qnx/test.fileTransfer.js
index dd33f77..43baedc 100644
--- a/test/blackberry/qnx/test.fileTransfer.js
+++ b/test/blackberry/qnx/test.fileTransfer.js
@@ -20,10 +20,12 @@
 */
 
 describe("blackberry qnx fileTransfer", function () {
-    var fileTransfer = require('cordova/plugin/qnx/fileTransfer'),
-        cordova = require('cordova'),
+    var fileTransfer = require('cordova/plugin/qnx/fileTransfer');
+    var cordova = require('cordova'),
         win = jasmine.createSpy('win'),
-        fail = jasmine.createSpy('fail');
+        fail = jasmine.createSpy('fail')
+        xhrSend = jasmine.createSpy('xhr send');
+        xhrOpen = jasmine.createSpy('xhr open');
 
     beforeEach(function () {
         global.blackberry = {
@@ -33,17 +35,29 @@ describe("blackberry qnx fileTransfer", function () {
                     upload: jasmine.createSpy('upload')
                 }
             }
-        }
+        };
+        XMLHttpRequest = function () {
+            var xhr = {
+                send: xhrSend,
+                open: xhrOpen
+            };
+            return xhr;
+        };
+        window.webkitResolveLocalFileSystemURL = jasmine.createSpy("resolveFS")
     });
 
     afterEach(function () {
         delete global.blackberry;
+        delete XMLHttpRequest;
+        delete webkitResolveLocalFileSystemURL;
+        delete window.webkitResolveLocalFileSystemURL;
     });
 
     describe("download", function(){
-        it('should call the blackberry download', function(){
+        it('should call the blackberry download', function () {
             fileTransfer.download(["source/file", "target/file"], win, fail);
-            expect(blackberry.io.filetransfer.download).toHaveBeenCalledWith("source/file", "target/file", win, fail);
+            expect(xhrOpen).toHaveBeenCalled();
+            expect(xhrSend).toHaveBeenCalled();
         });
 
         it('should return No Result', function(){
@@ -54,11 +68,11 @@ describe("blackberry qnx fileTransfer", function () {
         });
     });
 
-    describe('uplaod', function(){
+    describe('upload', function(){
         it('should call the blackberry upload', function(){
             fileTransfer.upload(["source", "target", "fileKey", "fileName", "mimeType", "params", "chunkedMode"], win, fail);
-
-            expect(blackberry.io.filetransfer.upload).toHaveBeenCalledWith("source", "target", win, fail, {fileKey: "fileKey", fileName: "fileName", mimeType: "mimeType", params: "params", chunkedMode: "chunkedMode"});
+            expect(xhrOpen).toHaveBeenCalled();
+            expect(xhrSend).toHaveBeenCalled();
         });
 
         it('should return No Result', function(){


[25/40] js commit: [WindowsPhone][CB-2592]Remove global callbacks for media

Posted by ag...@apache.org.
[WindowsPhone][CB-2592]Remove global callbacks for media


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/2066ee8d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/2066ee8d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/2066ee8d

Branch: refs/heads/cb2227
Commit: 2066ee8de48089d0a687c30e7c91dcca1a879b50
Parents: 0b88895
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Mar 14 00:10:50 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Mar 14 00:10:50 2013 -0700

----------------------------------------------------------------------
 lib/windowsphone/plugin/media/symbols.js           |    1 -
 .../plugin/windowsphone/CordovaMediaonStatus.js    |   38 ---------------
 2 files changed, 0 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2066ee8d/lib/windowsphone/plugin/media/symbols.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/media/symbols.js b/lib/windowsphone/plugin/media/symbols.js
index 1b11941..d97c647 100644
--- a/lib/windowsphone/plugin/media/symbols.js
+++ b/lib/windowsphone/plugin/media/symbols.js
@@ -23,4 +23,3 @@ var modulemapper = require('cordova/modulemapper');
 
 modulemapper.defaults('cordova/plugin/Media', 'Media');
 modulemapper.defaults('cordova/plugin/MediaError', 'MediaError');
-modulemapper.clobbers('cordova/plugin/windowsphone/CordovaMediaonStatus', 'CordovaMediaonStatus');

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2066ee8d/lib/windowsphone/plugin/windowsphone/CordovaMediaonStatus.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/CordovaMediaonStatus.js b/lib/windowsphone/plugin/windowsphone/CordovaMediaonStatus.js
deleted file mode 100644
index 8cd0879..0000000
--- a/lib/windowsphone/plugin/windowsphone/CordovaMediaonStatus.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * 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
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-var cordova = require('cordova');
-var Media = require('cordova/plugin/Media');
-
-module.exports = function(args) {
-    try {
-
-        var res = JSON.parse(args);
-        if(res.msg == Media.MEDIA_ERROR) {
-            res.value = {'code':res.value};
-        }
-        Media.onStatus(res.id, res.msg, res.value);
-    }
-    catch(e) {
-        console.log("Error calling Media.onStatus :: " + e);
-    }
-};


[12/40] js commit: Merge branch 'next'

Posted by ag...@apache.org.
Merge branch 'next'


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/54660e97
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/54660e97
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/54660e97

Branch: refs/heads/cb2227
Commit: 54660e97952c558518cad8c4eecc67cfa42b2993
Parents: ac2fcf1 f50d20a
Author: Fil Maj <ma...@gmail.com>
Authored: Tue Feb 26 13:33:19 2013 -0800
Committer: Fil Maj <ma...@gmail.com>
Committed: Tue Feb 26 13:33:19 2013 -0800

----------------------------------------------------------------------
 VERSION                                        |    2 +-
 lib/bada/plugin/bada/device.js                 |    2 +-
 lib/blackberry/plugin/air/device.js            |    2 +-
 lib/blackberry/plugin/qnx/device.js            |    2 +-
 lib/firefoxos/plugin/firefoxos/notification.js |    2 +-
 lib/firefoxos/plugin/firefoxos/orientation.js  |    2 +-
 lib/tizen/plugin/tizen/Device.js               |    2 +-
 lib/windows8/plugin/windows8/DeviceProxy.js    |    2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[11/40] js commit: 2.5.0

Posted by ag...@apache.org.
2.5.0


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

Branch: refs/heads/cb2227
Commit: f50d20a87431c79a54572263729461883f611a53
Parents: 73b6ece
Author: Fil Maj <ma...@gmail.com>
Authored: Tue Feb 26 13:29:09 2013 -0800
Committer: Fil Maj <ma...@gmail.com>
Committed: Tue Feb 26 13:29:09 2013 -0800

----------------------------------------------------------------------
 VERSION                                        |    2 +-
 lib/bada/plugin/bada/device.js                 |    2 +-
 lib/blackberry/plugin/air/device.js            |    2 +-
 lib/blackberry/plugin/qnx/device.js            |    2 +-
 lib/firefoxos/plugin/firefoxos/notification.js |    2 +-
 lib/firefoxos/plugin/firefoxos/orientation.js  |    2 +-
 lib/tizen/plugin/tizen/Device.js               |    2 +-
 lib/windows8/plugin/windows8/DeviceProxy.js    |    2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index aa0822f..437459c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.5.0rc1
+2.5.0

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/lib/bada/plugin/bada/device.js
----------------------------------------------------------------------
diff --git a/lib/bada/plugin/bada/device.js b/lib/bada/plugin/bada/device.js
index 0a97e91..75a41e8 100644
--- a/lib/bada/plugin/bada/device.js
+++ b/lib/bada/plugin/bada/device.js
@@ -72,7 +72,7 @@ Device.prototype.getDeviceInfo = function(success, fail, args) {
            me.platform = os_vendor + " " + os_name;
            me.version = os_version;
            me.uuid = uuid;
-           me.cordova = "2.5.0rc1";
+           me.cordova = "2.5.0";
            success(me);
        }
    };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/lib/blackberry/plugin/air/device.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/air/device.js b/lib/blackberry/plugin/air/device.js
index d66dd28..4050a0a 100644
--- a/lib/blackberry/plugin/air/device.js
+++ b/lib/blackberry/plugin/air/device.js
@@ -35,7 +35,7 @@ module.exports = {
                     model: "PlayBook",
                     name: "PlayBook", // deprecated: please use device.model
                     uuid: info.uuid,
-                    cordova: "2.5.0rc1"
+                    cordova: "2.5.0"
                 });
             }),
             request = new blackberry.transport.RemoteFunctionCall("org/apache/cordova/getDeviceInfo");

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/lib/blackberry/plugin/qnx/device.js
----------------------------------------------------------------------
diff --git a/lib/blackberry/plugin/qnx/device.js b/lib/blackberry/plugin/qnx/device.js
index e085f0c..7c44ddd 100644
--- a/lib/blackberry/plugin/qnx/device.js
+++ b/lib/blackberry/plugin/qnx/device.js
@@ -33,7 +33,7 @@ module.exports = {
             model: "Dev Alpha",
             name: "Dev Alpha", // deprecated: please use device.model
             uuid: blackberry.identity.uuid,
-            cordova: "2.5.0rc1"
+            cordova: "2.5.0"
         });
 
         return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned" };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/lib/firefoxos/plugin/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/plugin/firefoxos/notification.js b/lib/firefoxos/plugin/firefoxos/notification.js
index ec8760d..830997a 100644
--- a/lib/firefoxos/plugin/firefoxos/notification.js
+++ b/lib/firefoxos/plugin/firefoxos/notification.js
@@ -30,5 +30,5 @@ module.exports = {
             console.log ("cordova/plugin/firefoxos/notification, vibrate API does not exist");
         }
     }
-    
+
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/lib/firefoxos/plugin/firefoxos/orientation.js
----------------------------------------------------------------------
diff --git a/lib/firefoxos/plugin/firefoxos/orientation.js b/lib/firefoxos/plugin/firefoxos/orientation.js
index 17e07b3..ed4a41d 100644
--- a/lib/firefoxos/plugin/firefoxos/orientation.js
+++ b/lib/firefoxos/plugin/firefoxos/orientation.js
@@ -27,5 +27,5 @@ module.exports = {
     getCurrentOrientation: function() {
           return window.screen.orientation;
     }
-    
+
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/lib/tizen/plugin/tizen/Device.js
----------------------------------------------------------------------
diff --git a/lib/tizen/plugin/tizen/Device.js b/lib/tizen/plugin/tizen/Device.js
index 7a2628f..8e5f83a 100644
--- a/lib/tizen/plugin/tizen/Device.js
+++ b/lib/tizen/plugin/tizen/Device.js
@@ -29,7 +29,7 @@ function Device() {
     this.version = null;
     this.uuid = null;
     this.name = null;
-    this.cordova = "2.5.0rc1";
+    this.cordova = "2.5.0";
     this.platform = "Tizen";
 
     var me = this;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/f50d20a8/lib/windows8/plugin/windows8/DeviceProxy.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/DeviceProxy.js b/lib/windows8/plugin/windows8/DeviceProxy.js
index a89c971..7826c72 100644
--- a/lib/windows8/plugin/windows8/DeviceProxy.js
+++ b/lib/windows8/plugin/windows8/DeviceProxy.js
@@ -50,7 +50,7 @@ module.exports = {
         }
 
         setTimeout(function () {
-            win({ platform: "windows8", version: "8", name: name, uuid: deviceId, cordova: "2.5.0rc1" });
+            win({ platform: "windows8", version: "8", name: name, uuid: deviceId, cordova: "2.5.0" });
         }, 0);
     }
 


[29/40] js commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-js

Posted by ag...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-js


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/6973f8ac
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/6973f8ac
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/6973f8ac

Branch: refs/heads/cb2227
Commit: 6973f8ac6d70037ed10a281c8df9afe897033784
Parents: 1b2c037 ee04517
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Mar 14 15:43:15 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Mar 14 15:43:15 2013 -0700

----------------------------------------------------------------------
 lib/common/plugin/Camera.js          |    3 ++-
 lib/common/plugin/CameraConstants.js |    4 ++++
 lib/common/plugin/notification.js    |   25 +++++++++++++++++++++++--
 test/test.notification.js            |    2 +-
 4 files changed, 30 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[10/40] js commit: [Android] Fixing failing jake tests

Posted by ag...@apache.org.
[Android] Fixing failing jake tests

Android jake tests were testing android's callbackFromNative arguments
are called with specific parameters.  The format changed slightly with
the recent MultiPart message type, so I had to update the tests.


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

Branch: refs/heads/cb2227
Commit: ac2fcf187191c131a897ca2980ba8ecf6aaa51e2
Parents: f4142e7
Author: Michal Mocny <mm...@gmail.com>
Authored: Mon Feb 25 13:55:09 2013 -0500
Committer: Michal Mocny <mm...@gmail.com>
Committed: Mon Feb 25 13:55:09 2013 -0500

----------------------------------------------------------------------
 test/android/test.exec.js |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ac2fcf18/test/android/test.exec.js
----------------------------------------------------------------------
diff --git a/test/android/test.exec.js b/test/android/test.exec.js
index 3363e45..3e185d9 100644
--- a/test/android/test.exec.js
+++ b/test/android/test.exec.js
@@ -107,50 +107,50 @@ describe('exec.processMessages', function () {
         it('should handle payloads of false', function() {
             var messages = createCallbackMessage(true, true, 1, 'id', 'f');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, false, true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [false], true);
         });
         it('should handle payloads of true', function() {
             var messages = createCallbackMessage(true, true, 1, 'id', 't');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, true, true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [true], true);
         });
         it('should handle payloads of null', function() {
             var messages = createCallbackMessage(true, true, 1, 'id', 'N');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, null, true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [null], true);
         });
         it('should handle payloads of numbers', function() {
             var messages = createCallbackMessage(true, true, 1, 'id', 'n-3.3');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, -3.3, true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [-3.3], true);
         });
         it('should handle payloads of strings', function() {
             var messages = createCallbackMessage(true, true, 1, 'id', 'sHello world');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, 'Hello world', true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, ['Hello world'], true);
         });
         it('should handle payloads of JSON objects', function() {
             var messages = createCallbackMessage(true, true, 1, 'id', '{"a":1}');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, {a:1}, true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [{a:1}], true);
         });
         it('should handle payloads of JSON arrays', function() {
             var messages = createCallbackMessage(true, true, 1, 'id', '[1]');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [1], true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [[1]], true);
         });
         it('should handle other callback opts', function() {
             var messages = createCallbackMessage(false, false, 3, 'id', 'sfoo');
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', false, 3, 'foo', false);
+            expect(callbackSpy).toHaveBeenCalledWith('id', false, 3, ['foo'], false);
         });
         it('should handle multiple messages', function() {
             var message1 = createCallbackMessage(false, false, 3, 'id', 'sfoo');
             var message2 = createCallbackMessage(true, true, 1, 'id', 'f');
             var messages = message1 + message2;
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', false, 3, 'foo', false);
-            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, false, true);
+            expect(callbackSpy).toHaveBeenCalledWith('id', false, 3, ['foo'], false);
+            expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [false], true);
         });
         it('should poll for more messages when hitting an *', function() {
             var message1 = createCallbackMessage(false, false, 3, 'id', 'sfoo');
@@ -161,10 +161,10 @@ describe('exec.processMessages', function () {
             });
             var messages = message1 + '*';
             exec.processMessages(messages);
-            expect(callbackSpy).toHaveBeenCalledWith('id', false, 3, 'foo', false);
+            expect(callbackSpy).toHaveBeenCalledWith('id', false, 3, ['foo'], false);
             waitsFor(function() { return nativeApi.retrieveJsMessages.wasCalled }, 500);
             runs(function() {
-                expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, false, true);
+                expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [false], true);
             });
         });
         it('should call callbacks in order when one callback enqueues another.', function() {
@@ -179,9 +179,9 @@ describe('exec.processMessages', function () {
             });
             exec.processMessages(message1 + message2);
             expect(callbackSpy.argsForCall.length).toEqual(3);
-            expect(callbackSpy.argsForCall[0]).toEqual(['id', false, 3, 'call1', false]);
-            expect(callbackSpy.argsForCall[1]).toEqual(['id', false, 3, 'call2', false]);
-            expect(callbackSpy.argsForCall[2]).toEqual(['id', false, 3, 'call3', false]);
+            expect(callbackSpy.argsForCall[0]).toEqual(['id', false, 3, ['call1'], false]);
+            expect(callbackSpy.argsForCall[1]).toEqual(['id', false, 3, ['call2'], false]);
+            expect(callbackSpy.argsForCall[2]).toEqual(['id', false, 3, ['call3'], false]);
         });
     });
 });


[28/40] js commit: Merge pull request #3 from purplecabbage/CordovaMediaonStatus

Posted by ag...@apache.org.
Merge pull request #3 from purplecabbage/CordovaMediaonStatus

[WindowsPhone][CB-2592]Remove global callbacks for media

Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/1b2c037d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/1b2c037d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/1b2c037d

Branch: refs/heads/cb2227
Commit: 1b2c037d9630588503569dd46d53329f65bafa25
Parents: 0b88895 2066ee8
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Mar 14 15:42:23 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Mar 14 15:42:23 2013 -0700

----------------------------------------------------------------------
 lib/windowsphone/plugin/media/symbols.js           |    1 -
 .../plugin/windowsphone/CordovaMediaonStatus.js    |   38 ---------------
 2 files changed, 0 insertions(+), 39 deletions(-)
----------------------------------------------------------------------



[18/40] js commit: Fixed CB-2620: console.log prints only the first argument on Xcode console

Posted by ag...@apache.org.
Fixed CB-2620: console.log prints only the first argument on Xcode console


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

Branch: refs/heads/cb2227
Commit: d53601e5486f888c60194b56e039863a0da61da1
Parents: 6049d66
Author: cnandreu <cn...@gmail.com>
Authored: Tue Mar 5 00:30:11 2013 -0600
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Mar 5 11:22:33 2013 -0800

----------------------------------------------------------------------
 lib/ios/plugin/ios/console.js |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/d53601e5/lib/ios/plugin/ios/console.js
----------------------------------------------------------------------
diff --git a/lib/ios/plugin/ios/console.js b/lib/ios/plugin/ios/console.js
index b07c213..82ff059 100644
--- a/lib/ios/plugin/ios/console.js
+++ b/lib/ios/plugin/ios/console.js
@@ -34,7 +34,7 @@ function stringify(message) {
                 return "error JSON.stringify()ing argument: " + e;
             }
         } else {
-            return message.toString();
+            return (typeof message === "undefined") ? "undefined" : message.toString();
         }
     } catch (e) {
         return e.toString();
@@ -48,10 +48,20 @@ function stringify(message) {
 function wrappedMethod(console, method) {
     var origMethod = console[method];
 
-    return function(message) {
+    return function() {
+
+        var args = [].slice.call(arguments),
+            len = args.length,
+            i = 0,
+            res = [];
+
+        for ( ; i < len; i++) {
+            res.push(stringify(args[i]));
+        }
+
         exec(null, null,
             'Debug Console', 'log',
-            [ stringify(message), { logLevel: method.toUpperCase() } ]
+            [ res.join(' '), { logLevel: method.toUpperCase() } ]
         );
 
         if (!origMethod) return;


[36/40] js commit: [windowsphone] Move FileTransfer into symbols.js.

Posted by ag...@apache.org.
[windowsphone] Move FileTransfer into symbols.js.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/3d50c360
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/3d50c360
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/3d50c360

Branch: refs/heads/cb2227
Commit: 3d50c3608c17a1cf938d4e7cb4656f503800de6a
Parents: 512ad38
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:43 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:44:07 2013 -0400

----------------------------------------------------------------------
 lib/windowsphone/platform.js            |    5 -----
 lib/windowsphone/plugin/file/symbols.js |    1 -
 2 files changed, 0 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3d50c360/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index 6cdb08f..5501b47 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -39,10 +39,5 @@ module.exports = {
         backButtonChannel.onHasSubscribersChange = function() {
             exec(null, null, "CoreEvents", "overridebackbutton", [this.numHandlers == 1]);
         };
-    },
-    clobbers: {
-        FileTransfer: {
-            path: 'cordova/plugin/windowsphone/FileTransfer'
-        }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/3d50c360/lib/windowsphone/plugin/file/symbols.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/file/symbols.js b/lib/windowsphone/plugin/file/symbols.js
index 1929144..12a1c8c 100644
--- a/lib/windowsphone/plugin/file/symbols.js
+++ b/lib/windowsphone/plugin/file/symbols.js
@@ -25,4 +25,3 @@ var modulemapper = require('cordova/modulemapper'),
 symbolshelper(modulemapper.defaults);
 modulemapper.clobbers('cordova/plugin/File', 'File');
 modulemapper.clobbers('cordova/plugin/FileReader', 'FileReader');
-modulemapper.clobbers('cordova/plugin/windowsphone/FileTransfer', 'FileTransfer');


[33/40] js commit: [win] Move plugin logic out of platform.js

Posted by ag...@apache.org.
[win] Move plugin logic out of platform.js


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/5f40578f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/5f40578f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/5f40578f

Branch: refs/heads/cb2227
Commit: 5f40578ffb4f6b81b69232a78c9459c84d21fc3d
Parents: bbb9d79
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:02 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:42:18 2013 -0400

----------------------------------------------------------------------
 lib/windows8/platform.js                           |   23 +-
 .../plugin/windows8/notification/plugininit.js     |   23 ++
 lib/windowsphone/platform.js                       |   14 +-
 lib/windowsphone/plugin/windowsphone/DOMStorage.js |  200 -----------
 .../plugin/windowsphone/DOMStorage/plugininit.js   |  200 +++++++++++
 lib/windowsphone/plugin/windowsphone/XHRPatch.js   |  255 ---------------
 .../plugin/windowsphone/XHRPatch/plugininit.js     |  255 +++++++++++++++
 .../plugin/windowsphone/notification/plugininit.js |   23 ++
 8 files changed, 507 insertions(+), 486 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windows8/platform.js
----------------------------------------------------------------------
diff --git a/lib/windows8/platform.js b/lib/windows8/platform.js
index 1eb22ed..03d83bc 100755
--- a/lib/windows8/platform.js
+++ b/lib/windows8/platform.js
@@ -25,34 +25,19 @@ var cordova = require('cordova'),
 
 /*
  * Define native implementations ( there is no native layer, so need to make sure the proxies are there )
-*/
-
-require('cordova/plugin/windows8/DeviceProxy');
-require('cordova/plugin/windows8/NetworkStatusProxy');
-require('cordova/plugin/windows8/AccelerometerProxy');
-require('cordova/plugin/windows8/CameraProxy');
-require('cordova/plugin/windows8/CaptureProxy');
-require('cordova/plugin/windows8/CompassProxy');
-require('cordova/plugin/windows8/ContactsProxy');
-require('cordova/plugin/windows8/FileProxy');
-
-require('cordova/plugin/windows8/FileTransferProxy');
-require('cordova/plugin/windows8/MediaProxy');
-require('cordova/plugin/windows8/NotificationProxy');
-
-
+ */
+modulemapper.loadMatchingModules(/cordova.*\/windows\/.*Proxy$/);
 
 module.exports = {
     id: "windows8",
     initialize:function() {
         var modulemapper = require('cordova/modulemapper');
 
+        modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
+
         modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
         modulemapper.mapModules(window);
 
-        window.alert = window.alert || require("cordova/plugin/notification").alert;
-        window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
-
         var onWinJSReady = function () {
             var app = WinJS.Application;
             var checkpointHandler = function checkpointHandler() {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windows8/plugin/windows8/notification/plugininit.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/notification/plugininit.js b/lib/windows8/plugin/windows8/notification/plugininit.js
new file mode 100644
index 0000000..38ba60f
--- /dev/null
+++ b/lib/windows8/plugin/windows8/notification/plugininit.js
@@ -0,0 +1,23 @@
+/*
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+window.alert = window.alert || require("cordova/plugin/notification").alert;
+window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index 23aca6d..6f26531 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -22,26 +22,16 @@
 var cordova = require('cordova'),
       exec = require('cordova/exec');
 
-// specifically require the following patches :
-
-// localStorage+SessionStorage APIs
-require("cordova/plugin/windowsphone/DOMStorage");
-
-// Fix XHR calls to local file-system
-require("cordova/plugin/windowsphone/XHRPatch");
-
-
 module.exports = {
     id: "windowsphone",
     initialize:function() {
         var modulemapper = require('cordova/modulemapper');
 
+        modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
+
         modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
         modulemapper.mapModules(window);
 
-        window.alert = window.alert || require("cordova/plugin/notification").alert;
-        window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
-
         // Inject a listener for the backbutton, and tell native to override the flag (true/false) when we have 1 or more, or 0, listeners
         var backButtonChannel = cordova.addDocumentEventHandler('backbutton');
         backButtonChannel.onHasSubscribersChange = function() {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windowsphone/plugin/windowsphone/DOMStorage.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/DOMStorage.js b/lib/windowsphone/plugin/windowsphone/DOMStorage.js
deleted file mode 100644
index c546c0f..0000000
--- a/lib/windowsphone/plugin/windowsphone/DOMStorage.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- *
- * 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
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-(function(win,doc) {
-
-var docDomain = null;
-try {
-    docDomain = doc.domain;
-} catch (err) {
-    //console.log("caught exception trying to access document.domain");
-}
-
-// conditionally patch the window.localStorage and window.sessionStorage objects
-if (!docDomain || docDomain.length === 0) {
-
-    var DOMStorage = function(type) {
-        // default type is local
-        if(type == "sessionStorage") {
-            this._type = type;
-        }
-        Object.defineProperty( this, "length", {
-            configurable: true,
-            get: function(){ return this.getLength(); }
-        });
-    };
-
-    DOMStorage.prototype = {
-        _type:"localStorage",
-        _result:null,
-        keys:null,
-
-        onResult:function(key,valueStr) {
-            if(!this.keys) {
-                this.keys = [];
-            }
-            this._result = valueStr;
-        },
-
-        onKeysChanged:function(jsonKeys) {
-            this.keys = JSON.parse(jsonKeys);
-
-            var key;
-            for(var n = 0,len = this.keys.length; n < len; n++) {
-                key = this.keys[n];
-                if(!this.hasOwnProperty(key)) {
-                    Object.defineProperty( this, key, {
-                        configurable: true,
-                        get: function(){ return this.getItem(key); },
-                        set: function(val){ return this.setItem(key,val); }
-                    });
-                }
-            }
-
-        },
-
-        initialize:function() {
-            window.external.Notify("DOMStorage/" + this._type + "/load/keys");
-        },
-
-    /*
-        The length attribute must return the number of key/value pairs currently present
-        in the list associated with the object.
-    */
-        getLength:function() {
-            if(!this.keys) {
-                this.initialize();
-            }
-            return this.keys.length;
-        },
-
-    /*
-        The key(n) method must return the name of the nth key in the list.
-        The order of keys is user-agent defined, but must be consistent within an object so long as the number of keys doesn't change.
-        (Thus, adding or removing a key may change the order of the keys, but merely changing the value of an existing key must not.)
-        If n is greater than or equal to the number of key/value pairs in the object, then this method must return null.
-    */
-        key:function(n) {
-            if(!this.keys) {
-                this.initialize();
-            }
-
-            if(n >= this.keys.length) {
-                return null;
-            } else {
-                return this.keys[n];
-            }
-        },
-
-    /*
-        The getItem(key) method must return the current value associated with the given key.
-        If the given key does not exist in the list associated with the object then this method must return null.
-    */
-        getItem:function(key) {
-            if(!this.keys) {
-                this.initialize();
-            }
-
-            var retVal = null;
-            if(this.keys.indexOf(key) > -1) {
-                window.external.Notify("DOMStorage/" + this._type + "/get/" + key);
-                retVal = window.unescape(decodeURIComponent(this._result));
-                this._result = null;
-            }
-            return retVal;
-        },
-    /*
-        The setItem(key, value) method must first check if a key/value pair with the given key already exists
-        in the list associated with the object.
-        If it does not, then a new key/value pair must be added to the list, with the given key and with its value set to value.
-        If the given key does exist in the list, then it must have its value updated to value.
-        If it couldn't set the new value, the method must raise an QUOTA_EXCEEDED_ERR exception.
-        (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
-    */
-        setItem:function(key,value) {
-            if(!this.keys) {
-                this.initialize();
-            }
-            window.external.Notify("DOMStorage/" + this._type + "/set/" + key + "/" + encodeURIComponent(window.escape(value)));
-        },
-
-    /*
-        The removeItem(key) method must cause the key/value pair with the given key to be removed from the list
-        associated with the object, if it exists.
-        If no item with that key exists, the method must do nothing.
-    */
-        removeItem:function(key) {
-            if(!this.keys) {
-                this.initialize();
-            }
-            var index = this.keys.indexOf(key);
-            if(index > -1) {
-                this.keys.splice(index,1);
-                // TODO: need sanity check for keys ? like 'clear','setItem', ...
-                window.external.Notify("DOMStorage/" + this._type + "/remove/" + key);
-                delete this[key];
-            }
-        },
-
-    /*
-        The clear() method must atomically cause the list associated with the object to be emptied of all
-        key/value pairs, if there are any.
-        If there are none, then the method must do nothing.
-    */
-        clear:function() {
-            if(!this.keys) {
-                this.initialize();
-            }
-
-            for(var n=0,len=this.keys.length; n < len;n++) {
-                // TODO: do we need a sanity check for keys ? like 'clear','setItem', ...
-                delete this[this.keys[n]];
-            }
-            this.keys = [];
-            window.external.Notify("DOMStorage/" + this._type + "/clear/");
-        }
-    };
-
-    // initialize DOMStorage
-
-    if (typeof window.localStorage === "undefined") {
-
-        Object.defineProperty(window, "localStorage", {
-            writable: false,
-            configurable: false,
-            value: new DOMStorage("localStorage")
-        });
-        window.localStorage.initialize();
-    }
-
-    if (typeof window.sessionStorage === "undefined") {
-        Object.defineProperty(window, "sessionStorage", {
-            writable: false,
-            configurable: false,
-            value: new DOMStorage("sessionStorage")
-        });
-        window.sessionStorage.initialize();
-    }
-}
-
-})(window, document);
-
-module.exports = null;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windowsphone/plugin/windowsphone/DOMStorage/plugininit.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/DOMStorage/plugininit.js b/lib/windowsphone/plugin/windowsphone/DOMStorage/plugininit.js
new file mode 100644
index 0000000..c546c0f
--- /dev/null
+++ b/lib/windowsphone/plugin/windowsphone/DOMStorage/plugininit.js
@@ -0,0 +1,200 @@
+/*
+ *
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+(function(win,doc) {
+
+var docDomain = null;
+try {
+    docDomain = doc.domain;
+} catch (err) {
+    //console.log("caught exception trying to access document.domain");
+}
+
+// conditionally patch the window.localStorage and window.sessionStorage objects
+if (!docDomain || docDomain.length === 0) {
+
+    var DOMStorage = function(type) {
+        // default type is local
+        if(type == "sessionStorage") {
+            this._type = type;
+        }
+        Object.defineProperty( this, "length", {
+            configurable: true,
+            get: function(){ return this.getLength(); }
+        });
+    };
+
+    DOMStorage.prototype = {
+        _type:"localStorage",
+        _result:null,
+        keys:null,
+
+        onResult:function(key,valueStr) {
+            if(!this.keys) {
+                this.keys = [];
+            }
+            this._result = valueStr;
+        },
+
+        onKeysChanged:function(jsonKeys) {
+            this.keys = JSON.parse(jsonKeys);
+
+            var key;
+            for(var n = 0,len = this.keys.length; n < len; n++) {
+                key = this.keys[n];
+                if(!this.hasOwnProperty(key)) {
+                    Object.defineProperty( this, key, {
+                        configurable: true,
+                        get: function(){ return this.getItem(key); },
+                        set: function(val){ return this.setItem(key,val); }
+                    });
+                }
+            }
+
+        },
+
+        initialize:function() {
+            window.external.Notify("DOMStorage/" + this._type + "/load/keys");
+        },
+
+    /*
+        The length attribute must return the number of key/value pairs currently present
+        in the list associated with the object.
+    */
+        getLength:function() {
+            if(!this.keys) {
+                this.initialize();
+            }
+            return this.keys.length;
+        },
+
+    /*
+        The key(n) method must return the name of the nth key in the list.
+        The order of keys is user-agent defined, but must be consistent within an object so long as the number of keys doesn't change.
+        (Thus, adding or removing a key may change the order of the keys, but merely changing the value of an existing key must not.)
+        If n is greater than or equal to the number of key/value pairs in the object, then this method must return null.
+    */
+        key:function(n) {
+            if(!this.keys) {
+                this.initialize();
+            }
+
+            if(n >= this.keys.length) {
+                return null;
+            } else {
+                return this.keys[n];
+            }
+        },
+
+    /*
+        The getItem(key) method must return the current value associated with the given key.
+        If the given key does not exist in the list associated with the object then this method must return null.
+    */
+        getItem:function(key) {
+            if(!this.keys) {
+                this.initialize();
+            }
+
+            var retVal = null;
+            if(this.keys.indexOf(key) > -1) {
+                window.external.Notify("DOMStorage/" + this._type + "/get/" + key);
+                retVal = window.unescape(decodeURIComponent(this._result));
+                this._result = null;
+            }
+            return retVal;
+        },
+    /*
+        The setItem(key, value) method must first check if a key/value pair with the given key already exists
+        in the list associated with the object.
+        If it does not, then a new key/value pair must be added to the list, with the given key and with its value set to value.
+        If the given key does exist in the list, then it must have its value updated to value.
+        If it couldn't set the new value, the method must raise an QUOTA_EXCEEDED_ERR exception.
+        (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
+    */
+        setItem:function(key,value) {
+            if(!this.keys) {
+                this.initialize();
+            }
+            window.external.Notify("DOMStorage/" + this._type + "/set/" + key + "/" + encodeURIComponent(window.escape(value)));
+        },
+
+    /*
+        The removeItem(key) method must cause the key/value pair with the given key to be removed from the list
+        associated with the object, if it exists.
+        If no item with that key exists, the method must do nothing.
+    */
+        removeItem:function(key) {
+            if(!this.keys) {
+                this.initialize();
+            }
+            var index = this.keys.indexOf(key);
+            if(index > -1) {
+                this.keys.splice(index,1);
+                // TODO: need sanity check for keys ? like 'clear','setItem', ...
+                window.external.Notify("DOMStorage/" + this._type + "/remove/" + key);
+                delete this[key];
+            }
+        },
+
+    /*
+        The clear() method must atomically cause the list associated with the object to be emptied of all
+        key/value pairs, if there are any.
+        If there are none, then the method must do nothing.
+    */
+        clear:function() {
+            if(!this.keys) {
+                this.initialize();
+            }
+
+            for(var n=0,len=this.keys.length; n < len;n++) {
+                // TODO: do we need a sanity check for keys ? like 'clear','setItem', ...
+                delete this[this.keys[n]];
+            }
+            this.keys = [];
+            window.external.Notify("DOMStorage/" + this._type + "/clear/");
+        }
+    };
+
+    // initialize DOMStorage
+
+    if (typeof window.localStorage === "undefined") {
+
+        Object.defineProperty(window, "localStorage", {
+            writable: false,
+            configurable: false,
+            value: new DOMStorage("localStorage")
+        });
+        window.localStorage.initialize();
+    }
+
+    if (typeof window.sessionStorage === "undefined") {
+        Object.defineProperty(window, "sessionStorage", {
+            writable: false,
+            configurable: false,
+            value: new DOMStorage("sessionStorage")
+        });
+        window.sessionStorage.initialize();
+    }
+}
+
+})(window, document);
+
+module.exports = null;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windowsphone/plugin/windowsphone/XHRPatch.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/XHRPatch.js b/lib/windowsphone/plugin/windowsphone/XHRPatch.js
deleted file mode 100644
index 27fd21d..0000000
--- a/lib/windowsphone/plugin/windowsphone/XHRPatch.js
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- *
- * 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
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-// TODO: the build process will implicitly wrap this in a define() call
-// with a closure of its own; do you need this extra closure?
-
-var LocalFileSystem = require('cordova/plugin/LocalFileSystem');
-
-(function (win, doc) {
-
-var docDomain = null;
-try {
-    docDomain = doc.domain;
-} catch (err) {
-    //console.log("caught exception trying to access document.domain");
-}
-
-if (!docDomain || docDomain.length === 0) {
-
-    var aliasXHR = win.XMLHttpRequest;
-
-    win.XMLHttpRequest = function () { };
-    win.XMLHttpRequest.noConflict = aliasXHR;
-    win.XMLHttpRequest.UNSENT = 0;
-    win.XMLHttpRequest.OPENED = 1;
-    win.XMLHttpRequest.HEADERS_RECEIVED = 2;
-    win.XMLHttpRequest.LOADING = 3;
-    win.XMLHttpRequest.DONE = 4;
-
-    win.XMLHttpRequest.prototype = {
-        UNSENT: 0,
-        OPENED: 1,
-        HEADERS_RECEIVED: 2,
-        LOADING: 3,
-        DONE: 4,
-
-        isAsync: false,
-        onreadystatechange: null,
-        readyState: 0,
-        _url: "",
-        timeout: 0,
-        withCredentials: false,
-        _requestHeaders: null,
-        open: function (reqType, uri, isAsync, user, password) {
-
-            if (uri && uri.indexOf("http") === 0) {
-                if (!this.wrappedXHR) {
-                    this.wrappedXHR = new aliasXHR();
-                    var self = this;
-
-                    // timeout
-                    if (this.timeout > 0) {
-                        this.wrappedXHR.timeout = this.timeout;
-                    }
-                    Object.defineProperty(this, "timeout", {
-                        set: function (val) {
-                            this.wrappedXHR.timeout = val;
-                        },
-                        get: function () {
-                            return this.wrappedXHR.timeout;
-                        }
-                    });
-
-
-
-                    if (this.withCredentials) {
-                        this.wrappedXHR.withCredentials = this.withCredentials;
-                    }
-                    Object.defineProperty(this, "withCredentials", {
-                        set: function (val) {
-                            this.wrappedXHR.withCredentials = val;
-                        },
-                        get: function () {
-                            return this.wrappedXHR.withCredentials;
-                        }
-                    });
-
-
-                    Object.defineProperty(this, "status", { get: function () {
-                        return this.wrappedXHR.status;
-                    }
-                    });
-                    Object.defineProperty(this, "responseText", { get: function () {
-                        return this.wrappedXHR.responseText;
-                    }
-                    });
-                    Object.defineProperty(this, "statusText", { get: function () {
-                        return this.wrappedXHR.statusText;
-                    }
-                    });
-
-                    Object.defineProperty(this, "responseXML", { get: function () {
-                        return this.wrappedXHR.responseXML;
-                    }
-                    });
-
-                    this.getResponseHeader = function (header) {
-                        return this.wrappedXHR.getResponseHeader(header);
-                    };
-                    this.getAllResponseHeaders = function () {
-                        return this.wrappedXHR.getAllResponseHeaders();
-                    };
-
-                    this.wrappedXHR.onreadystatechange = function () {
-                        self.changeReadyState(self.wrappedXHR.readyState);
-                    };
-                }
-                return this.wrappedXHR.open(reqType, uri, isAsync, user, password);
-            }
-            else {
-                // x-wmapp1://app/www/page2.html
-                // need to work some magic on the actual url/filepath
-                var newUrl = uri;
-                if (newUrl.indexOf(":/") > -1) {
-                    newUrl = newUrl.split(":/")[1];
-                }
-                // prefix relative urls to our physical root
-                if(newUrl.indexOf("app/www/") < 0 && this.getContentLocation() == this.contentLocation.ISOLATED_STORAGE)
-                {
-                    newUrl = "app/www/" + newUrl;
-                }
-
-                if (newUrl.lastIndexOf("/") === newUrl.length - 1) {
-                    newUrl += "index.html"; // default page is index.html, when call is to a dir/ ( why not ...? )
-                }
-                this._url = newUrl;
-            }
-        },
-        statusText: "",
-        changeReadyState: function (newState) {
-            this.readyState = newState;
-            if (this.onreadystatechange) {
-                this.onreadystatechange();
-            }
-        },
-        setRequestHeader: function (header, value) {
-            if (this.wrappedXHR) {
-                this.wrappedXHR.setRequestHeader(header, value);
-            }
-        },
-        getResponseHeader: function (header) {
-            return this.wrappedXHR ? this.wrappedXHR.getResponseHeader(header) : "";
-        },
-        getAllResponseHeaders: function () {
-            return this.wrappedXHR ? this.wrappedXHR.getAllResponseHeaders() : "";
-        },
-        responseText: "",
-        responseXML: "",
-        onResult: function (res) {
-            this.status = 200;
-            if(typeof res == "object")
-            {   // callback result handler may have already parsed this from a string-> a JSON object,
-                // if so, we need to restore its stringyness, as handlers are expecting string data.
-                // especially if used with jQ -> $.getJSON
-                res = JSON.stringify(res);
-            }
-            this.responseText = res;
-            this.responseXML = res;
-            this.changeReadyState(this.DONE);
-        },
-        onError: function (err) {
-            this.status = 404;
-            this.changeReadyState(this.DONE);
-        },
-
-        abort: function () {
-            if (this.wrappedXHR) {
-                return this.wrappedXHR.abort();
-            }
-        },
-
-        send: function (data) {
-            if (this.wrappedXHR) {
-                return this.wrappedXHR.send(data);
-            }
-            else {
-                this.changeReadyState(this.OPENED);
-
-                var alias = this;
-
-                var fail = function fail(evt) {
-                    alias.onError(evt.code);
-                };
-
-                if (alias.getContentLocation() == this.contentLocation.RESOURCES) {
-                    var exec = require('cordova/exec');
-                    exec(function(result) {
-                            alias.onResult.apply(alias, [result]);
-                        },
-                        fail,
-                        "File", "readResourceAsText", [alias._url]
-                    );
-                }
-                else {
-                    var gotFile = function gotFile(file) {
-                        var reader = new FileReader();
-                        reader.onloadend = function (evt) {
-                            alias.onResult.apply(alias,[evt.target.result]);
-                        };
-                        reader.readAsText(file);
-                    };
-
-                    var gotEntry = function gotEntry(entry) {
-                        entry.file(gotFile, fail);
-                    };
-
-                    var gotFS = function gotFS(fs) {
-                        fs.root.getFile(alias._url, null, gotEntry, fail);
-                    };
-
-                    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
-                }
-            }
-        },
-
-        getContentLocation: function () {
-            if (window.contentLocation === undefined) {
-                window.contentLocation = (navigator.userAgent.toUpperCase().indexOf('MSIE 10') > -1) ?
-                    this.contentLocation.RESOURCES : this.contentLocation.ISOLATED_STORAGE;
-            }
-
-            return window.contentLocation;
-        },
-
-        contentLocation:{
-            ISOLATED_STORAGE: 0,
-            RESOURCES: 1
-        },
-
-        status: 404
-    };
-} // if doc domain
-
-// end closure wrap
-})(window, document);
-
-module.exports = null;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windowsphone/plugin/windowsphone/XHRPatch/plugininit.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/XHRPatch/plugininit.js b/lib/windowsphone/plugin/windowsphone/XHRPatch/plugininit.js
new file mode 100644
index 0000000..27fd21d
--- /dev/null
+++ b/lib/windowsphone/plugin/windowsphone/XHRPatch/plugininit.js
@@ -0,0 +1,255 @@
+/*
+ *
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+// TODO: the build process will implicitly wrap this in a define() call
+// with a closure of its own; do you need this extra closure?
+
+var LocalFileSystem = require('cordova/plugin/LocalFileSystem');
+
+(function (win, doc) {
+
+var docDomain = null;
+try {
+    docDomain = doc.domain;
+} catch (err) {
+    //console.log("caught exception trying to access document.domain");
+}
+
+if (!docDomain || docDomain.length === 0) {
+
+    var aliasXHR = win.XMLHttpRequest;
+
+    win.XMLHttpRequest = function () { };
+    win.XMLHttpRequest.noConflict = aliasXHR;
+    win.XMLHttpRequest.UNSENT = 0;
+    win.XMLHttpRequest.OPENED = 1;
+    win.XMLHttpRequest.HEADERS_RECEIVED = 2;
+    win.XMLHttpRequest.LOADING = 3;
+    win.XMLHttpRequest.DONE = 4;
+
+    win.XMLHttpRequest.prototype = {
+        UNSENT: 0,
+        OPENED: 1,
+        HEADERS_RECEIVED: 2,
+        LOADING: 3,
+        DONE: 4,
+
+        isAsync: false,
+        onreadystatechange: null,
+        readyState: 0,
+        _url: "",
+        timeout: 0,
+        withCredentials: false,
+        _requestHeaders: null,
+        open: function (reqType, uri, isAsync, user, password) {
+
+            if (uri && uri.indexOf("http") === 0) {
+                if (!this.wrappedXHR) {
+                    this.wrappedXHR = new aliasXHR();
+                    var self = this;
+
+                    // timeout
+                    if (this.timeout > 0) {
+                        this.wrappedXHR.timeout = this.timeout;
+                    }
+                    Object.defineProperty(this, "timeout", {
+                        set: function (val) {
+                            this.wrappedXHR.timeout = val;
+                        },
+                        get: function () {
+                            return this.wrappedXHR.timeout;
+                        }
+                    });
+
+
+
+                    if (this.withCredentials) {
+                        this.wrappedXHR.withCredentials = this.withCredentials;
+                    }
+                    Object.defineProperty(this, "withCredentials", {
+                        set: function (val) {
+                            this.wrappedXHR.withCredentials = val;
+                        },
+                        get: function () {
+                            return this.wrappedXHR.withCredentials;
+                        }
+                    });
+
+
+                    Object.defineProperty(this, "status", { get: function () {
+                        return this.wrappedXHR.status;
+                    }
+                    });
+                    Object.defineProperty(this, "responseText", { get: function () {
+                        return this.wrappedXHR.responseText;
+                    }
+                    });
+                    Object.defineProperty(this, "statusText", { get: function () {
+                        return this.wrappedXHR.statusText;
+                    }
+                    });
+
+                    Object.defineProperty(this, "responseXML", { get: function () {
+                        return this.wrappedXHR.responseXML;
+                    }
+                    });
+
+                    this.getResponseHeader = function (header) {
+                        return this.wrappedXHR.getResponseHeader(header);
+                    };
+                    this.getAllResponseHeaders = function () {
+                        return this.wrappedXHR.getAllResponseHeaders();
+                    };
+
+                    this.wrappedXHR.onreadystatechange = function () {
+                        self.changeReadyState(self.wrappedXHR.readyState);
+                    };
+                }
+                return this.wrappedXHR.open(reqType, uri, isAsync, user, password);
+            }
+            else {
+                // x-wmapp1://app/www/page2.html
+                // need to work some magic on the actual url/filepath
+                var newUrl = uri;
+                if (newUrl.indexOf(":/") > -1) {
+                    newUrl = newUrl.split(":/")[1];
+                }
+                // prefix relative urls to our physical root
+                if(newUrl.indexOf("app/www/") < 0 && this.getContentLocation() == this.contentLocation.ISOLATED_STORAGE)
+                {
+                    newUrl = "app/www/" + newUrl;
+                }
+
+                if (newUrl.lastIndexOf("/") === newUrl.length - 1) {
+                    newUrl += "index.html"; // default page is index.html, when call is to a dir/ ( why not ...? )
+                }
+                this._url = newUrl;
+            }
+        },
+        statusText: "",
+        changeReadyState: function (newState) {
+            this.readyState = newState;
+            if (this.onreadystatechange) {
+                this.onreadystatechange();
+            }
+        },
+        setRequestHeader: function (header, value) {
+            if (this.wrappedXHR) {
+                this.wrappedXHR.setRequestHeader(header, value);
+            }
+        },
+        getResponseHeader: function (header) {
+            return this.wrappedXHR ? this.wrappedXHR.getResponseHeader(header) : "";
+        },
+        getAllResponseHeaders: function () {
+            return this.wrappedXHR ? this.wrappedXHR.getAllResponseHeaders() : "";
+        },
+        responseText: "",
+        responseXML: "",
+        onResult: function (res) {
+            this.status = 200;
+            if(typeof res == "object")
+            {   // callback result handler may have already parsed this from a string-> a JSON object,
+                // if so, we need to restore its stringyness, as handlers are expecting string data.
+                // especially if used with jQ -> $.getJSON
+                res = JSON.stringify(res);
+            }
+            this.responseText = res;
+            this.responseXML = res;
+            this.changeReadyState(this.DONE);
+        },
+        onError: function (err) {
+            this.status = 404;
+            this.changeReadyState(this.DONE);
+        },
+
+        abort: function () {
+            if (this.wrappedXHR) {
+                return this.wrappedXHR.abort();
+            }
+        },
+
+        send: function (data) {
+            if (this.wrappedXHR) {
+                return this.wrappedXHR.send(data);
+            }
+            else {
+                this.changeReadyState(this.OPENED);
+
+                var alias = this;
+
+                var fail = function fail(evt) {
+                    alias.onError(evt.code);
+                };
+
+                if (alias.getContentLocation() == this.contentLocation.RESOURCES) {
+                    var exec = require('cordova/exec');
+                    exec(function(result) {
+                            alias.onResult.apply(alias, [result]);
+                        },
+                        fail,
+                        "File", "readResourceAsText", [alias._url]
+                    );
+                }
+                else {
+                    var gotFile = function gotFile(file) {
+                        var reader = new FileReader();
+                        reader.onloadend = function (evt) {
+                            alias.onResult.apply(alias,[evt.target.result]);
+                        };
+                        reader.readAsText(file);
+                    };
+
+                    var gotEntry = function gotEntry(entry) {
+                        entry.file(gotFile, fail);
+                    };
+
+                    var gotFS = function gotFS(fs) {
+                        fs.root.getFile(alias._url, null, gotEntry, fail);
+                    };
+
+                    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail);
+                }
+            }
+        },
+
+        getContentLocation: function () {
+            if (window.contentLocation === undefined) {
+                window.contentLocation = (navigator.userAgent.toUpperCase().indexOf('MSIE 10') > -1) ?
+                    this.contentLocation.RESOURCES : this.contentLocation.ISOLATED_STORAGE;
+            }
+
+            return window.contentLocation;
+        },
+
+        contentLocation:{
+            ISOLATED_STORAGE: 0,
+            RESOURCES: 1
+        },
+
+        status: 404
+    };
+} // if doc domain
+
+// end closure wrap
+})(window, document);
+
+module.exports = null;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/5f40578f/lib/windowsphone/plugin/windowsphone/notification/plugininit.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/notification/plugininit.js b/lib/windowsphone/plugin/windowsphone/notification/plugininit.js
new file mode 100644
index 0000000..38ba60f
--- /dev/null
+++ b/lib/windowsphone/plugin/windowsphone/notification/plugininit.js
@@ -0,0 +1,23 @@
+/*
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+window.alert = window.alert || require("cordova/plugin/notification").alert;
+window.confirm = window.confirm || require("cordova/plugin/notification").confirm;
+


[39/40] js commit: [windowsphone] modulemapper refactor for CordovaCommandResult

Posted by ag...@apache.org.
[windowsphone] modulemapper refactor for CordovaCommandResult


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

Branch: refs/heads/cb2227
Commit: ff4bd1e03e97334a6233553f5fc1fcf0b8d244b4
Parents: f08ba57
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:34 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:44:07 2013 -0400

----------------------------------------------------------------------
 lib/windowsphone/platform.js |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ff4bd1e0/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index 2fb103c..449a954 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -30,6 +30,8 @@ module.exports = {
         modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
 
         modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.clobbers('/cordova/plugin/windowsphone/CordovaCommandResult', 'CordovaCommandResult');
+
         modulemapper.mapModules(window);
 
         // Inject a listener for the backbutton, and tell native to override the flag (true/false) when we have 1 or more, or 0, listeners
@@ -39,9 +41,6 @@ module.exports = {
         };
     },
     clobbers: {
-        CordovaCommandResult: {
-            path:"cordova/plugin/windowsphone/CordovaCommandResult"
-        },
         FileTransfer: {
             path: 'cordova/plugin/windowsphone/FileTransfer'
         },


[35/40] js commit: [webos] modulemapper refactor for platform plugins.

Posted by ag...@apache.org.
[webos] modulemapper refactor for platform plugins.


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

Branch: refs/heads/cb2227
Commit: bbb9d79401b1198442522ceeb6cd6a8d93123104
Parents: fed8951
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:56:43 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:42:18 2013 -0400

----------------------------------------------------------------------
 lib/webos/platform.js |   28 +++++++---------------------
 1 files changed, 7 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/bbb9d794/lib/webos/platform.js
----------------------------------------------------------------------
diff --git a/lib/webos/platform.js b/lib/webos/platform.js
index 0182060..69626d0 100644
--- a/lib/webos/platform.js
+++ b/lib/webos/platform.js
@@ -28,6 +28,13 @@ module.exports = {
         var modulemapper = require('cordova/modulemapper');
 
         modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+
+        modulemapper.merges('cordova/plugin/webos/service', 'navigator.service');
+        modulemapper.merges('cordova/plugin/webos/application', 'navigator.application');
+        modulemapper.merges('cordova/plugin/webos/window', 'navigator.window');
+        modulemapper.merges('cordova/plugin/webos/orientation', 'navigator.orientation');
+        modulemapper.merges('cordova/plugin/webos/keyboard', 'navigator.keyboard');
+
         modulemapper.mapModules(window);
 
         if (window.PalmSystem) {
@@ -99,26 +106,5 @@ module.exports = {
             });
 
         });
-    },
-    merges: {
-        navigator: {
-            children: {
-                service: {
-                    path: "cordova/plugin/webos/service"
-                },
-                application: {
-                    path: "cordova/plugin/webos/application"
-                },
-                window: {
-                    path: "cordova/plugin/webos/window"
-                },
-                orientation: {
-                    path: "cordova/plugin/webos/orientation"
-                },
-                keyboard: {
-                    path: "cordova/plugin/webos/keyboard"
-                }
-            }
-        }
     }
 };


[37/40] js commit: [windowsphone] Move InAppBrowser into symbols.js

Posted by ag...@apache.org.
[windowsphone] Move InAppBrowser into symbols.js


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/512ad38b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/512ad38b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/512ad38b

Branch: refs/heads/cb2227
Commit: 512ad38b4447ef62198a1bf8075c7b469fc175a7
Parents: ff4bd1e
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:38 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:44:07 2013 -0400

----------------------------------------------------------------------
 lib/windowsphone/platform.js                    |    3 --
 lib/windowsphone/plugin/inappbrowser/symbols.js |   24 ++++++++++++++++++
 2 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/512ad38b/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index 449a954..6cdb08f 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -43,9 +43,6 @@ module.exports = {
     clobbers: {
         FileTransfer: {
             path: 'cordova/plugin/windowsphone/FileTransfer'
-        },
-        open : {
-            path: 'cordova/plugin/InAppBrowser'
         }
     }
 };

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/512ad38b/lib/windowsphone/plugin/inappbrowser/symbols.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/inappbrowser/symbols.js b/lib/windowsphone/plugin/inappbrowser/symbols.js
new file mode 100644
index 0000000..1b0866e
--- /dev/null
+++ b/lib/windowsphone/plugin/inappbrowser/symbols.js
@@ -0,0 +1,24 @@
+/*
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+var modulemapper = require('cordova/modulemapper');
+
+modulemapper.clobbers('cordova/plugin/InAppBrowser', 'open');


[22/40] js commit: Add readAsBinaryString and readAsArrayBuffer to FileReader

Posted by ag...@apache.org.
Add readAsBinaryString and readAsArrayBuffer to FileReader


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/816f094b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/816f094b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/816f094b

Branch: refs/heads/cb2227
Commit: 816f094ba5bd57da057b8dbd383f6f0be84eb8d2
Parents: 6df50c0
Author: Braden Shepherdson <br...@gmail.com>
Authored: Mon Mar 4 14:12:51 2013 -0500
Committer: Braden Shepherdson <br...@gmail.com>
Committed: Thu Mar 7 10:03:20 2013 -0500

----------------------------------------------------------------------
 lib/common/plugin/FileReader.js |  129 ++++++++++++++++++++++++++++++++--
 1 files changed, 123 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/816f094b/lib/common/plugin/FileReader.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/FileReader.js b/lib/common/plugin/FileReader.js
index d48e714..3a698c0 100644
--- a/lib/common/plugin/FileReader.js
+++ b/lib/common/plugin/FileReader.js
@@ -283,9 +283,69 @@ FileReader.prototype.readAsBinaryString = function(file) {
     if (initRead(this, file)) {
         return this._realReader.readAsBinaryString(file);
     }
-    // TODO - Can't return binary data to browser.
-    console.log('method "readAsBinaryString" is not supported at this time.');
-    this.abort();
+
+    var me = this;
+    var execArgs = [this._fileName];
+
+    // Maybe add slice parameters.
+    if (file.end < file.size) {
+        execArgs.push(file.start, file.end);
+    } else if (file.start > 0) {
+        execArgs.push(file.start);
+    }
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            // Convert the result from an ArrayBuffer to a binary string.
+            me._result = String.fromCharCode.apply(null, new Uint8Array(r));
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsArrayBuffer", execArgs);
+        // Yes, readAsArrayBuffer. The conversion is done in Javascript, since we can
+        // only exchange binary data across the bridge using ArrayBuffers.
 };
 
 /**
@@ -297,9 +357,66 @@ FileReader.prototype.readAsArrayBuffer = function(file) {
     if (initRead(this, file)) {
         return this._realReader.readAsArrayBuffer(file);
     }
-    // TODO - Can't return binary data to browser.
-    console.log('This method is not supported at this time.');
-    this.abort();
+
+    var me = this;
+    var execArgs = [this._fileName];
+
+    // Maybe add slice parameters.
+    if (file.end < file.size) {
+        execArgs.push(file.start, file.end);
+    } else if (file.start > 0) {
+        execArgs.push(file.start);
+    }
+
+    // Read file
+    exec(
+        // Success callback
+        function(r) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = r;
+
+            // If onload callback
+            if (typeof me.onload === "function") {
+                me.onload(new ProgressEvent("load", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        },
+        // Error callback
+        function(e) {
+            // If DONE (cancelled), then don't do anything
+            if (me._readyState === FileReader.DONE) {
+                return;
+            }
+
+            // DONE state
+            me._readyState = FileReader.DONE;
+
+            me._result = null;
+
+            // Save error
+            me._error = new FileError(e);
+
+            // If onerror callback
+            if (typeof me.onerror === "function") {
+                me.onerror(new ProgressEvent("error", {target:me}));
+            }
+
+            // If onloadend callback
+            if (typeof me.onloadend === "function") {
+                me.onloadend(new ProgressEvent("loadend", {target:me}));
+            }
+        }, "File", "readAsArrayBuffer", execArgs);
 };
 
 module.exports = FileReader;


[17/40] js commit: [CB-861] Header support for FileTransfer download

Posted by ag...@apache.org.
[CB-861] Header support for FileTransfer download

Added support for an optional options object as the final arg. Currently only handles the options.headers object (as per the issue).

`FileTransfer.download(source, target, successCallback, errorCallback, trustAllHosts, options)`

This is needed for using FileTransfer.download with Basic Authentication, etc. Sadly since Android 2.x doesn't support XHR2, this is needed in FileTransfer.

I have only added support to Android and iOS (see other PR's).


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/6049d667
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/6049d667
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/6049d667

Branch: refs/heads/cb2227
Commit: 6049d66747221874bd1e6821b4f3690faa60ab99
Parents: c5437f0
Author: Tommy-Carlos Williams <to...@devgeeks.org>
Authored: Sun Feb 24 14:52:17 2013 +1100
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Feb 28 13:06:40 2013 -0500

----------------------------------------------------------------------
 lib/common/plugin/FileTransfer.js |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6049d667/lib/common/plugin/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/FileTransfer.js b/lib/common/plugin/FileTransfer.js
index 3a9fda2..778f955 100644
--- a/lib/common/plugin/FileTransfer.js
+++ b/lib/common/plugin/FileTransfer.js
@@ -103,10 +103,17 @@ FileTransfer.prototype.upload = function(filePath, server, successCallback, erro
  * @param successCallback (Function}  Callback to be invoked when upload has completed
  * @param errorCallback {Function}    Callback to be invoked upon error
  * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
+ * @param options {FileDownloadOptions} Optional parameters such as headers
  */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts) {
+FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts, options) {
     argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments);
     var self = this;
+
+    var headers = null;
+    if (options) {
+        headers = options.headers || null;
+    }
+
     var win = function(result) {
         if (typeof result.lengthComputable != "undefined") {
             if (self.onprogress) {
@@ -133,7 +140,7 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
         errorCallback(error);
     };
 
-    exec(win, fail, 'FileTransfer', 'download', [source, target, trustAllHosts, this._id]);
+    exec(win, fail, 'FileTransfer', 'download', [source, target, trustAllHosts, this._id, headers]);
 };
 
 /**


[31/40] js commit: Always pass slice parameters to FileReader

Posted by ag...@apache.org.
Always pass slice parameters to FileReader


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/1d879077
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/1d879077
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/1d879077

Branch: refs/heads/cb2227
Commit: 1d87907716be8ab1b2fec4de3296a84196109bf1
Parents: 6973f8a
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Mar 14 11:31:05 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Mar 15 16:42:47 2013 -0400

----------------------------------------------------------------------
 lib/common/plugin/FileReader.js |   43 ++++-----------------------------
 1 files changed, 6 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/1d879077/lib/common/plugin/FileReader.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/FileReader.js b/lib/common/plugin/FileReader.js
index 3a698c0..ae62cbd 100644
--- a/lib/common/plugin/FileReader.js
+++ b/lib/common/plugin/FileReader.js
@@ -137,14 +137,7 @@ FileReader.prototype.readAsText = function(file, encoding) {
     // Default encoding is UTF-8
     var enc = encoding ? encoding : "UTF-8";
     var me = this;
-    var execArgs = [this._fileName, enc];
-
-    // Maybe add slice parameters.
-    if (file.end < file.size) {
-        execArgs.push(file.start, file.end);
-    } else if (file.start > 0) {
-        execArgs.push(file.start);
-    }
+    var execArgs = [this._fileName, enc, file.start, file.end];
 
     // Read file
     exec(
@@ -213,14 +206,7 @@ FileReader.prototype.readAsDataURL = function(file) {
     }
 
     var me = this;
-    var execArgs = [this._fileName];
-
-    // Maybe add slice parameters.
-    if (file.end < file.size) {
-        execArgs.push(file.start, file.end);
-    } else if (file.start > 0) {
-        execArgs.push(file.start);
-    }
+    var execArgs = [this._fileName, file.start, file.end];
 
     // Read file
     exec(
@@ -285,14 +271,7 @@ FileReader.prototype.readAsBinaryString = function(file) {
     }
 
     var me = this;
-    var execArgs = [this._fileName];
-
-    // Maybe add slice parameters.
-    if (file.end < file.size) {
-        execArgs.push(file.start, file.end);
-    } else if (file.start > 0) {
-        execArgs.push(file.start);
-    }
+    var execArgs = [this._fileName, file.start, file.end];
 
     // Read file
     exec(
@@ -306,8 +285,7 @@ FileReader.prototype.readAsBinaryString = function(file) {
             // DONE state
             me._readyState = FileReader.DONE;
 
-            // Convert the result from an ArrayBuffer to a binary string.
-            me._result = String.fromCharCode.apply(null, new Uint8Array(r));
+            me._result = r;
 
             // If onload callback
             if (typeof me.onload === "function") {
@@ -343,9 +321,7 @@ FileReader.prototype.readAsBinaryString = function(file) {
             if (typeof me.onloadend === "function") {
                 me.onloadend(new ProgressEvent("loadend", {target:me}));
             }
-        }, "File", "readAsArrayBuffer", execArgs);
-        // Yes, readAsArrayBuffer. The conversion is done in Javascript, since we can
-        // only exchange binary data across the bridge using ArrayBuffers.
+        }, "File", "readAsBinaryString", execArgs);
 };
 
 /**
@@ -359,14 +335,7 @@ FileReader.prototype.readAsArrayBuffer = function(file) {
     }
 
     var me = this;
-    var execArgs = [this._fileName];
-
-    // Maybe add slice parameters.
-    if (file.end < file.size) {
-        execArgs.push(file.start, file.end);
-    } else if (file.start > 0) {
-        execArgs.push(file.start);
-    }
+    var execArgs = [this._fileName, file.start, file.end];
 
     // Read file
     exec(


[06/40] js commit: CB-2103: Forgot to send the response body to the error callback. Fixed now.

Posted by ag...@apache.org.
CB-2103: Forgot to send the response body to the error callback. Fixed now.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/05913de4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/05913de4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/05913de4

Branch: refs/heads/cb2227
Commit: 05913de4d4781308e6603c096ed54659d8e5456c
Parents: efefa97
Author: Fil Maj <ma...@gmail.com>
Authored: Fri Feb 22 11:41:59 2013 -0800
Committer: Fil Maj <ma...@gmail.com>
Committed: Fri Feb 22 11:41:59 2013 -0800

----------------------------------------------------------------------
 lib/common/plugin/FileTransfer.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/05913de4/lib/common/plugin/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/FileTransfer.js b/lib/common/plugin/FileTransfer.js
index 7e7af61..3a9fda2 100644
--- a/lib/common/plugin/FileTransfer.js
+++ b/lib/common/plugin/FileTransfer.js
@@ -79,7 +79,7 @@ FileTransfer.prototype.upload = function(filePath, server, successCallback, erro
     }
 
     var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status);
+        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
         errorCallback(error);
     };
 
@@ -129,7 +129,7 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
     };
 
     var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status);
+        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
         errorCallback(error);
     };
 


[34/40] js commit: [win8] modulemapper refactor for commandProxy.

Posted by ag...@apache.org.
[win8] modulemapper refactor for commandProxy.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/06a0b401
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/06a0b401
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/06a0b401

Branch: refs/heads/cb2227
Commit: 06a0b4012ef86af62ae6a01db082f0c76277717a
Parents: 2dea928
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 21 07:57:24 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 20 11:42:18 2013 -0400

----------------------------------------------------------------------
 lib/windows8/platform.js |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/06a0b401/lib/windows8/platform.js
----------------------------------------------------------------------
diff --git a/lib/windows8/platform.js b/lib/windows8/platform.js
index f3626db..211e62a 100755
--- a/lib/windows8/platform.js
+++ b/lib/windows8/platform.js
@@ -21,7 +21,8 @@
 
 var cordova = require('cordova'),
     exec = require('cordova/exec'),
-    channel = cordova.require("cordova/channel");
+    channel = cordova.require("cordova/channel"),
+    modulemapper = require('cordova/modulemapper');
 
 /*
  * Define native implementations ( there is no native layer, so need to make sure the proxies are there )
@@ -31,11 +32,12 @@ modulemapper.loadMatchingModules(/cordova.*\/windows\/.*Proxy$/);
 module.exports = {
     id: "windows8",
     initialize:function() {
-        var modulemapper = require('cordova/modulemapper');
 
         modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
 
         modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.clobbers('/cordova/commandProxy', 'cordova.commandProxy');
+
         modulemapper.mapModules(window);
 
         var onWinJSReady = function () {
@@ -66,15 +68,5 @@ module.exports = {
         else {
             onWinJSReady();
         }
-    },
-    clobbers: {
-        cordova: {
-            path: 'cordova',
-            children: {
-                commandProxy: {
-                    path: 'cordova/commandProxy'
-                }
-            }
-        }
     }
 };


[30/40] js commit: [android] Add support for binary strings to the bridge

Posted by ag...@apache.org.
[android] Add support for binary strings to the bridge


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

Branch: refs/heads/cb2227
Commit: fed89510ec982871df783049c80131bccf449711
Parents: 1d87907
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Mar 15 15:56:25 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Mar 15 16:42:47 2013 -0400

----------------------------------------------------------------------
 lib/android/exec.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/fed89510/lib/android/exec.js
----------------------------------------------------------------------
diff --git a/lib/android/exec.js b/lib/android/exec.js
index 90ea186..af2715b 100644
--- a/lib/android/exec.js
+++ b/lib/android/exec.js
@@ -200,6 +200,8 @@ function processMessage(message) {
                     arraybuffer[i] = bytes.charCodeAt(i);
                 }
                 payload = arraybuffer.buffer;
+            } else if (payloadKind == 'S') {
+                payload = window.atob(message.slice(nextSpaceIdx + 2));
             } else {
                 payload = JSON.parse(message.slice(nextSpaceIdx + 1));
             }


[15/40] js commit: fixing deviceready

Posted by ag...@apache.org.
fixing deviceready


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/81e89d61
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/81e89d61
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/81e89d61

Branch: refs/heads/cb2227
Commit: 81e89d611cd0665f8296a23f5529390164f76978
Parents: 54660e9
Author: Anis Kadri <an...@gmail.com>
Authored: Wed Feb 27 10:58:34 2013 -0800
Committer: Anis Kadri <an...@gmail.com>
Committed: Wed Feb 27 10:58:34 2013 -0800

----------------------------------------------------------------------
 lib/bada/plugin/bada/device.js |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/81e89d61/lib/bada/plugin/bada/device.js
----------------------------------------------------------------------
diff --git a/lib/bada/plugin/bada/device.js b/lib/bada/plugin/bada/device.js
index 75a41e8..c2db705 100644
--- a/lib/bada/plugin/bada/device.js
+++ b/lib/bada/plugin/bada/device.js
@@ -22,9 +22,6 @@
 var channel = require('cordova/channel'),
     utils = require('cordova/utils');
 
-// Tell cordova channel to wait on the CordovaInfoReady event
-channel.waitForInitialization('onCordovaInfoReady');
-
 function Device() {
     this.platform = null;
     this.version = null;


[08/40] js commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-js

Posted by ag...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-js


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

Branch: refs/heads/cb2227
Commit: aa5548f7db9fd6dc8f5b7e0086622c5c3c1622c6
Parents: 91d53eb 05913de
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Feb 22 11:46:46 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Feb 22 11:46:46 2013 -0800

----------------------------------------------------------------------
 lib/common/channel.js                              |    4 +
 lib/common/plugin/Camera.js                        |    4 +-
 lib/common/plugin/CameraPopoverHandle.js           |   33 ++
 lib/ios/exec.js                                    |    3 +
 lib/ios/plugin/CameraPopoverHandle.js              |   34 ++
 lib/scripts/bootstrap.js                           |   81 +++--
 lib/webos/platform.js                              |   28 ++-
 lib/windows8/platform.js                           |   46 +++-
 lib/windows8/plugin/windows8/console/symbols.js    |   24 --
 .../plugin/windows8/notification/plugininit.js     |   23 --
 lib/windowsphone/platform.js                       |   38 ++-
 lib/windowsphone/plugin/file/symbols.js            |    1 +
 lib/windowsphone/plugin/inappbrowser/symbols.js    |   24 --
 lib/windowsphone/plugin/windowsphone/DOMStorage.js |  200 +++++++++++
 .../plugin/windowsphone/DOMStorage/plugininit.js   |  200 -----------
 lib/windowsphone/plugin/windowsphone/XHRPatch.js   |  255 +++++++++++++++
 .../plugin/windowsphone/XHRPatch/plugininit.js     |  255 ---------------
 .../plugin/windowsphone/console/symbols.js         |   25 --
 .../plugin/windowsphone/notification/plugininit.js |   23 --
 19 files changed, 677 insertions(+), 624 deletions(-)
----------------------------------------------------------------------



[23/40] js commit: [WindowsPhone] CB2592, remove CordovaCommandResult

Posted by ag...@apache.org.
[WindowsPhone] CB2592, remove CordovaCommandResult


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/22aa62f3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/22aa62f3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/22aa62f3

Branch: refs/heads/cb2227
Commit: 22aa62f377b23896e0af79a62b984d53262f3245
Parents: 816f094
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Mar 12 17:58:21 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Mar 12 17:58:21 2013 -0700

----------------------------------------------------------------------
 lib/windowsphone/platform.js                       |    4 -
 .../plugin/windowsphone/CordovaCommandResult.js    |   74 ---------------
 2 files changed, 0 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/22aa62f3/lib/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/platform.js b/lib/windowsphone/platform.js
index a407413..23aca6d 100644
--- a/lib/windowsphone/platform.js
+++ b/lib/windowsphone/platform.js
@@ -49,14 +49,10 @@ module.exports = {
         };
     },
     clobbers: {
-        CordovaCommandResult: {
-            path:"cordova/plugin/windowsphone/CordovaCommandResult"
-        },
         navigator: {
             children: {
                 console: {
                     path: "cordova/plugin/windowsphone/console"
-
                 }
             }
         },

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/22aa62f3/lib/windowsphone/plugin/windowsphone/CordovaCommandResult.js
----------------------------------------------------------------------
diff --git a/lib/windowsphone/plugin/windowsphone/CordovaCommandResult.js b/lib/windowsphone/plugin/windowsphone/CordovaCommandResult.js
deleted file mode 100644
index dae5279..0000000
--- a/lib/windowsphone/plugin/windowsphone/CordovaCommandResult.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * 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
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-var cordova = require('cordova');
-var channel = require('cordova/channel');
-
-// singular WP callback function attached to window, status is used to determine if it is a success or error
-module.exports = function(status,callbackId,args,cast) {
-
-    if(status === "backbutton") {
-        // do not detach backbutton event, as we need to be able to catch exceptions
-        cordova.fireDocumentEvent("backbutton", undefined, true);
-        return "true";
-    }
-    else if(status === "resume") {
-        cordova.fireDocumentEvent('resume');
-        return "true";
-    }
-    else if(status === "pause") {
-        cordova.fireDocumentEvent('pause');
-        return "true";
-    }
-
-    var parsedArgs;
-    try
-    {
-        parsedArgs = JSON.parse(args);
-
-    }
-    catch(ex)
-    {
-        console.log("Parse error in CordovaCommandResult :: " + ex);
-        return;
-    }
-
-    try
-    {
-        // For some commands, the message is a JSON encoded string
-        // and other times, it is just a string, the try/catch handles the
-        // case where message was indeed, just a string.
-        parsedArgs.message = JSON.parse(parsedArgs.message);
-    }
-    catch(ex)
-    {
-
-    }
-    var safeStatus = parseInt(status, 10);
-    if(safeStatus === cordova.callbackStatus.NO_RESULT ||
-       safeStatus === cordova.callbackStatus.OK) {
-        cordova.callbackSuccess(callbackId,parsedArgs,cast);
-    }
-    else {
-        cordova.callbackError(callbackId,parsedArgs,cast);
-    }
-};


[04/40] js commit: Add onPluginsReady event, and join on it before firing onDeviceReady

Posted by ag...@apache.org.
Add onPluginsReady event, and join on it before firing onDeviceReady

This happens only when a magic variable (window.__onPluginsLoadedHack)
is set, which is done by the generated code in the automatic plugin
loader prototype. A temporary hack that can be removed when the
prototype is either rolled into the main line or scrapped.

The behavior is unchanged when the variable is not set.


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

Branch: refs/heads/cb2227
Commit: 6abe4c9b5863dad21152a178874d476fcce473c2
Parents: 48220f8
Author: Braden Shepherdson <br...@gmail.com>
Authored: Thu Feb 21 16:11:31 2013 -0500
Committer: Braden Shepherdson <br...@gmail.com>
Committed: Thu Feb 21 16:11:31 2013 -0500

----------------------------------------------------------------------
 lib/common/channel.js    |    4 ++++
 lib/scripts/bootstrap.js |   11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6abe4c9b/lib/common/channel.js
----------------------------------------------------------------------
diff --git a/lib/common/channel.js b/lib/common/channel.js
index 6e90603..38daedf 100644
--- a/lib/common/channel.js
+++ b/lib/common/channel.js
@@ -242,6 +242,10 @@ channel.createSticky('onCordovaInfoReady');
 // Event to indicate that the connection property has been set.
 channel.createSticky('onCordovaConnectionReady');
 
+// Event to indicate that all automatically loaded JS plugins are loaded and ready.
+// This is used in conjunction with the automatic plugin JS loading CLI prototype.
+channel.createSticky('onPluginsReady');
+
 // Event to indicate that Cordova is ready
 channel.createSticky('onDeviceReady');
 

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6abe4c9b/lib/scripts/bootstrap.js
----------------------------------------------------------------------
diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js
index 396862e..437604d 100644
--- a/lib/scripts/bootstrap.js
+++ b/lib/scripts/bootstrap.js
@@ -40,6 +40,15 @@
     /**
      * Create all cordova objects once page has fully loaded and native side is ready.
      */
+    var joinEvents = [ channel.onDOMContentLoaded, channel.onNativeReady ];
+
+    // If this property is set to something truthy, join on onPluginsReady too.
+    // This property is set by the automatic JS installation prototype in cordova-cli,
+    // and will be removed when the prototype either becomes mainline or is dropped.
+    if (window.__onPluginsLoadedHack) {
+        joinEvents.push(channel.onPluginsReady);
+    }
+
     channel.join(function() {
         var builder = require('cordova/builder'),
             platform = require('cordova/platform');
@@ -60,6 +69,6 @@
             require('cordova').fireDocumentEvent('deviceready');
         }, channel.deviceReadyChannelsArray);
 
-    }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);
+    }, joinEvents);
 
 }(window));


[16/40] js commit: Merge branch 'master' into next

Posted by ag...@apache.org.
Merge branch 'master' into next


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

Branch: refs/heads/cb2227
Commit: c5437f050947a65045222c6ac9fa70cf71ba334e
Parents: 03a4b30 81e89d6
Author: Gord Tanner <gt...@gmail.com>
Authored: Wed Feb 27 13:07:16 2013 -0800
Committer: Gord Tanner <gt...@gmail.com>
Committed: Wed Feb 27 13:07:16 2013 -0800

----------------------------------------------------------------------
 lib/android/exec.js               |    2 +-
 lib/bada/plugin/bada/device.js    |    3 -
 lib/common/channel.js             |    4 ++
 lib/common/plugin/FileTransfer.js |    4 +-
 lib/common/plugin/echo.js         |   25 +++++++--
 lib/cordova.js                    |   10 ++--
 lib/ios/exec.js                   |   37 ++++++++++----
 lib/scripts/bootstrap.js          |   86 +++++++++++++++++++-------------
 test/android/test.exec.js         |   30 ++++++------
 9 files changed, 125 insertions(+), 76 deletions(-)
----------------------------------------------------------------------



[21/40] js commit: [OS X] Fixed plugin callbacks not being called

Posted by ag...@apache.org.
[OS X] Fixed plugin callbacks not being called


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

Branch: refs/heads/cb2227
Commit: 6df50c0eedbc3eb3b9143e43c8ddb32bb664185c
Parents: d179d3b
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 6 17:17:24 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 6 17:17:24 2013 -0800

----------------------------------------------------------------------
 lib/osx/exec.js |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/6df50c0e/lib/osx/exec.js
----------------------------------------------------------------------
diff --git a/lib/osx/exec.js b/lib/osx/exec.js
index facb1c4..0e9faf7 100644
--- a/lib/osx/exec.js
+++ b/lib/osx/exec.js
@@ -114,11 +114,9 @@ function OSXExec() {
 
 
 OSXExec.nativeCallback = function(callbackId, status, message, keepCallback) {
-    return (function() {
-        var success = status === 0 || status === 1;
-        var args = convertMessageToArgsNativeToJs(message);
-        cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
-    });
+	var success = status === 0 || status === 1;
+	var args = convertMessageToArgsNativeToJs(message);
+	cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
 };
 
 module.exports = OSXExec;


[02/40] js commit: [IOS] [COMMON] Added a handle to camera popovers. [CB-2411]

Posted by ag...@apache.org.
[IOS] [COMMON] Added a handle to camera popovers. [CB-2411]

This is returned by Camera.getPicture.  Developers can use this to reposition the popover.
CameraPopoverHandle.setPosition is a no-op on non-iOS platforms.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/73b6ecef
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/73b6ecef
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/73b6ecef

Branch: refs/heads/cb2227
Commit: 73b6ecefc25840ea4a73c6b72b523f9f7bd83d82
Parents: 64a70f9
Author: Max Woghiren <ma...@gmail.com>
Authored: Fri Feb 15 13:00:00 2013 -0500
Committer: Becky Gibson <be...@apache.org>
Committed: Thu Feb 21 12:17:43 2013 -0500

----------------------------------------------------------------------
 lib/common/plugin/Camera.js              |    4 ++-
 lib/common/plugin/CameraPopoverHandle.js |   33 ++++++++++++++++++++++++
 lib/ios/plugin/CameraPopoverHandle.js    |   34 +++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/73b6ecef/lib/common/plugin/Camera.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Camera.js b/lib/common/plugin/Camera.js
index 172d667..5794b91 100644
--- a/lib/common/plugin/Camera.js
+++ b/lib/common/plugin/Camera.js
@@ -21,7 +21,8 @@
 
 var argscheck = require('cordova/argscheck'),
     exec = require('cordova/exec'),
-    Camera = require('cordova/plugin/CameraConstants');
+    Camera = require('cordova/plugin/CameraConstants'),
+    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');
 
 var cameraExport = {};
 
@@ -61,6 +62,7 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
                 mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions];
 
     exec(successCallback, errorCallback, "Camera", "takePicture", args);
+    return new CameraPopoverHandle();
 };
 
 cameraExport.cleanup = function(successCallback, errorCallback) {

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/73b6ecef/lib/common/plugin/CameraPopoverHandle.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CameraPopoverHandle.js b/lib/common/plugin/CameraPopoverHandle.js
new file mode 100644
index 0000000..7a4c32d
--- /dev/null
+++ b/lib/common/plugin/CameraPopoverHandle.js
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var exec = require('cordova/exec');
+
+/**
+ * A handle to an image picker popover.
+ */
+var CameraPopoverHandle = function() {
+    this.setPosition = function(popoverOptions) {
+        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');
+    };
+};
+
+module.exports = CameraPopoverHandle;

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/73b6ecef/lib/ios/plugin/CameraPopoverHandle.js
----------------------------------------------------------------------
diff --git a/lib/ios/plugin/CameraPopoverHandle.js b/lib/ios/plugin/CameraPopoverHandle.js
new file mode 100644
index 0000000..fc48c11
--- /dev/null
+++ b/lib/ios/plugin/CameraPopoverHandle.js
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var exec = require('cordova/exec');
+
+/**
+ * A handle to an image picker popover.
+ */
+var CameraPopoverHandle = function() {
+    this.setPosition = function(popoverOptions) {
+        var args = [ popoverOptions ];
+        exec(null, null, "Camera", "repositionPopover", args);
+    };
+};
+
+module.exports = CameraPopoverHandle;


[20/40] js commit: Added .gitignore so I can add an empty directory to git

Posted by ag...@apache.org.
Added .gitignore so I can add an empty directory to git


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

Branch: refs/heads/cb2227
Commit: d179d3b5af20d52b811fb2007e23b0a17123f8ba
Parents: 090ab87
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Mar 6 13:27:26 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Mar 6 13:27:26 2013 -0800

----------------------------------------------------------------------
 0 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/d179d3b5/lib/osx/plugin/osx/.gitignore
----------------------------------------------------------------------
diff --git a/lib/osx/plugin/osx/.gitignore b/lib/osx/plugin/osx/.gitignore
new file mode 100644
index 0000000..e69de29