Autostart array of plugins.
This commit is contained in:
parent
9f2ffc408c
commit
e1bde7bbc2
|
@ -95,6 +95,7 @@ define([
|
|||
|
||||
|
||||
this._moveOffset = {x:0, y:0};
|
||||
this.autostart = null;
|
||||
},
|
||||
|
||||
setApi: function(api) {
|
||||
|
@ -113,6 +114,7 @@ define([
|
|||
if (mode.canPlugins) {
|
||||
this.updatePluginsList();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
onAfterRender: function(panelPlugins) {
|
||||
|
@ -336,6 +338,7 @@ define([
|
|||
else if (this.panelPlugins.iframePlugin)
|
||||
this.panelPlugins.closeInsideMode();
|
||||
this.panelPlugins.closedPluginMode(plugin.get_Guid());
|
||||
this.runAutoStartPlugins(this.autostart);
|
||||
},
|
||||
|
||||
onPluginResize: function(size, minSize, maxSize, callback ) {
|
||||
|
@ -372,6 +375,14 @@ define([
|
|||
if (this.pluginDlg.binding.resize) this.pluginDlg.binding.resize({ pageX: x*Common.Utils.zoom()+offset.left, pageY: y*Common.Utils.zoom()+offset.top });
|
||||
} else
|
||||
Common.NotificationCenter.trigger('frame:mousemove', { pageX: x*Common.Utils.zoom()+this._moveOffset.x, pageY: y*Common.Utils.zoom()+this._moveOffset.y });
|
||||
},
|
||||
|
||||
runAutoStartPlugins: function(autostart) {
|
||||
if (autostart && autostart.length>0) {
|
||||
var guid = autostart.shift();
|
||||
this.autostart = autostart;
|
||||
this.api.asc_pluginRun(guid, 0, '');
|
||||
}
|
||||
}
|
||||
|
||||
}, Common.Controllers.Plugins || {}));
|
||||
|
|
|
@ -1954,11 +1954,7 @@ define([
|
|||
this.appOptions.canPlugins = false;
|
||||
}
|
||||
if (this.appOptions.canPlugins) {
|
||||
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
|
||||
if (plugins.autostart && plugins.autostart.length>0) {
|
||||
// run array of plugins
|
||||
this.api.asc_pluginRun(plugins.autostart[0], 0, '');
|
||||
}
|
||||
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart);
|
||||
}
|
||||
if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins();
|
||||
},
|
||||
|
|
|
@ -1729,11 +1729,7 @@ define([
|
|||
this.appOptions.canPlugins = false;
|
||||
}
|
||||
if (this.appOptions.canPlugins) {
|
||||
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
|
||||
if (plugins.autostart && plugins.autostart.length>0) {
|
||||
// run array of plugins
|
||||
this.api.asc_pluginRun(plugins.autostart[0], 0, '');
|
||||
}
|
||||
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart);
|
||||
}
|
||||
if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins();
|
||||
},
|
||||
|
|
|
@ -1908,11 +1908,7 @@ define([
|
|||
this.appOptions.canPlugins = false;
|
||||
}
|
||||
if (this.appOptions.canPlugins) {
|
||||
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
|
||||
if (plugins.autostart && plugins.autostart.length>0) {
|
||||
// run array of plugins
|
||||
this.api.asc_pluginRun(plugins.autostart[0], 0, '');
|
||||
}
|
||||
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions).runAutoStartPlugins(plugins.autostart);
|
||||
}
|
||||
if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue