diff --git a/apps/common/main/lib/component/Menu.js b/apps/common/main/lib/component/Menu.js index 61bd4b5a4..6afaf8581 100644 --- a/apps/common/main/lib/component/Menu.js +++ b/apps/common/main/lib/component/Menu.js @@ -125,7 +125,7 @@ define([ if (active && active.length > 0) { _.each(active, function(menu) { - menu.hide(); + if (menu) menu.hide(); }); return true; } diff --git a/apps/documenteditor/main/app/view/RightMenu.js b/apps/documenteditor/main/app/view/RightMenu.js index 56236d72d..b5421b8c3 100644 --- a/apps/documenteditor/main/app/view/RightMenu.js +++ b/apps/documenteditor/main/app/view/RightMenu.js @@ -280,7 +280,7 @@ define([ var target_pane = $(".right-panel"); target_pane.find('> .active').removeClass('active'); - _.each(this._settings, function(item){ + this._settings.forEach(function(item){ if (item.btn.isActive()) item.btn.toggle(false, true); }); diff --git a/apps/presentationeditor/main/app.js b/apps/presentationeditor/main/app.js index 823fb4594..f241c26f6 100644 --- a/apps/presentationeditor/main/app.js +++ b/apps/presentationeditor/main/app.js @@ -154,8 +154,8 @@ require([ 'Main', 'Common.Controllers.Fonts' /** coauthoring begin **/ - , 'Common.Controllers.Chat', - 'Common.Controllers.Comments', + , 'Common.Controllers.Chat' + ,'Common.Controllers.Comments' /** coauthoring end **/ ,'Common.Controllers.Plugins' ,'Common.Controllers.ExternalDiagramEditor' diff --git a/apps/presentationeditor/main/app/view/RightMenu.js b/apps/presentationeditor/main/app/view/RightMenu.js index 8f06a91e7..c6de3cbd0 100644 --- a/apps/presentationeditor/main/app/view/RightMenu.js +++ b/apps/presentationeditor/main/app/view/RightMenu.js @@ -277,7 +277,7 @@ define([ clearSelection: function() { var target_pane = $(".right-panel"); target_pane.find('> .active').removeClass('active'); - _.each(this._settings, function(item){ + this._settings.forEach(function(item){ if (item.btn.isActive()) item.btn.toggle(false, true); }); diff --git a/apps/presentationeditor/main/app_dev.js b/apps/presentationeditor/main/app_dev.js index 1a45df40d..d3e8cfecd 100644 --- a/apps/presentationeditor/main/app_dev.js +++ b/apps/presentationeditor/main/app_dev.js @@ -145,8 +145,8 @@ require([ 'Main', 'Common.Controllers.Fonts' /** coauthoring begin **/ - , 'Common.Controllers.Chat', - 'Common.Controllers.Comments', + , 'Common.Controllers.Chat' + ,'Common.Controllers.Comments' /** coauthoring end **/ ,'Common.Controllers.Plugins' ,'Common.Controllers.ExternalDiagramEditor' diff --git a/apps/spreadsheeteditor/main/app/controller/RightMenu.js b/apps/spreadsheeteditor/main/app/controller/RightMenu.js index efb89dbf7..eef25f2b4 100644 --- a/apps/spreadsheeteditor/main/app/controller/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/RightMenu.js @@ -126,7 +126,7 @@ define([ if (this._state.prevDisabled != need_disable) { this._state.prevDisabled = need_disable; - _.each(this._settings, function(item){ + this._settings.forEach(function(item){ item.panel.setLocked(need_disable); }); } diff --git a/apps/spreadsheeteditor/main/app/view/RightMenu.js b/apps/spreadsheeteditor/main/app/view/RightMenu.js index fa658baf3..14cdd13ed 100644 --- a/apps/spreadsheeteditor/main/app/view/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/view/RightMenu.js @@ -240,7 +240,7 @@ define([ clearSelection: function() { var target_pane = $(".right-panel"); target_pane.find('> .active').removeClass('active'); - _.each(this._settings, function(item){ + this._settings.forEach(function(item){ if (item.btn.isActive()) item.btn.toggle(false, true); });