Add event onPluginsReady

This commit is contained in:
Julia Radzhabova 2021-03-26 20:37:29 +03:00
parent 2a6ed8f973
commit 0b2a3aec7e
3 changed files with 6 additions and 0 deletions

View file

@ -330,6 +330,10 @@ if (Common === undefined) {
_postMessage({event:'onRequestCreateNew'});
},
pluginsReady: function() {
_postMessage({ event: 'onPluginsReady' });
},
on: function(event, handler){
var localHandler = function(event, data){
handler.call(me, data)

View file

@ -237,6 +237,7 @@ define([
this.api.asc_pluginsRegister('', arr);
if (storePlugins.hasVisible())
Common.NotificationCenter.trigger('tab:visible', 'plugins', true);
Common.Gateway.pluginsReady();
},
onAddPlugin: function (model) {

View file

@ -263,6 +263,7 @@ define([
arr.push(plugin);
});
me.api.asc_pluginsRegister('', arr);
Common.Gateway.pluginsReady();
},
getPlugins: function(pluginsData, fetchFunction) {