Added event for reset plugins list.

This commit is contained in:
Julia Radzhabova 2017-12-07 15:02:19 +03:00
parent 4d90badb55
commit 160b6ddfee
3 changed files with 17 additions and 2 deletions

View file

@ -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',

View file

@ -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',

View file

@ -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',