mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 09:34:29 +08:00
Hide plugins tab when no visible plugins (e.g., editor has only editing plugins but is opened in viewer mode)
This commit is contained in:
@ -49,6 +49,10 @@ define([
|
||||
'use strict';
|
||||
|
||||
Common.Collections.Plugins = Backbone.Collection.extend({
|
||||
model: Common.Models.Plugin
|
||||
model: Common.Models.Plugin,
|
||||
|
||||
hasVisible: function() {
|
||||
return !!this.findWhere({visible: true});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -174,7 +174,7 @@ define([
|
||||
arr.push(plugin);
|
||||
});
|
||||
this.api.asc_pluginsRegister('', arr);
|
||||
if (storePlugins.length>0)
|
||||
if (storePlugins.hasVisible())
|
||||
Common.NotificationCenter.trigger('tab:visible', 'plugins', true);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user