diff --git a/apps/documenteditor/main/app/view/LeftMenu.js b/apps/documenteditor/main/app/view/LeftMenu.js index dce3c66d5..9b9ee6397 100644 --- a/apps/documenteditor/main/app/view/LeftMenu.js +++ b/apps/documenteditor/main/app/view/LeftMenu.js @@ -136,6 +136,7 @@ define([ this.btnChat.hide(); this.btnComments.on('click', _.bind(this.onBtnMenuClick, this)); + this.btnComments.on('toggle', _.bind(this.onBtnCommentsToggle, this)); this.btnChat.on('click', _.bind(this.onBtnMenuClick, this)); /** coauthoring end **/ @@ -174,6 +175,11 @@ define([ Common.NotificationCenter.trigger('layout:changed', 'leftmenu'); }, + onBtnCommentsToggle: function(btn, state) { + if (!state) + this.fireEvent('comments:hide', this); + }, + onBtnMenuClick: function(btn, e) { this.supressEvents = true; this.btnAbout.toggle(false); diff --git a/apps/spreadsheeteditor/main/app/view/LeftMenu.js b/apps/spreadsheeteditor/main/app/view/LeftMenu.js index 1070aa59e..b451e0c46 100644 --- a/apps/spreadsheeteditor/main/app/view/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/view/LeftMenu.js @@ -126,6 +126,7 @@ define([ this.btnChat.hide(); this.btnComments.on('click', _.bind(this.onBtnMenuClick, this)); + this.btnComments.on('toggle', _.bind(this.onBtnCommentsToggle, this)); this.btnChat.on('click', _.bind(this.onBtnMenuClick, this)); /** coauthoring end **/ @@ -163,6 +164,11 @@ define([ Common.NotificationCenter.trigger('layout:changed', 'leftmenu'); }, + onBtnCommentsToggle: function(btn, state) { + if (!state) + this.fireEvent('comments:hide', this); + }, + onBtnMenuClick: function(btn, e) { this.btnAbout.toggle(false);