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:49:07 UTC
[23/40] js commit: [WindowsPhone] CB2592, remove CordovaCommandResult
[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);
- }
-};