mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
fix error when dialog confirm is called without options
This commit is contained in:
parent
8ab86d0474
commit
95da3f84fa
@ -23,9 +23,12 @@ define(function(require, module, exports) {
|
||||
|
||||
function show(title, header, msg, onconfirm, oncancel, options) {
|
||||
return plugin.queue(function(){
|
||||
if (!options)
|
||||
options = {};
|
||||
|
||||
plugin.title = title;
|
||||
plugin.heading = options && options.isHTML ? header : util.escapeXml(header);
|
||||
plugin.body = options && options.isHTML ? msg : util.escapeXml(msg).replace(/\n/g, "<br>");
|
||||
plugin.heading = options.isHTML ? header : util.escapeXml(header);
|
||||
plugin.body = options.isHTML ? msg : util.escapeXml(msg).replace(/\n/g, "<br>");
|
||||
|
||||
plugin.getElement("ok").setCaption(options.yes || options.ok || "OK");
|
||||
plugin.getElement("cancel").setCaption(options.no || options.cancel || "Cancel");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user