ax5ui-dialog
Advanced tools
Comparing version 1.4.95 to 1.4.96
{ | ||
"name": "ax5ui-dialog", | ||
"version": "1.4.95", | ||
"version": "1.4.96", | ||
"description": "A dialog plugin that works with Bootstrap & jQuery", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -62,2 +62,4 @@ "use strict"; | ||
this.autoCloseTimer = null; | ||
this.queue = []; | ||
cfg = this.config; | ||
@@ -123,5 +125,10 @@ | ||
this.dialogConfig = opts; | ||
this.activeDialog = jQuery('#' + opts.id); | ||
this.activeDialog.css({ width: box.width }); | ||
if (typeof callback === "undefined") { | ||
callback = opts.callback; | ||
} | ||
// dialog 높이 구하기 - 너비가 정해지면 높이가 변경 될 것. | ||
@@ -372,18 +379,3 @@ opts.height = box.height = this.activeDialog.height(); | ||
if (this.activeDialog) { | ||
// try one more | ||
if (!tryCount) { | ||
setTimeout(function () { | ||
this.alert(opts, callback, 1); | ||
}.bind(this), Number(cfg.animateTime) + 100); | ||
} else { | ||
console.log(ax5.info.getError("ax5dialog", "501", "alert")); | ||
} | ||
return this; | ||
} | ||
self.dialogConfig = {}; | ||
jQuery.extend(true, self.dialogConfig, cfg, opts); | ||
opts = self.dialogConfig; | ||
opts = jQuery.extend(true, {}, cfg, opts); | ||
opts.dialogType = "alert"; | ||
@@ -398,4 +390,8 @@ opts.theme = opts.theme || cfg.theme || ""; | ||
} | ||
open.call(this, opts, callback); | ||
if (this.activeDialog) { | ||
this.queue.push(opts); | ||
} else { | ||
open.call(this, opts, callback); | ||
} | ||
return this; | ||
@@ -440,18 +436,3 @@ }; | ||
if (this.activeDialog) { | ||
// try one more | ||
if (!tryCount) { | ||
setTimeout(function () { | ||
this.confirm(opts, callback, 1); | ||
}.bind(this), Number(cfg.animateTime) + 100); | ||
} else { | ||
console.log(ax5.info.getError("ax5dialog", "501", "confirm")); | ||
} | ||
return this; | ||
} | ||
self.dialogConfig = {}; | ||
jQuery.extend(true, self.dialogConfig, cfg, opts); | ||
opts = self.dialogConfig; | ||
opts = jQuery.extend(true, {}, cfg, opts); | ||
opts.dialogType = "confirm"; | ||
@@ -467,4 +448,9 @@ opts.theme = opts.theme || cfg.theme || ""; | ||
} | ||
open.call(this, opts, callback); | ||
if (this.activeDialog) { | ||
this.queue.push(opts); | ||
} else { | ||
open.call(this, opts, callback); | ||
} | ||
return this; | ||
@@ -506,17 +492,3 @@ }; | ||
if (this.activeDialog) { | ||
// try one more | ||
if (!tryCount) { | ||
setTimeout(function () { | ||
this.prompt(opts, callback, 1); | ||
}.bind(this), Number(cfg.animateTime) + 100); | ||
} else { | ||
console.log(ax5.info.getError("ax5dialog", "501", "prompt")); | ||
} | ||
return this; | ||
} | ||
self.dialogConfig = {}; | ||
jQuery.extend(true, self.dialogConfig, cfg, opts); | ||
opts = self.dialogConfig; | ||
opts = jQuery.extend(true, {}, cfg, opts); | ||
opts.dialogType = "prompt"; | ||
@@ -537,4 +509,9 @@ opts.theme = opts.theme || cfg.theme || ""; | ||
} | ||
open.call(this, opts, callback); | ||
if (this.activeDialog) { | ||
this.queue.push(opts); | ||
} else { | ||
open.call(this, opts, callback); | ||
} | ||
return this; | ||
@@ -560,2 +537,3 @@ }; | ||
opts = self.dialogConfig; | ||
this.activeDialog.addClass("destroy"); | ||
@@ -587,2 +565,6 @@ jQuery(window).unbind("keydown.ax5dialog"); | ||
if (this.queue && this.queue.length) { | ||
open.call(this, this.queue.shift()); | ||
} | ||
opts = null; | ||
@@ -589,0 +571,0 @@ that = null; |
@@ -1,2 +0,2 @@ | ||
"use strict";!function(){var i=ax5.ui,t=ax5.util,e=void 0;i.addClass({className:"dialog"},function(){var l=function(){var l=this,n=void 0;this.instanceId=ax5.getGuid(),this.config={id:"ax5-dialog-"+this.instanceId,clickEventName:"click",theme:"default",width:300,title:"",msg:"",lang:{ok:"ok",cancel:"cancel"},animateTime:150,autoCloseTime:0},this.activeDialog=null,this.autoCloseTimer=null,n=this.config;var a=function(i,t){return i&&i.onStateChanged?i.onStateChanged.call(t,t):this.onStateChanged&&this.onStateChanged.call(t,t),t=null,!0},o=function(i,l){var a={dialogId:i,title:l.title||n.title||"",msg:(l.msg||n.msg||"").replace(/\n/g,"<br/>"),input:l.input,btns:l.btns,_crlf:function(){return this.replace(/\n/g,"<br/>")},additionalContent:function(i){return t.isFunction(i)?i.call(l):i}(l.additionalContent)};try{return e.tmpl.get.call(this,"dialogDisplay",a)}finally{a=null}},d=function(i,t){var e={},d=void 0;i.id=i.id||n.id,d={width:i.width},jQuery(document.body).append(o.call(this,i.id,i)),this.activeDialog=jQuery("#"+i.id),this.activeDialog.css({width:d.width}),i.height=d.height=this.activeDialog.height(),"undefined"==typeof i.position||"center"===i.position?(e.top=jQuery(window).height()/2-d.height/2,e.left=jQuery(window).width()/2-d.width/2):(e.left=i.position.left||0,e.top=i.position.top||0),n.zIndex&&(e["z-index"]=n.zIndex),this.activeDialog.css(e),"prompt"===i.dialogType?this.activeDialog.find("[data-dialog-prompt]").get(0).focus():this.activeDialog.find("[data-dialog-btn]").get(0).focus(),this.activeDialog.find("[data-dialog-btn]").on(n.clickEventName,function(e){c.call(this,e||window.event,i,t)}.bind(this)),jQuery(window).bind("keydown.ax5dialog",function(e){u.call(this,e||window.event,i,t)}.bind(this)),jQuery(window).bind("resize.ax5dialog",function(i){s.call(this,i||window.event)}.bind(this)),a.call(this,i,{self:this,state:"open"}),i.autoCloseTime&&(this.autoCloseTimer=setTimeout(function(){l.close()},i.autoCloseTime)),e=null,d=null},s=function(i){if(!this.activeDialog)return this;var t=l.dialogConfig,e={width:t.width,height:t.height};return"undefined"==typeof t.position||"center"===t.position?(e.top=window.innerHeight/2-e.height/2,e.left=window.innerWidth/2-e.width/2):(e.left=t.position.left||0,e.top=t.position.top||0),e.left<0&&(e.left=0),e.top<0&&(e.top=0),this.activeDialog.css(e),t=null,e=null,this},c=function(i,e,l,n,a){var o=void 0,d=null;if(i.srcElement&&(i.target=i.srcElement),n=t.findParentNode(i.target,function(i){if(i.getAttribute("data-dialog-btn"))return!0})){if(a=n.getAttribute("data-dialog-btn"),o={self:this,key:a,value:e.btns[a],dialogId:e.id,btnTarget:n},"prompt"===e.dialogType)for(var s in e.input)if(o[s]=this.activeDialog.find("[data-dialog-prompt="+s+"]").val(),""==o[s]||null==o[s]){d=s;break}if(e.btns[a].onClick)e.btns[a].onClick.call(o,a);else if("alert"===e.dialogType)l&&l.call(o,a),this.close({doNotCallback:!0});else if("confirm"===e.dialogType)l&&l.call(o,a),this.close({doNotCallback:!0});else if("prompt"===e.dialogType){if("ok"===a&&d)return this.activeDialog.find('[data-dialog-prompt="'+d+'"]').get(0).focus(),!1;l&&l.call(o,a),this.close({doNotCallback:!0})}}o=null,e=null,l=null,n=null,a=null},u=function(i,t,e,l,n){var a=void 0,o=null;if(i.keyCode==ax5.info.eventKeys.ESC&&this.close(),"prompt"===t.dialogType&&i.keyCode==ax5.info.eventKeys.RETURN){a={self:this,key:n,value:t.btns[n],dialogId:t.id,btnTarget:l};for(var d in t.input)if(a[d]=this.activeDialog.find("[data-dialog-prompt="+d+"]").val(),""==a[d]||null==a[d]){o=d;break}if(o)return a=null,o=null,!1;e&&e.call(a,n),this.close({doNotCallback:!0})}a=null,o=null,t=null,e=null,l=null,n=null};this.init=function(){this.onStateChanged=n.onStateChanged},this.alert=function(i,e,a){return t.isString(i)&&(i={title:n.title,msg:i}),this.activeDialog?(a?console.log(ax5.info.getError("ax5dialog","501","alert")):setTimeout(function(){this.alert(i,e,1)}.bind(this),Number(n.animateTime)+100),this):(l.dialogConfig={},jQuery.extend(!0,l.dialogConfig,n,i),i=l.dialogConfig,i.dialogType="alert",i.theme=i.theme||n.theme||"",i.callback=e,"undefined"==typeof i.btns&&(i.btns={ok:{label:n.lang.ok,theme:i.theme}}),d.call(this,i,e),this)},this.confirm=function(i,e,a){return t.isString(i)&&(i={title:n.title,msg:i}),this.activeDialog?(a?console.log(ax5.info.getError("ax5dialog","501","confirm")):setTimeout(function(){this.confirm(i,e,1)}.bind(this),Number(n.animateTime)+100),this):(l.dialogConfig={},jQuery.extend(!0,l.dialogConfig,n,i),i=l.dialogConfig,i.dialogType="confirm",i.theme=i.theme||n.theme||"",i.callback=e,"undefined"==typeof i.btns&&(i.btns={ok:{label:n.lang.ok,theme:i.theme},cancel:{label:n.lang.cancel}}),d.call(this,i,e),this)},this.prompt=function(i,e,a){return t.isString(i)&&(i={title:n.title,msg:i}),this.activeDialog?(a?console.log(ax5.info.getError("ax5dialog","501","prompt")):setTimeout(function(){this.prompt(i,e,1)}.bind(this),Number(n.animateTime)+100),this):(l.dialogConfig={},jQuery.extend(!0,l.dialogConfig,n,i),i=l.dialogConfig,i.dialogType="prompt",i.theme=i.theme||n.theme||"",i.callback=e,"undefined"==typeof i.input&&(i.input={value:{label:""}}),"undefined"==typeof i.btns&&(i.btns={ok:{label:n.lang.ok,theme:i.theme},cancel:{label:n.lang.cancel}}),d.call(this,i,e),this)},this.close=function(i){var t=void 0,e=void 0;return this.activeDialog&&(this.autoCloseTimer&&clearTimeout(this.autoCloseTimer),t=l.dialogConfig,this.activeDialog.addClass("destroy"),jQuery(window).unbind("keydown.ax5dialog"),jQuery(window).unbind("resize.ax5dialog"),setTimeout(function(){this.activeDialog&&(this.activeDialog.remove(),this.activeDialog=null),e={self:this,state:"close",dialogId:t.id},!t.callback||i&&i.doNotCallback||t.callback.call(e),t&&t.onStateChanged?t.onStateChanged.call(e,e):this.onStateChanged&&this.onStateChanged.call(e,e),t=null,e=null}.bind(this),n.animateTime)),this},this.main=function(){i.dialog_instance=i.dialog_instance||[],i.dialog_instance.push(this),arguments&&t.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)};return l}()),e=ax5.ui.dialog}(),function(){var i=ax5.ui.dialog,t=function(i){return' \n <div id="{{dialogId}}" data-dialog-els="root" class="ax5-ui-dialog {{theme}}">\n <div class="ax-dialog-header" data-dialog-els="header">\n {{{title}}}\n </div>\n <div class="ax-dialog-body" data-dialog-els="body">\n <div class="ax-dialog-msg">{{{msg}}}</div>\n \n {{#input}}\n <div class="ax-dialog-prompt">\n {{#@each}}\n <div class="form-group">\n {{#@value.label}}\n <label>{{#_crlf}}{{{.}}}{{/_crlf}}</label>\n {{/@value.label}}\n <input type="{{@value.type}}" placeholder="{{@value.placeholder}}" class="form-control {{@value.theme}}" data-dialog-prompt="{{@key}}" style="width:100%;" value="{{@value.value}}" />\n {{#@value.help}}\n <p class="help-block">{{#_crlf}}{{.}}{{/_crlf}}</p>\n {{/@value.help}}\n </div>\n {{/@each}}\n </div>\n {{/input}}\n \n <div class="ax-dialog-buttons" data-dialog-els="buttons">\n <div class="ax-button-wrap">\n {{#btns}}\n {{#@each}}\n <button type="button" data-dialog-btn="{{@key}}" class="btn btn-{{@value.theme}}">{{@value.label}}</button>\n {{/@each}}\n {{/btns}}\n </div>\n </div>\n \n {{#additionalContent}}\n <div data-dialog-els="additional-content">{{{.}}}</div>\n {{/additionalContent}}\n </div>\n </div> \n '};i.tmpl={dialogDisplay:t,get:function(t,e,l){return ax5.mustache.render(i.tmpl[t].call(this,l),e)}}}(); | ||
"use strict";!function(){var t=ax5.ui,i=ax5.util,e=void 0;t.addClass({className:"dialog"},function(){var l=function(){var l=this,n=void 0;this.instanceId=ax5.getGuid(),this.config={id:"ax5-dialog-"+this.instanceId,clickEventName:"click",theme:"default",width:300,title:"",msg:"",lang:{ok:"ok",cancel:"cancel"},animateTime:150,autoCloseTime:0},this.activeDialog=null,this.autoCloseTimer=null,this.queue=[],n=this.config;var a=function(t,i){return t&&t.onStateChanged?t.onStateChanged.call(i,i):this.onStateChanged&&this.onStateChanged.call(i,i),i=null,!0},o=function(t,l){var a={dialogId:t,title:l.title||n.title||"",msg:(l.msg||n.msg||"").replace(/\n/g,"<br/>"),input:l.input,btns:l.btns,_crlf:function(){return this.replace(/\n/g,"<br/>")},additionalContent:function(t){return i.isFunction(t)?t.call(l):t}(l.additionalContent)};try{return e.tmpl.get.call(this,"dialogDisplay",a)}finally{a=null}},d=function(t,i){var e={},d=void 0;t.id=t.id||n.id,d={width:t.width},jQuery(document.body).append(o.call(this,t.id,t)),this.dialogConfig=t,this.activeDialog=jQuery("#"+t.id),this.activeDialog.css({width:d.width}),"undefined"==typeof i&&(i=t.callback),t.height=d.height=this.activeDialog.height(),"undefined"==typeof t.position||"center"===t.position?(e.top=jQuery(window).height()/2-d.height/2,e.left=jQuery(window).width()/2-d.width/2):(e.left=t.position.left||0,e.top=t.position.top||0),n.zIndex&&(e["z-index"]=n.zIndex),this.activeDialog.css(e),"prompt"===t.dialogType?this.activeDialog.find("[data-dialog-prompt]").get(0).focus():this.activeDialog.find("[data-dialog-btn]").get(0).focus(),this.activeDialog.find("[data-dialog-btn]").on(n.clickEventName,function(e){c.call(this,e||window.event,t,i)}.bind(this)),jQuery(window).bind("keydown.ax5dialog",function(e){u.call(this,e||window.event,t,i)}.bind(this)),jQuery(window).bind("resize.ax5dialog",function(t){s.call(this,t||window.event)}.bind(this)),a.call(this,t,{self:this,state:"open"}),t.autoCloseTime&&(this.autoCloseTimer=setTimeout(function(){l.close()},t.autoCloseTime)),e=null,d=null},s=function(t){if(!this.activeDialog)return this;var i=l.dialogConfig,e={width:i.width,height:i.height};return"undefined"==typeof i.position||"center"===i.position?(e.top=window.innerHeight/2-e.height/2,e.left=window.innerWidth/2-e.width/2):(e.left=i.position.left||0,e.top=i.position.top||0),e.left<0&&(e.left=0),e.top<0&&(e.top=0),this.activeDialog.css(e),i=null,e=null,this},c=function(t,e,l,n,a){var o=void 0,d=null;if(t.srcElement&&(t.target=t.srcElement),n=i.findParentNode(t.target,function(t){if(t.getAttribute("data-dialog-btn"))return!0})){if(a=n.getAttribute("data-dialog-btn"),o={self:this,key:a,value:e.btns[a],dialogId:e.id,btnTarget:n},"prompt"===e.dialogType)for(var s in e.input)if(o[s]=this.activeDialog.find("[data-dialog-prompt="+s+"]").val(),""==o[s]||null==o[s]){d=s;break}if(e.btns[a].onClick)e.btns[a].onClick.call(o,a);else if("alert"===e.dialogType)l&&l.call(o,a),this.close({doNotCallback:!0});else if("confirm"===e.dialogType)l&&l.call(o,a),this.close({doNotCallback:!0});else if("prompt"===e.dialogType){if("ok"===a&&d)return this.activeDialog.find('[data-dialog-prompt="'+d+'"]').get(0).focus(),!1;l&&l.call(o,a),this.close({doNotCallback:!0})}}o=null,e=null,l=null,n=null,a=null},u=function(t,i,e,l,n){var a=void 0,o=null;if(t.keyCode==ax5.info.eventKeys.ESC&&this.close(),"prompt"===i.dialogType&&t.keyCode==ax5.info.eventKeys.RETURN){a={self:this,key:n,value:i.btns[n],dialogId:i.id,btnTarget:l};for(var d in i.input)if(a[d]=this.activeDialog.find("[data-dialog-prompt="+d+"]").val(),""==a[d]||null==a[d]){o=d;break}if(o)return a=null,o=null,!1;e&&e.call(a,n),this.close({doNotCallback:!0})}a=null,o=null,i=null,e=null,l=null,n=null};this.init=function(){this.onStateChanged=n.onStateChanged},this.alert=function(t,e,l){return i.isString(t)&&(t={title:n.title,msg:t}),t=jQuery.extend(!0,{},n,t),t.dialogType="alert",t.theme=t.theme||n.theme||"",t.callback=e,"undefined"==typeof t.btns&&(t.btns={ok:{label:n.lang.ok,theme:t.theme}}),this.activeDialog?this.queue.push(t):d.call(this,t,e),this},this.confirm=function(t,e,l){return i.isString(t)&&(t={title:n.title,msg:t}),t=jQuery.extend(!0,{},n,t),t.dialogType="confirm",t.theme=t.theme||n.theme||"",t.callback=e,"undefined"==typeof t.btns&&(t.btns={ok:{label:n.lang.ok,theme:t.theme},cancel:{label:n.lang.cancel}}),this.activeDialog?this.queue.push(t):d.call(this,t,e),this},this.prompt=function(t,e,l){return i.isString(t)&&(t={title:n.title,msg:t}),t=jQuery.extend(!0,{},n,t),t.dialogType="prompt",t.theme=t.theme||n.theme||"",t.callback=e,"undefined"==typeof t.input&&(t.input={value:{label:""}}),"undefined"==typeof t.btns&&(t.btns={ok:{label:n.lang.ok,theme:t.theme},cancel:{label:n.lang.cancel}}),this.activeDialog?this.queue.push(t):d.call(this,t,e),this},this.close=function(t){var i=void 0,e=void 0;return this.activeDialog&&(this.autoCloseTimer&&clearTimeout(this.autoCloseTimer),i=l.dialogConfig,this.activeDialog.addClass("destroy"),jQuery(window).unbind("keydown.ax5dialog"),jQuery(window).unbind("resize.ax5dialog"),setTimeout(function(){this.activeDialog&&(this.activeDialog.remove(),this.activeDialog=null),e={self:this,state:"close",dialogId:i.id},!i.callback||t&&t.doNotCallback||i.callback.call(e),i&&i.onStateChanged?i.onStateChanged.call(e,e):this.onStateChanged&&this.onStateChanged.call(e,e),this.queue&&this.queue.length&&d.call(this,this.queue.shift()),i=null,e=null}.bind(this),n.animateTime)),this},this.main=function(){t.dialog_instance=t.dialog_instance||[],t.dialog_instance.push(this),arguments&&i.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)};return l}()),e=ax5.ui.dialog}(),function(){var t=ax5.ui.dialog,i=function(t){return' \n <div id="{{dialogId}}" data-dialog-els="root" class="ax5-ui-dialog {{theme}}">\n <div class="ax-dialog-header" data-dialog-els="header">\n {{{title}}}\n </div>\n <div class="ax-dialog-body" data-dialog-els="body">\n <div class="ax-dialog-msg">{{{msg}}}</div>\n \n {{#input}}\n <div class="ax-dialog-prompt">\n {{#@each}}\n <div class="form-group">\n {{#@value.label}}\n <label>{{#_crlf}}{{{.}}}{{/_crlf}}</label>\n {{/@value.label}}\n <input type="{{@value.type}}" placeholder="{{@value.placeholder}}" class="form-control {{@value.theme}}" data-dialog-prompt="{{@key}}" style="width:100%;" value="{{@value.value}}" />\n {{#@value.help}}\n <p class="help-block">{{#_crlf}}{{.}}{{/_crlf}}</p>\n {{/@value.help}}\n </div>\n {{/@each}}\n </div>\n {{/input}}\n \n <div class="ax-dialog-buttons" data-dialog-els="buttons">\n <div class="ax-button-wrap">\n {{#btns}}\n {{#@each}}\n <button type="button" data-dialog-btn="{{@key}}" class="btn btn-{{@value.theme}}">{{@value.label}}</button>\n {{/@each}}\n {{/btns}}\n </div>\n </div>\n \n {{#additionalContent}}\n <div data-dialog-els="additional-content">{{{.}}}</div>\n {{/additionalContent}}\n </div>\n </div> \n '};t.tmpl={dialogDisplay:i,get:function(i,e,l){return ax5.mustache.render(t.tmpl[i].call(this,l),e)}}}(); | ||
//# sourceMappingURL=ax5dialog.min.js.map |
{ | ||
"name": "ax5ui-dialog", | ||
"version": "1.4.95", | ||
"version": "1.4.96", | ||
"description": "A dialog plugin that works with Bootstrap & jQuery", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -59,2 +59,4 @@ // ax5.ui.dialog | ||
this.autoCloseTimer = null; | ||
this.queue = []; | ||
cfg = this.config; | ||
@@ -122,5 +124,10 @@ | ||
this.dialogConfig = opts; | ||
this.activeDialog = jQuery('#' + opts.id); | ||
this.activeDialog.css({width: box.width}); | ||
if(typeof callback === "undefined"){ | ||
callback = opts.callback; | ||
} | ||
// dialog 높이 구하기 - 너비가 정해지면 높이가 변경 될 것. | ||
@@ -378,19 +385,3 @@ opts.height = box.height = this.activeDialog.height(); | ||
if (this.activeDialog) { | ||
// try one more | ||
if (!tryCount) { | ||
setTimeout((function () { | ||
this.alert(opts, callback, 1); | ||
}).bind(this), Number(cfg.animateTime) + 100); | ||
} else { | ||
console.log(ax5.info.getError("ax5dialog", "501", "alert")); | ||
} | ||
return this; | ||
} | ||
self.dialogConfig = {}; | ||
jQuery.extend(true, self.dialogConfig, cfg, opts); | ||
opts = self.dialogConfig; | ||
opts = jQuery.extend(true, {}, cfg, opts); | ||
opts.dialogType = "alert"; | ||
@@ -405,4 +396,8 @@ opts.theme = (opts.theme || cfg.theme || ""); | ||
} | ||
open.call(this, opts, callback); | ||
if (this.activeDialog) { | ||
this.queue.push(opts); | ||
} else { | ||
open.call(this, opts, callback); | ||
} | ||
return this; | ||
@@ -447,18 +442,3 @@ }; | ||
if (this.activeDialog) { | ||
// try one more | ||
if (!tryCount) { | ||
setTimeout((function () { | ||
this.confirm(opts, callback, 1); | ||
}).bind(this), Number(cfg.animateTime) + 100); | ||
} else { | ||
console.log(ax5.info.getError("ax5dialog", "501", "confirm")); | ||
} | ||
return this; | ||
} | ||
self.dialogConfig = {}; | ||
jQuery.extend(true, self.dialogConfig, cfg, opts); | ||
opts = self.dialogConfig; | ||
opts = jQuery.extend(true, {}, cfg, opts); | ||
opts.dialogType = "confirm"; | ||
@@ -474,4 +454,9 @@ opts.theme = (opts.theme || cfg.theme || ""); | ||
} | ||
open.call(this, opts, callback); | ||
if (this.activeDialog) { | ||
this.queue.push(opts); | ||
}else{ | ||
open.call(this, opts, callback); | ||
} | ||
return this; | ||
@@ -513,17 +498,3 @@ }; | ||
if (this.activeDialog) { | ||
// try one more | ||
if (!tryCount) { | ||
setTimeout((function () { | ||
this.prompt(opts, callback, 1); | ||
}).bind(this), Number(cfg.animateTime) + 100); | ||
} else { | ||
console.log(ax5.info.getError("ax5dialog", "501", "prompt")); | ||
} | ||
return this; | ||
} | ||
self.dialogConfig = {}; | ||
jQuery.extend(true, self.dialogConfig, cfg, opts); | ||
opts = self.dialogConfig; | ||
opts = jQuery.extend(true, {}, cfg, opts); | ||
opts.dialogType = "prompt"; | ||
@@ -544,4 +515,9 @@ opts.theme = (opts.theme || cfg.theme || ""); | ||
} | ||
open.call(this, opts, callback); | ||
if (this.activeDialog) { | ||
this.queue.push(opts); | ||
}else{ | ||
open.call(this, opts, callback); | ||
} | ||
return this; | ||
@@ -594,2 +570,6 @@ }; | ||
if(this.queue && this.queue.length) { | ||
open.call(this, this.queue.shift()); | ||
} | ||
opts = null; | ||
@@ -596,0 +576,0 @@ that = null; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143988
1478