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 0288e6a30..d2dd62e99 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 5f78ff9c7..86ac9f41e 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 dc61d8f92..066abbe19 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 1bd466574..0c8ba9b29 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); });