ripple-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject incubator-ripple git commit: RIPPLE-85 Button index is adjusted twice in notifications.
Date Thu, 18 Jun 2015 20:38:09 GMT
Repository: incubator-ripple
Updated Branches:
  refs/heads/master 5df827fb4 -> c8978cdff


RIPPLE-85 Button index is adjusted twice in notifications.

This closes #55


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/c8978cdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/c8978cdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/c8978cdf

Branch: refs/heads/master
Commit: c8978cdff117466c7fb8e15525efe4a935169b3f
Parents: 5df827f
Author: Arzhan Kinzhalin <arzhan.i.kinzhalin@intel.com>
Authored: Fri May 15 02:36:51 2015 -0300
Committer: Tim Barham <tim.barham@microsoft.com>
Committed: Fri Jun 19 06:32:56 2015 +1000

----------------------------------------------------------------------
 lib/client/notifications.js                              | 3 ++-
 lib/client/platform/cordova/2.0.0/bridge/notification.js | 6 +-----
 2 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/c8978cdf/lib/client/notifications.js
----------------------------------------------------------------------
diff --git a/lib/client/notifications.js b/lib/client/notifications.js
index 4022073..5ee5d38 100644
--- a/lib/client/notifications.js
+++ b/lib/client/notifications.js
@@ -93,8 +93,9 @@ function _processConfirm (message,resultCallback,title,buttonLabels) {
         var button = {};
         button["text"] = btnLabel;
         button["click"] = function () {
-            if(resultCallback !== typeof "undefined")
+            if (typeof resultCallback !== "undefined") {
                 resultCallback(index+1);
+            }
             jQuery( this ).dialog( "close" );
         };
         buttons.push(button);

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/c8978cdf/lib/client/platform/cordova/2.0.0/bridge/notification.js
----------------------------------------------------------------------
diff --git a/lib/client/platform/cordova/2.0.0/bridge/notification.js b/lib/client/platform/cordova/2.0.0/bridge/notification.js
index 25dc34d..cc9b93f 100644
--- a/lib/client/platform/cordova/2.0.0/bridge/notification.js
+++ b/lib/client/platform/cordova/2.0.0/bridge/notification.js
@@ -40,11 +40,7 @@ module.exports = {
         if( Object.prototype.toString.call( buttonLabels ) === '[object Array]' ) {
             buttonLabels = buttonLabels.join(',');
         }
-        var callback = resultCallback && function(r) {
-            resultCallback(++r);
-        };
-
-        notifications.confirmNotification(message, callback, title, buttonLabels);
+        notifications.confirmNotification(message, resultCallback, title, buttonLabels);
     },
 
     activityStart: function () {


Mime
View raw message