cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-windows git commit: Update JS snapshot to version 3.9.0-dev (via coho)
Date Fri, 08 May 2015 23:43:31 GMT
Repository: cordova-windows
Updated Branches:
  refs/heads/master 61057cf8f -> 70d33fea4


Update JS snapshot to version 3.9.0-dev (via coho)


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

Branch: refs/heads/master
Commit: 70d33fea4ae71ccc083fdcdea7d34d784ef09727
Parents: 61057cf
Author: Steve Gill <stevengill97@gmail.com>
Authored: Fri May 8 16:25:57 2015 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Fri May 8 16:25:57 2015 -0700

----------------------------------------------------------------------
 template/www/cordova.js | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/70d33fea/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/template/www/cordova.js b/template/www/cordova.js
index 79a6ba5..bb1d6b7 100644
--- a/template/www/cordova.js
+++ b/template/www/cordova.js
@@ -1,5 +1,5 @@
 // Platform: windows
-// fc4db9145934bd0053161cbf9ffc0caf83b770c6
+// b0463746dd842818c1f08560e998ec847460596c
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -101,10 +101,15 @@ if (typeof module === "object" && typeof require === "function")
{
 // file: src/cordova.js
 define("cordova", function(require, exports, module) {
 
+if(window.cordova){
+    throw new Error("cordova already defined");
+}
+
 
 var channel = require('cordova/channel');
 var platform = require('cordova/platform');
 
+
 /**
  * Intercept calls to addEventListener + removeEventListener and handle deviceready,
  * resume, and pause events.
@@ -855,18 +860,32 @@ module.exports = function (success, fail, service, action, args) {
             // CB-5806 [Windows8] Add keepCallback support to proxy
             onSuccess = function (result, callbackOptions) {
                 callbackOptions = callbackOptions || {};
+                var callbackStatus;
+                if (callbackOptions.status !== null) {
+                    callbackStatus = callbackOptions.status;
+                }
+                else {
+                    callbackStatus = cordova.callbackStatus.OK;
+                }
                 cordova.callbackSuccess(callbackOptions.callbackId || callbackId,
                     {
-                        status: callbackOptions.status || cordova.callbackStatus.OK,
+                        status: callbackStatus,
                         message: result,
                         keepCallback: callbackOptions.keepCallback || false
                     });
             };
             onError = function (err, callbackOptions) {
                 callbackOptions = callbackOptions || {};
+                var callbackStatus;
+                if (callbackOptions.status !== null) {
+                    callbackStatus = callbackOptions.status;
+                }
+                else {
+                    callbackStatus = cordova.callbackStatus.OK;
+                }
                 cordova.callbackError(callbackOptions.callbackId || callbackId,
                     {
-                        status: callbackOptions.status || cordova.callbackStatus.ERROR,
+                        status: callbackStatus,
                         message: err,
                         keepCallback: callbackOptions.keepCallback || false
                     });
@@ -882,6 +901,7 @@ module.exports = function (success, fail, service, action, args) {
         }
     }
 };
+
 });
 
 // file: src/common/exec/proxy.js


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


Mime
View raw message