You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2016/07/11 13:44:21 UTC

cordova-windows git commit: CB-11522 Save raw 'detail' object to activation context

Repository: cordova-windows
Updated Branches:
  refs/heads/master 4b377d70d -> b751825b5


CB-11522 Save raw 'detail' object to activation context

Adds activationContext.raw property to avoid losing the types (for ActivationKind.file case for example)

This closes #183


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

Branch: refs/heads/master
Commit: b751825b5d9fed88f9ee2cb060d64ef7f365c57f
Parents: 4b377d7
Author: daserge <v-...@microsoft.com>
Authored: Wed Jul 6 18:56:52 2016 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Mon Jul 11 16:42:55 2016 +0300

----------------------------------------------------------------------
 cordova-js-src/platform.js |  3 ++-
 template/www/cordova.js    | 15 ++++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/b751825b/cordova-js-src/platform.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js
index 38de052..1f9ddbd 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/platform.js
@@ -58,7 +58,8 @@ module.exports = {
             // activationContext:{type: actType, args: args};
             var activationHandler = function (e) {
                 // Making all the details available as activationContext
-                platform.activationContext = utils.clone(e.detail); 
+                platform.activationContext = utils.clone(e.detail);         /* CB-10653 to avoid losing detail properties for some activation kinds */
+                platform.activationContext.raw = e.detail;                  /* CB-11522 to preserve types */
                 platform.activationContext.args = e.detail.arguments;       /* for backwards compatibility */
 
                 function makePromise(fn) {

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/b751825b/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/template/www/cordova.js b/template/www/cordova.js
index ff2c7f2..00c10f7 100644
--- a/template/www/cordova.js
+++ b/template/www/cordova.js
@@ -1,5 +1,5 @@
 \ufeff// Platform: windows
-// 2fd4bcb84048415922d13d80d35b8d1668e8e150
+// 886843febcc34d7248dfd968fde2e00a34c9be29
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -817,7 +817,7 @@ module.exports = channel;
 
 });
 
-// file: D:/cordova/cordova-windows/cordova-js-src/confighelper.js
+// file: F:/coho/cordova-windows/cordova-js-src/confighelper.js
 define("cordova/confighelper", function(require, exports, module) {
 
 // config.xml wrapper (non-node ConfigParser analogue)
@@ -891,7 +891,7 @@ exports.readConfig = readConfig;
 
 });
 
-// file: D:/cordova/cordova-windows/cordova-js-src/exec.js
+// file: F:/coho/cordova-windows/cordova-js-src/exec.js
 define("cordova/exec", function(require, exports, module) {
 
 /*jslint sloppy:true, plusplus:true*/
@@ -1482,7 +1482,7 @@ exports.reset();
 
 });
 
-// file: D:/cordova/cordova-windows/cordova-js-src/platform.js
+// file: F:/coho/cordova-windows/cordova-js-src/platform.js
 define("cordova/platform", function(require, exports, module) {
 
 module.exports = {
@@ -1524,7 +1524,8 @@ module.exports = {
             // activationContext:{type: actType, args: args};
             var activationHandler = function (e) {
                 // Making all the details available as activationContext
-                platform.activationContext = utils.clone(e.detail); 
+                platform.activationContext = utils.clone(e.detail);         /* CB-10653 to avoid losing detail properties for some activation kinds */
+                platform.activationContext.raw = e.detail;                  /* CB-11522 to preserve types */
                 platform.activationContext.args = e.detail.arguments;       /* for backwards compatibility */
 
                 function makePromise(fn) {
@@ -1800,7 +1801,7 @@ exports.load = function(callback) {
 
 });
 
-// file: D:/cordova/cordova-windows/cordova-js-src/splashscreen.js
+// file: F:/coho/cordova-windows/cordova-js-src/splashscreen.js
 define("cordova/splashscreen", function(require, exports, module) {
 
 var isPhone = (cordova.platformId == 'windows') && WinJS.Utilities.isPhone;
@@ -2233,7 +2234,7 @@ utils.clone = function(obj) {
 
     retVal = {};
     for(i in obj){
-        if(!(i in retVal) || retVal[i] != obj[i]) {
+        if((!(i in retVal) || retVal[i] != obj[i]) && typeof obj[i] != 'undefined') {
             retVal[i] = utils.clone(obj[i]);
         }
     }


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