diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index d06f3754b..37690a766 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -861,6 +861,7 @@ define([ pluginsController.setApi(me.api); me.requestPlugins('../../../../plugins.json'); me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); + me.api.asc_registerCallback('asc_onPluginsReset', _.bind(me.resetPluginsList, me)); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); @@ -2013,6 +2014,10 @@ define([ if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins(); }, + resetPluginsList: function() { + this.getApplication().getCollection('Common.Collections.Plugins').reset(); + }, + leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', defaultTitleText: 'ONLYOFFICE Document Editor', criticalErrorTitle: 'Error', diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index a3e4cd3e1..c67c6ebc3 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -642,6 +642,7 @@ define([ pluginsController.setApi(me.api); me.requestPlugins('../../../../plugins.json'); me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); + me.api.asc_registerCallback('asc_onPluginsReset', _.bind(me.resetPluginsList, me)); documentHolderController.setApi(me.api); documentHolderController.createDelayedElements(); @@ -1785,6 +1786,10 @@ define([ if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins(); }, + resetPluginsList: function() { + this.getApplication().getCollection('Common.Collections.Plugins').reset(); + }, + // Translation leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', defaultTitleText: 'ONLYOFFICE Presentation Editor', diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index fc2ba9bf3..64a3d867f 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -631,7 +631,8 @@ define([ pluginsController.setApi(me.api); me.requestPlugins('../../../../plugins.json'); me.api.asc_registerCallback('asc_onPluginsInit', _.bind(me.updatePluginsList, me)); - } + me.api.asc_registerCallback('asc_onPluginsReset', _.bind(me.resetPluginsList, me)); + } leftMenuView.disableMenu('all',false); @@ -1980,7 +1981,11 @@ define([ } if (!uiCustomize) this.getApplication().getController('LeftMenu').enablePlugins(); }, - + + resetPluginsList: function() { + this.getApplication().getCollection('Common.Collections.Plugins').reset(); + }, + leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.', criticalErrorTitle: 'Error', notcriticalErrorTitle: 'Warning',