diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index f1c5de25b..858e4adde 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -164,11 +164,14 @@ define([ var result = Array.prototype.slice.call(this); args.forEach(function(sub){ - Array.prototype.push.apply(result, sub); + if (sub instanceof Array ) + Array.prototype.push.apply(result, sub); + else + result.push(sub); }); return result; - } + }; var _out_array = Object.create(ButtonsArray.prototype); for ( var i in arguments ) { diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 0d978a2f5..ad53ac5bb 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1963,7 +1963,7 @@ define([ var toolbar = this.toolbar; toolbar.$el.find('.toolbar').toggleClass('masked', disable); - this.toolbar.lockToolbar(PE.enumLock.menuFileOpen, disable, {array: [toolbar.btnsAddSlide, toolbar.btnChangeSlide, toolbar.btnPreview, toolbar.btnHide]}); + this.toolbar.lockToolbar(PE.enumLock.menuFileOpen, disable, {array: toolbar.btnsAddSlide.concat(toolbar.btnChangeSlide, toolbar.btnPreview, toolbar.btnHide)}); if(disable) { mask = $("
").appendTo(toolbar.$el.find('.toolbar')); Common.util.Shortcuts.suspendEvents('command+k, ctrl+k, alt+h, command+f5, ctrl+f5');