Repository: cordova-plugin-dialogs
Updated Branches:
  refs/heads/master cf2233492 -> d4344558d


Update notification.js

"The callback takes the argument buttonIndex (Number), which is the index of 
the pressed button. Note that the index uses one-based indexing, so the value 
is 1, 2, 3, etc."

callback 0 is reserved for the buttons turns the platforms that exist these 
buttons.

before: 
button index 0 return 0 in callback; - YES
button index 1 return 1 in callback; - NO

after:
button index 0 return 1 in callback; - YES
button index 0 return 1 in callback; - NO

Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/03d7f681
Tree: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/03d7f681
Diff: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/03d7f681

Branch: refs/heads/master
Commit: 03d7f6818355d5f1e11ad0bd2cf016a284bb3af0
Parents: f8e1e9e
Author: tortoyoyo <tortoy...@gmail.com>
Authored: Fri Jan 17 17:32:32 2014 -0200
Committer: tortoyoyo <tortoy...@gmail.com>
Committed: Fri Jan 17 17:32:32 2014 -0200

----------------------------------------------------------------------
 src/firefoxos/notification.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/03d7f681/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/notification.js b/src/firefoxos/notification.js
index 7362934..0ef2808 100644
--- a/src/firefoxos/notification.js
+++ b/src/firefoxos/notification.js
@@ -38,7 +38,7 @@ function modal(message, callback, title, buttonLabels, 
domObjects) {
     box.appendChild(menu);
     for (var index = 0; index < buttonLabels.length; index++) {
         // TODO: last button listens to the cancel key
-        addButton(buttonLabels[index], index, (index === 0));
+        addButton(buttonLabels[index], (index+1), (index === 0));
     }
     document.body.appendChild(box);
 


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

Reply via email to