[Common] Don't render plugins list

This commit is contained in:
Julia Radzhabova 2019-09-03 17:36:32 +03:00
parent 374f7d122f
commit 0643f6756d
2 changed files with 17 additions and 17 deletions

View file

@ -172,7 +172,7 @@ define([
}, },
onAfterRender: function(panelPlugins) { onAfterRender: function(panelPlugins) {
panelPlugins.viewPluginsList.on('item:click', _.bind(this.onSelectPlugin, this)); panelPlugins.viewPluginsList && panelPlugins.viewPluginsList.on('item:click', _.bind(this.onSelectPlugin, this));
this.bindViewEvents(this.panelPlugins, this.events); this.bindViewEvents(this.panelPlugins, this.events);
var me = this; var me = this;
Common.NotificationCenter.on({ Common.NotificationCenter.on({

View file

@ -88,22 +88,22 @@ define([
el && (this.$el = $(el)); el && (this.$el = $(el));
this.$el.html(this.template({scope: this})); this.$el.html(this.template({scope: this}));
this.viewPluginsList = new Common.UI.DataView({ // this.viewPluginsList = new Common.UI.DataView({
el: $('#plugins-list'), // el: $('#plugins-list'),
store: this.storePlugins, // store: this.storePlugins,
enableKeyEvents: false, // enableKeyEvents: false,
itemTemplate: _.template([ // itemTemplate: _.template([
'<div id="<%= id %>" class="item-plugins" style="display: <% if (visible) {%> block; <%} else {%> none; <% } %>">', // '<div id="<%= id %>" class="item-plugins" style="display: <% if (visible) {%> block; <%} else {%> none; <% } %>">',
'<div class="plugin-icon" style="background-image: url(' + '<%= baseUrl %>' + '<%= variations[currentVariation].get("icons")[((window.devicePixelRatio > 1) ? 1 : 0) + (variations[currentVariation].get("icons").length>2 ? 2 : 0)] %>);"></div>', // '<div class="plugin-icon" style="background-image: url(' + '<%= baseUrl %>' + '<%= variations[currentVariation].get("icons")[((window.devicePixelRatio > 1) ? 1 : 0) + (variations[currentVariation].get("icons").length>2 ? 2 : 0)] %>);"></div>',
'<% if (variations.length>1) { %>', // '<% if (variations.length>1) { %>',
'<div class="plugin-caret img-commonctrl"></div>', // '<div class="plugin-caret img-commonctrl"></div>',
'<% } %>', // '<% } %>',
'<%= name %>', // '<%= name %>',
'</div>' // '</div>'
].join('')) // ].join(''))
}); // });
this.lockedControls.push(this.viewPluginsList); // this.lockedControls.push(this.viewPluginsList);
this.viewPluginsList.cmpEl.off('click'); // this.viewPluginsList.cmpEl.off('click');
this.pluginName = $('#current-plugin-header label'); this.pluginName = $('#current-plugin-header label');
this.pluginsPanel = $('#plugins-box'); this.pluginsPanel = $('#plugins-box');