[ https://issues.apache.org/jira/browse/CB-2679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13602268#comment-13602268
]
James Jong edited comment on CB-2679 at 3/14/13 1:40 PM:
---------------------------------------------------------
Proposed JS (note buttonLabels are an Array to avoid bug CB-1933)
/**
* Open a native prompt dialog, with a customizable title and button text.
* The result that the user selects is returned to the result callback.
*
* @param {String} message Dialog message to display
* @param {Function} resultCallback The callback that is called when user clicks
on a button.
* @param {String} title Title of the dialog (default: "Prompt")
* @param {Array} buttonLabels Array of strings for the button labels (default:
["OK","Cancel"])
*/
prompt: function(message, resultCallback, title, buttonLabels) {
var _title = (title || "Prompt");
var _buttonLabels = (buttonLabels || ["OK","Cancel"]);
exec(resultCallback, null, "Notification", "prompt", [message, _title, _buttonLabels]);
},
was (Author: wjamesjong):
Proposed JS (note buttonLabels are an Array to avoid bug CB-1933
/**
* Open a native prompt dialog, with a customizable title and button text.
* The result that the user selects is returned to the result callback.
*
* @param {String} message Dialog message to display
* @param {Function} resultCallback The callback that is called when user clicks
on a button.
* @param {String} title Title of the dialog (default: "Prompt")
* @param {Array} buttonLabels Array of strings for the button labels (default:
["OK","Cancel"])
*/
prompt: function(message, resultCallback, title, buttonLabels) {
var _title = (title || "Prompt");
var _buttonLabels = (buttonLabels || ["OK","Cancel"]);
exec(resultCallback, null, "Notification", "prompt", [message, _title, _buttonLabels]);
},
> add prompt dialog to Notification API for JS
> --------------------------------------------
>
> Key: CB-2679
> URL: https://issues.apache.org/jira/browse/CB-2679
> Project: Apache Cordova
> Issue Type: Sub-task
> Components: CordovaJS
> Reporter: James Jong
> Assignee: James Jong
> Fix For: Master
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|