Handle loader parameter for plugins
This commit is contained in:
parent
c161b84cfd
commit
7b7a579320
|
@ -381,6 +381,7 @@ define([
|
||||||
buttons: isCustomWindow ? undefined : newBtns,
|
buttons: isCustomWindow ? undefined : newBtns,
|
||||||
toolcallback: _.bind(this.onToolClose, this),
|
toolcallback: _.bind(this.onToolClose, this),
|
||||||
help: !!help,
|
help: !!help,
|
||||||
|
loader: plugin.get_Loader(),
|
||||||
modal: isModal!==undefined ? isModal : true
|
modal: isModal!==undefined ? isModal : true
|
||||||
});
|
});
|
||||||
me.pluginDlg.on({
|
me.pluginDlg.on({
|
||||||
|
|
|
@ -77,6 +77,7 @@ define([
|
||||||
_options.tpl = _.template(this.template)(_options);
|
_options.tpl = _.template(this.template)(_options);
|
||||||
|
|
||||||
this.url = options.url || '';
|
this.url = options.url || '';
|
||||||
|
this.loader = (options.loader!==undefined) ? options.loader : true;
|
||||||
this.frameId = options.frameId || 'plugin_iframe';
|
this.frameId = options.frameId || 'plugin_iframe';
|
||||||
Common.UI.Window.prototype.initialize.call(this, _options);
|
Common.UI.Window.prototype.initialize.call(this, _options);
|
||||||
},
|
},
|
||||||
|
@ -102,13 +103,15 @@ define([
|
||||||
iframe.onload = _.bind(this._onLoad,this);
|
iframe.onload = _.bind(this._onLoad,this);
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
setTimeout(function(){
|
if (this.loader) {
|
||||||
if (me.isLoaded) return;
|
setTimeout(function(){
|
||||||
me.loadMask = new Common.UI.LoadMask({owner: $('#id-plugin-placeholder')});
|
if (me.isLoaded) return;
|
||||||
me.loadMask.setTitle(me.textLoading);
|
me.loadMask = new Common.UI.LoadMask({owner: $('#id-plugin-placeholder')});
|
||||||
me.loadMask.show();
|
me.loadMask.setTitle(me.textLoading);
|
||||||
if (me.isLoaded) me.loadMask.hide();
|
me.loadMask.show();
|
||||||
}, 500);
|
if (me.isLoaded) me.loadMask.hide();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
|
||||||
iframe.src = this.url;
|
iframe.src = this.url;
|
||||||
$('#id-plugin-placeholder').append(iframe);
|
$('#id-plugin-placeholder').append(iframe);
|
||||||
|
|
|
@ -175,6 +175,7 @@ define([
|
||||||
buttons: isCustomWindow ? undefined : newBtns,
|
buttons: isCustomWindow ? undefined : newBtns,
|
||||||
toolcallback: _.bind(this.onToolClose, this),
|
toolcallback: _.bind(this.onToolClose, this),
|
||||||
help: !!help,
|
help: !!help,
|
||||||
|
loader: plugin.get_Loader(),
|
||||||
modal: isModal!==undefined ? isModal : true
|
modal: isModal!==undefined ? isModal : true
|
||||||
});
|
});
|
||||||
me.pluginDlg.on({
|
me.pluginDlg.on({
|
||||||
|
|
Loading…
Reference in a new issue