cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [11/15] git commit: new plugin execute arguments supported
Date Mon, 28 Oct 2013 22:12:19 GMT
new plugin execute arguments supported


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

Branch: refs/heads/master
Commit: 77a73ece0fc90a8a60d12eabf0b7aa3db112f29d
Parents: 25e6a24
Author: Piotr Zalewa <piotr@zalewa.info>
Authored: Fri Oct 25 11:19:15 2013 +0200
Committer: Piotr Zalewa <piotr@zalewa.info>
Committed: Fri Oct 25 11:19:15 2013 +0200

----------------------------------------------------------------------
 src/firefoxos/notification.js | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/77a73ece/src/firefoxos/notification.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/notification.js b/src/firefoxos/notification.js
index e31eef7..7362934 100644
--- a/src/firefoxos/notification.js
+++ b/src/firefoxos/notification.js
@@ -65,16 +65,26 @@ var Notification = {
     vibrate: function(milliseconds) {
         navigator.vibrate(milliseconds);
     },
-    alert: function(successCallback, errorCallback, message, title, buttonName) {
+    alert: function(successCallback, errorCallback, args) {
+        var message = args[0];
+        var title = args[1];
+        var _buttonLabels = [args[2]];
         var _callback = (successCallback || _empty);
-        var _buttonLabels = [buttonName];
         modal(message, _callback, title, _buttonLabels);
     },
-    confirm: function(successCallback, errorCallback, message, title, buttonLabels) {
+    confirm: function(successCallback, errorCallback, args) {
+        var message = args[0];
+        var title = args[1];
+        var buttonLabels = args[2];
         var _callback = (successCallback || _empty);
         modal(message, _callback, title, buttonLabels);
     },
-    prompt: function(successCallback, errorCallback, message, title, buttonLabels, defaultText)
{
+    prompt: function(successCallback, errorCallback, args) {
+        console.log(args);
+        var message = args[0];
+        var title = args[1];
+        var buttonLabels = args[2];
+        var defaultText = args[3];
         var _tempcallback = (successCallback || _empty);
         function _callback(labelIndex) {
             var content = document.getElementById('prompt-input').value;


Mime
View raw message