kopia lustrzana https://github.com/c9/core
fix error when dialog confirm is called without options
rodzic
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");
|
||||
|
|
Ładowanie…
Reference in New Issue