cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject js commit: CB-8157 renamed windowsphone to wp8 to match cordova-lib id
Date Sun, 14 Dec 2014 22:42:56 GMT
Repository: cordova-js
Updated Branches:
  refs/heads/master 41cba6d14 -> c3d61481b


CB-8157 renamed windowsphone to wp8 to match cordova-lib id


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

Branch: refs/heads/master
Commit: c3d61481b7698c8d42178a0cdfa4eef68faa381b
Parents: 41cba6d
Author: Steve Gill <stevengill97@gmail.com>
Authored: Sun Dec 14 14:42:50 2014 -0800
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Sun Dec 14 14:42:50 2014 -0800

----------------------------------------------------------------------
 Gruntfile.js                 |  4 +--
 src/windowsphone/exec.js     | 76 ---------------------------------------
 src/windowsphone/platform.js | 34 ------------------
 src/wp8/exec.js              | 76 +++++++++++++++++++++++++++++++++++++++
 src/wp8/platform.js          | 34 ++++++++++++++++++
 5 files changed, 112 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/c3d61481/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 7635891..754bad2 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -28,7 +28,7 @@ module.exports = function(grunt) {
             "osx": {},
             "test": {},
             "windows": { useWindowsLineEndings: true },
-            "windowsphone": { useWindowsLineEndings: true },
+            "wp8": { useWindowsLineEndings: true },
             "firefoxos": {},
             "webos": {},
             "ubuntu": {},
@@ -42,7 +42,7 @@ module.exports = function(grunt) {
             "osx": {},
             //"test": {},
             "windows": { useWindowsLineEndings: true },
-            "windowsphone": { useWindowsLineEndings: true },
+            "wp8": { useWindowsLineEndings: true },
             "firefoxos": {},
             "ubuntu": {},
             "browser": {}

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/c3d61481/src/windowsphone/exec.js
----------------------------------------------------------------------
diff --git a/src/windowsphone/exec.js b/src/windowsphone/exec.js
deleted file mode 100644
index 25fcf5c..0000000
--- a/src/windowsphone/exec.js
+++ /dev/null
@@ -1,76 +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'),
-    base64 = require('cordova/base64');
-
-/**
- * Execute a cordova command.  It is up to the native side whether this action
- * is synchronous or asynchronous.  The native side can return:
- *      Synchronous: PluginResult object as a JSON string
- *      Asynchronous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success    The success callback
- * @param {Function} fail       The fail callback
- * @param {String} service      The name of the service to use
- * @param {String} action       Action to be run in cordova
- * @param {String[]} [args]     Zero or more arguments to pass to the method
-
- */
-
-module.exports = function(success, fail, service, action, args) {
-
-    var callbackId = service + cordova.callbackId++;
-    if (typeof success == "function" || typeof fail == "function") {
-        cordova.callbacks[callbackId] = {success:success, fail:fail};
-    }
-    args = args || [];
-    // generate a new command string, ex. DebugConsole/log/DebugConsole23/["wtf dude?"]
-    for(var n = 0; n < args.length; n++)
-    {
-        // special case for ArrayBuffer which could not be stringified out of the box
-        if(typeof ArrayBuffer !== "undefined" && args[n] instanceof ArrayBuffer)
-        {
-            args[n] = base64.fromArrayBuffer(args[n]);
-        }
-
-        if(typeof args[n] !== "string")
-        {
-            args[n] = JSON.stringify(args[n]);
-        }
-    }
-    var command = service + "/" + action + "/" + callbackId + "/" + JSON.stringify(args);
-    // pass it on to Notify
-    try {
-        if(window.external) {
-            window.external.Notify(command);
-        }
-        else {
-            console.log("window.external not available :: command=" + command);
-        }
-    }
-    catch(e) {
-        console.log("Exception calling native with command :: " + command + " :: exception="
+ e);
-    }
-};
-

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/c3d61481/src/windowsphone/platform.js
----------------------------------------------------------------------
diff --git a/src/windowsphone/platform.js b/src/windowsphone/platform.js
deleted file mode 100644
index 237d4f5..0000000
--- a/src/windowsphone/platform.js
+++ /dev/null
@@ -1,34 +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.
- *
-*/
-
-module.exports = {
-    id: 'windowsphone',
-    bootstrap: function() {
-        var cordova = require('cordova'),
-               exec = require('cordova/exec');
-
-        // 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() {
-            exec(null, null, "CoreEvents", "overridebackbutton", [this.numHandlers == 1]);
-        };
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/c3d61481/src/wp8/exec.js
----------------------------------------------------------------------
diff --git a/src/wp8/exec.js b/src/wp8/exec.js
new file mode 100644
index 0000000..25fcf5c
--- /dev/null
+++ b/src/wp8/exec.js
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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'),
+    base64 = require('cordova/base64');
+
+/**
+ * Execute a cordova command.  It is up to the native side whether this action
+ * is synchronous or asynchronous.  The native side can return:
+ *      Synchronous: PluginResult object as a JSON string
+ *      Asynchronous: Empty string ""
+ * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
+ * depending upon the result of the action.
+ *
+ * @param {Function} success    The success callback
+ * @param {Function} fail       The fail callback
+ * @param {String} service      The name of the service to use
+ * @param {String} action       Action to be run in cordova
+ * @param {String[]} [args]     Zero or more arguments to pass to the method
+
+ */
+
+module.exports = function(success, fail, service, action, args) {
+
+    var callbackId = service + cordova.callbackId++;
+    if (typeof success == "function" || typeof fail == "function") {
+        cordova.callbacks[callbackId] = {success:success, fail:fail};
+    }
+    args = args || [];
+    // generate a new command string, ex. DebugConsole/log/DebugConsole23/["wtf dude?"]
+    for(var n = 0; n < args.length; n++)
+    {
+        // special case for ArrayBuffer which could not be stringified out of the box
+        if(typeof ArrayBuffer !== "undefined" && args[n] instanceof ArrayBuffer)
+        {
+            args[n] = base64.fromArrayBuffer(args[n]);
+        }
+
+        if(typeof args[n] !== "string")
+        {
+            args[n] = JSON.stringify(args[n]);
+        }
+    }
+    var command = service + "/" + action + "/" + callbackId + "/" + JSON.stringify(args);
+    // pass it on to Notify
+    try {
+        if(window.external) {
+            window.external.Notify(command);
+        }
+        else {
+            console.log("window.external not available :: command=" + command);
+        }
+    }
+    catch(e) {
+        console.log("Exception calling native with command :: " + command + " :: exception="
+ e);
+    }
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/c3d61481/src/wp8/platform.js
----------------------------------------------------------------------
diff --git a/src/wp8/platform.js b/src/wp8/platform.js
new file mode 100644
index 0000000..237d4f5
--- /dev/null
+++ b/src/wp8/platform.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.
+ *
+*/
+
+module.exports = {
+    id: 'windowsphone',
+    bootstrap: function() {
+        var cordova = require('cordova'),
+               exec = require('cordova/exec');
+
+        // 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() {
+            exec(null, null, "CoreEvents", "overridebackbutton", [this.numHandlers == 1]);
+        };
+    }
+};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message