cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [2/2] cordova-plugin-dialogs git commit: [firefox] Fix merge conflict, re-apply #12
Date Thu, 19 Nov 2015 06:00:01 GMT
[firefox] Fix merge conflict, re-apply #12


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/d4344558
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/d4344558
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/d4344558

Branch: refs/heads/master
Commit: d4344558d2bd9e5bf8681fc9ecfb9f5b4cae4294
Parents: cf22334 03d7f68
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Wed Nov 18 21:56:22 2015 -0800
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Wed Nov 18 21:59:46 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/d4344558/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --cc src/firefoxos/notification.js
index b6986fd,0ef2808..18bce8b
--- a/src/firefoxos/notification.js
+++ b/src/firefoxos/notification.js
@@@ -57,18 -34,19 +57,19 @@@ function modal(message, callback, title
          section.appendChild(domObjects);
      }
      // add buttons and assign callbackButton on click
 -    var menu = document.createElement('menu');
 +    var menu = modalDocument.createElement('menu');
      box.appendChild(menu);
      for (var index = 0; index < buttonLabels.length; index++) {
-         addButton(buttonLabels[index], index, (index === 0));
+         // TODO: last button listens to the cancel key
+         addButton(buttonLabels[index], (index+1), (index === 0));
      }
 -    document.body.appendChild(box);
 +    modalDocument.body.appendChild(box);
  
      function addButton(label, index, recommended) {
 -        var button = document.createElement('button');
 -        button.appendChild(document.createTextNode(label));
 -        button.labelIndex = index;
 -        button.addEventListener('click', callbackButton, false);
 +        var thisButtonCallback = makeCallbackButton(index + 1);
 +        var button = modalDocument.createElement('button');
 +        button.appendChild(modalDocument.createTextNode(label));
 +        button.addEventListener('click', thisButtonCallback, false);
          if (recommended) {
            // TODO: default one listens to Enter key
            button.classList.add('recommend');


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


Mime
View raw message