diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 7ce29f7a81..dc412eece5 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -2768,6 +2768,19 @@ define([ animationController.setApi(me.api).setConfig({toolbar: me,mode:config}).createToolbarPanel(); Array.prototype.push.apply(me.toolbar.slideOnlyControls,animationController.getView().getButtons()); + tab = {caption: me.toolbar.textTabSlideMaster, action: 'slideMaster', extcls: config.isEdit ? 'canedit' : '', layoutname: 'toolbar-slidemaster', dataHintTitle: 'M'}; + var slideMasterTab = me.getApplication().getController('SlideMasterTab'); + slideMasterTab.setApi(me.api).setConfig({toolbar: me, mode: config}); + $panel = slideMasterTab.createToolbarPanel(); + if ($panel) { + var visible = Common.UI.LayoutManager.isElementVisible('toolbar-slidemaster'); + me.toolbar.addTab(tab, $panel, 6); + me.toolbar.setVisible('slideMaster', !visible); + !editmode && !compactview && visible && Common.Utils.InternalSettings.set('toolbar-active-tab', 'view'); // need to activate later + Array.prototype.push.apply(me.toolbar.lockControls, slideMasterTab.getView('SlideMasterTab').getButtons()); + Array.prototype.push.apply(me.toolbar.slideOnlyControls, slideMasterTab.getView('SlideMasterTab').getButtons()); + } + me.toolbar.btnSave.on('disabled', _.bind(me.onBtnChangeState, me, 'save:disabled')); if (!config.compactHeader) { @@ -2806,17 +2819,6 @@ define([ me.toolbar.setVisible('view', visible); !editmode && !compactview && visible && Common.Utils.InternalSettings.set('toolbar-active-tab', 'view'); // need to activate later } - tab = {caption: me.toolbar.textTabSlideMaster, action: 'slideMaster', extcls: config.isEdit ? 'canedit' : '', layoutname: 'toolbar-slidemaster', dataHintTitle: 'M'}; - var slideMasterTab = me.getApplication().getController('SlideMasterTab'); - slideMasterTab.setApi(me.api).setConfig({toolbar: me, mode: config}); - $panel = slideMasterTab.createToolbarPanel(); - if ($panel) { - var visible = Common.UI.LayoutManager.isElementVisible('toolbar-slidemaster'); - me.toolbar.addTab(tab, $panel, 6); - me.toolbar.setVisible('slideMaster', !visible); - !editmode && !compactview && visible && Common.Utils.InternalSettings.set('toolbar-active-tab', 'view'); // need to activate later - } - config.isEdit && Array.prototype.push.apply(me.toolbar.lockControls, slideMasterTab.getView('SlideMasterTab').getButtons()); }, onAppReady: function (config) { diff --git a/apps/presentationeditor/main/app/view/SlideMasterTab.js b/apps/presentationeditor/main/app/view/SlideMasterTab.js index dbcd97fba2..e786cf3715 100644 --- a/apps/presentationeditor/main/app/view/SlideMasterTab.js +++ b/apps/presentationeditor/main/app/view/SlideMasterTab.js @@ -90,7 +90,6 @@ define([ Common.UI.BaseView.prototype.initialize.call(this); this.appConfig = options.mode; var _set = Common.enumLock; - this.slideOnlyControls = []; this.lockedControls = []; var me = this; @@ -108,7 +107,6 @@ define([ }).on('click', function (btn, e) { this.fireEvent('insert:layout', [btn, e]); }.bind(this)); - this.slideOnlyControls.push(this.btnAddLayout); this.lockedControls.push(this.btnAddLayout); me.btnAddSlideMaster = new Common.UI.Button({ @@ -123,7 +121,6 @@ define([ }).on('click', function (btn, e) { this.fireEvent('insert:slide-master', [btn, e]); }.bind(this)); - this.slideOnlyControls.push(this.btnAddSlideMaster); this.lockedControls.push(this.btnAddSlideMaster); me.btnInsertPlaceholder = new Common.UI.Button({ @@ -141,7 +138,6 @@ define([ dataHintDirection: 'bottom', dataHintOffset: 'small' }); - this.slideOnlyControls.push(this.btnInsertPlaceholder); this.lockedControls.push(this.btnInsertPlaceholder); me.btnInsertPlaceholder.setMenu( @@ -219,7 +215,6 @@ define([ dataHintDirection: 'left', dataHintOffset: 'small' }); - this.slideOnlyControls.push(this.chTitle); this.lockedControls.push(this.chTitle); this.chFooters = new Common.UI.CheckBox({ @@ -230,7 +225,6 @@ define([ dataHintDirection: 'left', dataHintOffset: 'small' }); - this.slideOnlyControls.push(this.chFooters); this.lockedControls.push(this.chFooters); this.btnCloseSlideMaster = new Common.UI.Button({ @@ -243,7 +237,6 @@ define([ dataHintDirection: 'bottom', dataHintOffset: 'small' }); - this.slideOnlyControls.push(this.btnCloseSlideMaster); this.lockedControls.push(this.btnCloseSlideMaster); } @@ -304,15 +297,6 @@ define([ }, this); }, - onComboOpen: function (needfocus, combo, e, params) { - if (params && params.fromKeyDown) return; - _.delay(function() { - var input = $('input', combo.cmpEl).select(); - if (needfocus) input.focus(); - else if (!combo.isMenuOpen()) input.one('mouseup', function (e) { e.preventDefault(); }); - }, 10); - }, - capAddSlideMaster: 'Add Slide Master', tipAddSlideMaster: 'Add slide master', capAddLayout: 'Add Layout',