mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
Merge pull request 'Fix loading plugins' (#153) from hotfix/v8.2.2 into develop
This commit is contained in:
@ -111,6 +111,7 @@ define([
|
||||
|
||||
this._moveOffset = {x:0, y:0};
|
||||
this.autostart = [];
|
||||
this.startOnPostLoad = false;
|
||||
this.customPluginsDlg = [];
|
||||
|
||||
this.newInstalledBackgroundPlugins = [];
|
||||
@ -123,6 +124,7 @@ define([
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
Common.NotificationCenter.on('doc:mode-changed', this.onChangeDocMode.bind(this));
|
||||
Common.NotificationCenter.on('modal:close', this.onModalClose.bind(this));
|
||||
Common.NotificationCenter.on('script:loaded', this.onPostLoadComplete.bind(this));
|
||||
},
|
||||
|
||||
loadConfig: function(data) {
|
||||
@ -134,7 +136,7 @@ define([
|
||||
|
||||
loadPlugins: function() {
|
||||
this.configPlugins.plugins =
|
||||
this.serverPlugins.plugins = false;
|
||||
this.serverPlugins.plugins = undefined;
|
||||
|
||||
if (this.configPlugins.config) {
|
||||
this.getPlugins(this.configPlugins.config.pluginsData)
|
||||
@ -148,7 +150,8 @@ define([
|
||||
|
||||
if (this.configPlugins.config.options)
|
||||
this.api.setPluginsOptions(this.configPlugins.config.options);
|
||||
}
|
||||
} else
|
||||
this.configPlugins.plugins = false;
|
||||
|
||||
if ( !Common.Controllers.Desktop.isActive() || !Common.Controllers.Desktop.isOffline() ) {
|
||||
var server_plugins_url = '../../../../plugins.json',
|
||||
@ -164,7 +167,8 @@ define([
|
||||
.catch(function (err) {
|
||||
me.serverPlugins.plugins = false;
|
||||
});
|
||||
}
|
||||
} else
|
||||
me.serverPlugins.plugins = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -989,7 +993,8 @@ define([
|
||||
|
||||
if (this.appOptions.canPlugins) {
|
||||
this.refreshPluginsList();
|
||||
this.runAutoStartPlugins();
|
||||
this.startOnPostLoad = !Common.Controllers.LaunchController.isScriptLoaded();
|
||||
!this.startOnPostLoad && this.runAutoStartPlugins();
|
||||
}
|
||||
},
|
||||
|
||||
@ -1349,6 +1354,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
onPostLoadComplete: function() {
|
||||
this.startOnPostLoad && this.runAutoStartPlugins();
|
||||
},
|
||||
|
||||
textRunPlugin: 'Run plugin',
|
||||
textRunInstalledPlugins: 'Run installed plugins',
|
||||
textPluginSuccessfullyInstalled: '<b>{0}</b> is successfully installed. You can access all background plugins here.',
|
||||
|
||||
Reference in New Issue
Block a user