Fix hiding left plugins panel in the desktop app.

This commit is contained in:
Julia Radzhabova 2017-12-06 14:25:29 +03:00
parent d7b0a40b99
commit 654585df8e
4 changed files with 23 additions and 3 deletions

View file

@ -331,6 +331,11 @@ define([
return btn; return btn;
}, },
hide: function () {
Common.UI.BaseView.prototype.hide.call(this,arguments);
this.fireEvent('hide', this );
},
strPlugins: 'Plugins', strPlugins: 'Plugins',
textLoading: 'Loading', textLoading: 'Loading',
textStart: 'Start', textStart: 'Start',

View file

@ -72,7 +72,8 @@ define([
'hide': _.bind(this.aboutShowHide, this, true) 'hide': _.bind(this.aboutShowHide, this, true)
}, },
'Common.Views.Plugins': { 'Common.Views.Plugins': {
'plugin:open': _.bind(this.onPluginOpen, this) 'plugin:open': _.bind(this.onPluginOpen, this),
'hide': _.bind(this.onHidePlugins, this)
}, },
'LeftMenu': { 'LeftMenu': {
'comments:show': _.bind(this.commentsShowHide, this, 'show'), 'comments:show': _.bind(this.commentsShowHide, this, 'show'),
@ -381,6 +382,10 @@ define([
$(this.leftMenu.btnChat.el).blur(); $(this.leftMenu.btnChat.el).blur();
Common.NotificationCenter.trigger('layout:changed', 'leftmenu'); Common.NotificationCenter.trigger('layout:changed', 'leftmenu');
}, },
onHidePlugins: function() {
Common.NotificationCenter.trigger('layout:changed', 'leftmenu');
},
/** coauthoring end **/ /** coauthoring end **/
onQuerySearch: function(d, w, opts) { onQuerySearch: function(d, w, opts) {

View file

@ -64,7 +64,8 @@ define([
'click:users': _.bind(this.clickStatusbarUsers, this) 'click:users': _.bind(this.clickStatusbarUsers, this)
}, },
'Common.Views.Plugins': { 'Common.Views.Plugins': {
'plugin:open': _.bind(this.onPluginOpen, this) 'plugin:open': _.bind(this.onPluginOpen, this),
'hide': _.bind(this.onHidePlugins, this)
}, },
'Common.Views.About': { 'Common.Views.About': {
'show': _.bind(this.aboutShowHide, this, false), 'show': _.bind(this.aboutShowHide, this, false),
@ -307,6 +308,10 @@ define([
$(this.leftMenu.btnChat.el).blur(); $(this.leftMenu.btnChat.el).blur();
Common.NotificationCenter.trigger('layout:changed', 'leftmenu'); Common.NotificationCenter.trigger('layout:changed', 'leftmenu');
}, },
onHidePlugins: function() {
Common.NotificationCenter.trigger('layout:changed', 'leftmenu');
},
/** coauthoring end **/ /** coauthoring end **/
onQuerySearch: function(d, w, opts) { onQuerySearch: function(d, w, opts) {

View file

@ -51,7 +51,8 @@ define([
'hide': _.bind(this.onHideChat, this) 'hide': _.bind(this.onHideChat, this)
}, },
'Common.Views.Plugins': { 'Common.Views.Plugins': {
'plugin:open': _.bind(this.onPluginOpen, this) 'plugin:open': _.bind(this.onPluginOpen, this),
'hide': _.bind(this.onHidePlugins, this)
}, },
'Common.Views.Header': { 'Common.Views.Header': {
'click:users': _.bind(this.clickStatusbarUsers, this) 'click:users': _.bind(this.clickStatusbarUsers, this)
@ -342,6 +343,10 @@ define([
$(this.leftMenu.btnChat.el).blur(); $(this.leftMenu.btnChat.el).blur();
Common.NotificationCenter.trigger('layout:changed', 'leftmenu'); Common.NotificationCenter.trigger('layout:changed', 'leftmenu');
}, },
onHidePlugins: function() {
Common.NotificationCenter.trigger('layout:changed', 'leftmenu');
},
/** coauthoring end **/ /** coauthoring end **/
onQuerySearch: function(d, w, opts) { onQuerySearch: function(d, w, opts) {