jellyfin-web/dashboard-ui/cordova/prompt.js

17 lines
513 B
JavaScript
Raw Normal View History

2015-10-01 23:14:04 -07:00
define([], function () {
return function (options) {
var callback = function (result) {
if (result.buttonIndex == 1) {
options.callback(result.input1);
} else {
options.callback(null);
}
};
var buttonLabels = [Globalize.translate('ButtonOk'), Globalize.translate('ButtonCancel')];
navigator.notification.prompt(options.text, callback, options.title, buttonLabels, options.defaultText || '');
};
});