From fc8e344dd99d28f35fec2129c170428e23f36788 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Thu, 24 Nov 2022 08:21:13 +0300 Subject: [PATCH 1/8] QuickPrint for compactHeader --- .../main/app/controller/Toolbar.js | 29 +++++++++++++++++-- apps/documenteditor/main/app/view/Toolbar.js | 28 +++++++++++++++++- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 1caab736f..0f8b0142e 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -372,6 +372,7 @@ define([ Common.Gateway.on('setmailmergerecipients', _.bind(this.setMailMergeRecipients, this)); $('#id-toolbar-menu-new-control-color').on('click', _.bind(this.onNewControlsColor, this)); toolbar.listStylesAdditionalMenuItem.on('click', this.onMenuSaveStyle.bind(this)); + toolbar.btnPrint.menu && toolbar.btnPrint.menu.on('item:click', _.bind(this.onPrintMenu, this)); this.onSetupCopyStyleButton(); this.onBtnChangeState('undo:disabled', toolbar.btnUndo, toolbar.btnUndo.isDisabled()); @@ -1061,11 +1062,35 @@ define([ }, onPrint: function(e) { - Common.NotificationCenter.trigger('file:print', this.toolbar); - Common.NotificationCenter.trigger('edit:complete', this.toolbar); + if (this.toolbar.btnPrint.options.printType == 'print') { + Common.NotificationCenter.trigger('file:print', this.toolbar); + Common.NotificationCenter.trigger('edit:complete', this.toolbar); + } else { + var _main = this.getApplication().getController('Main'); + _main.onPrintQuick(); + + } + Common.component.Analytics.trackEvent('Print'); Common.component.Analytics.trackEvent('ToolBar', 'Print'); + + }, + + onPrintMenu: function (btn, e){ + var oldType = this.toolbar.btnPrint.options.printType; + var newType = e.value; + //this.toolbar.btnPrint.toggle(true); + + if(newType != oldType) { + this.toolbar.btnPrint.changeIcon({ + next: e.options.iconClsForMainBtn, + curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn + }); + this.toolbar.btnPrint.updateHint([e.caption, this.views.Toolbar.prototype.tipInsertText]); + this.toolbar.btnPrint.options.printType = newType; + } + this.onPrint(e); }, onSave: function(e) { diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 7017370ce..d350ec53e 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -192,8 +192,11 @@ define([ lock: [_set.cantPrint, _set.disableOnStart], signals: ['disabled'], dataHint: '1', + split: config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false), + menu: config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false), dataHintDirection: 'top', - dataHintTitle: 'P' + dataHintTitle: 'P', + printType: 'print' }); this.toolbarControls.push(this.btnPrint); @@ -1744,6 +1747,28 @@ define([ })).then(function () { if ( !config.isEdit ) return; + if(me.btnPrint && config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false)){ + me.btnPrint.setMenu( + new Common.UI.Menu({ + items:[ + { + caption: 'Print', + iconCls: 'menu__icon btn-print', + toggleGroup: 'viewPrint', + value: 'print', + iconClsForMainBtn: 'btn-print' + }, + { + caption: 'QuickPrint', + iconCls: 'menu__icon btn-quick-print', + toggleGroup: 'viewPrint', + value: 'print-quick', + iconClsForMainBtn: 'btn-quick-print' + } + ] + })); + } + me.btnsPageBreak.forEach( function(btn) { btn.updateHint( [me.textInsPageBreak, me.tipPageBreak] ); @@ -2030,6 +2055,7 @@ define([ ids.push('id-toolbar-menu-markers-level-' + i); items.push({template: levelTemplate, previewId: ids[i], level: i, checkable: true }); } + this.btnMarkers.setMenu( new Common.UI.Menu({ cls: 'shifted-left', From 07390eb4280ac0e9b0f440053cecb526e7103ebb Mon Sep 17 00:00:00 2001 From: OVSharova Date: Sat, 26 Nov 2022 17:11:39 +0300 Subject: [PATCH 2/8] Quick Print for all editors --- .../main/app/controller/Main.js | 3 +- .../main/app/controller/Toolbar.js | 6 +--- .../main/app/view/FileMenuPanels.js | 2 +- apps/documenteditor/main/app/view/Toolbar.js | 17 ++++++---- apps/documenteditor/main/locale/en.json | 1 + .../main/app/controller/Main.js | 3 +- .../main/app/controller/Toolbar.js | 25 ++++++++++++-- .../main/app/view/FileMenuPanels.js | 2 +- .../main/app/view/Toolbar.js | 30 ++++++++++++++++- apps/presentationeditor/main/locale/en.json | 1 + .../main/app/controller/Main.js | 3 +- .../main/app/controller/Toolbar.js | 23 ++++++++++++- .../main/app/view/FileMenuPanels.js | 2 +- .../main/app/view/Toolbar.js | 33 +++++++++++++++++-- apps/spreadsheeteditor/main/locale/en.json | 1 + 15 files changed, 125 insertions(+), 27 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ea4d3dbec..278cc9ffb 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1495,8 +1495,7 @@ define([ this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit; this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp; - this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && - !(this.editorConfig.customization && this.editorConfig.customization.compactHeader); + this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization; this.appOptions.canRename = this.editorConfig.canRename; this.appOptions.buildVersion = params.asc_getBuildVersion(); this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 0f8b0142e..c3ebfbae6 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1068,10 +1068,7 @@ define([ } else { var _main = this.getApplication().getController('Main'); _main.onPrintQuick(); - } - - Common.component.Analytics.trackEvent('Print'); Common.component.Analytics.trackEvent('ToolBar', 'Print'); @@ -1080,14 +1077,13 @@ define([ onPrintMenu: function (btn, e){ var oldType = this.toolbar.btnPrint.options.printType; var newType = e.value; - //this.toolbar.btnPrint.toggle(true); if(newType != oldType) { this.toolbar.btnPrint.changeIcon({ next: e.options.iconClsForMainBtn, curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn }); - this.toolbar.btnPrint.updateHint([e.caption, this.views.Toolbar.prototype.tipInsertText]); + this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]); this.toolbar.btnPrint.options.printType = newType; } this.onPrint(e); diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 76b6be72d..efa86f224 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -781,7 +781,7 @@ define([ $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ - $('tr.quick-print', this.el)[mode.canQuickPrint ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index d350ec53e..e048a58c4 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -191,9 +191,9 @@ define([ iconCls: 'toolbar__icon btn-print no-mask', lock: [_set.cantPrint, _set.disableOnStart], signals: ['disabled'], + split: config.canQuickPrint, + menu: config.canQuickPrint, dataHint: '1', - split: config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false), - menu: config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false), dataHintDirection: 'top', dataHintTitle: 'P', printType: 'print' @@ -1747,23 +1747,25 @@ define([ })).then(function () { if ( !config.isEdit ) return; - if(me.btnPrint && config.canQuickPrint && Common.localStorage.getBool("de-settings-quick-print-button",false)){ + if(me.btnPrint.menu){ me.btnPrint.setMenu( new Common.UI.Menu({ items:[ { - caption: 'Print', + caption: me.tipPrint, iconCls: 'menu__icon btn-print', toggleGroup: 'viewPrint', value: 'print', - iconClsForMainBtn: 'btn-print' + iconClsForMainBtn: 'btn-print', + platformKey: Common.Utils.String.platformKey('Ctrl+P') }, { - caption: 'QuickPrint', + caption: me.tipPrintQuick, iconCls: 'menu__icon btn-quick-print', toggleGroup: 'viewPrint', value: 'print-quick', - iconClsForMainBtn: 'btn-quick-print' + iconClsForMainBtn: 'btn-quick-print', + platformKey: '' } ] })); @@ -2695,6 +2697,7 @@ define([ tipUndo: 'Undo', tipRedo: 'Redo', tipPrint: 'Print', + tipPrintQuick: 'Quick print', tipSave: 'Save', tipIncFont: 'Increment font size', tipDecFont: 'Decrement font size', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 3e9789aab..c9d56fd3e 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2934,6 +2934,7 @@ "DE.Views.Toolbar.tipPaste": "Paste", "DE.Views.Toolbar.tipPrColor": "Paragraph background color", "DE.Views.Toolbar.tipPrint": "Print", + "DE.Views.Toolbar.tipPrintQuick": "Quick print", "DE.Views.Toolbar.tipRedo": "Redo", "DE.Views.Toolbar.tipSave": "Save", "DE.Views.Toolbar.tipSaveCoauth": "Save your changes for the other users to see them.", diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 317a4cf52..4825c903e 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1166,8 +1166,7 @@ define([ } this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp; - this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && - !(this.editorConfig.customization && this.editorConfig.customization.compactHeader); + this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization; this.appOptions.canRename = this.editorConfig.canRename; this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); this.appOptions.forcesave = this.appOptions.canForcesave; diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 4ab653747..dd525e36c 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -284,6 +284,7 @@ define([ toolbar.btnPreview.menu.on('item:click', _.bind(this.onPreviewItemClick, this)); toolbar.btnPrint.on('click', _.bind(this.onPrint, this)); toolbar.btnPrint.on('disabled', _.bind(this.onBtnChangeState, this, 'print:disabled')); + toolbar.btnPrint.menu && toolbar.btnPrint.menu.on('item:click', _.bind(this.onPrintMenu, this)); toolbar.btnSave.on('click', _.bind(this.onSave, this)); toolbar.btnUndo.on('click', _.bind(this.onUndo, this)); toolbar.btnUndo.on('disabled', _.bind(this.onBtnChangeState, this, 'undo:disabled')); @@ -1065,13 +1066,33 @@ define([ }, onPrint: function(e) { - Common.NotificationCenter.trigger('file:print', this.toolbar); - Common.NotificationCenter.trigger('edit:complete', this.toolbar); + if (this.toolbar.btnPrint.options.printType == 'print') { + Common.NotificationCenter.trigger('file:print', this.toolbar); + Common.NotificationCenter.trigger('edit:complete', this.toolbar); + } else { + var _main = this.getApplication().getController('Main'); + _main.onPrintQuick(); + } Common.component.Analytics.trackEvent('Print'); Common.component.Analytics.trackEvent('ToolBar', 'Print'); }, + onPrintMenu: function (btn, e){ + var oldType = this.toolbar.btnPrint.options.printType; + var newType = e.value; + + if(newType != oldType) { + this.toolbar.btnPrint.changeIcon({ + next: e.options.iconClsForMainBtn, + curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn + }); + this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]); + this.toolbar.btnPrint.options.printType = newType; + } + this.onPrint(e); + }, + onSave: function(e) { var toolbar = this.toolbar; if (this.api && this.api.asc_isDocumentCanSave) { diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 0c2699780..07a579645 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -612,7 +612,7 @@ define([ $('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); $('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide'](); - $('tr.quick-print', this.el)[mode.canQuickPrint ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 66cb3de83..64bbc3ee5 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -211,9 +211,12 @@ define([ iconCls: 'toolbar__icon btn-print no-mask', lock: [_set.slideDeleted, _set.noSlides, _set.cantPrint, _set.disableOnStart], signals: ['disabled'], + split: config.canQuickPrint, + menu: config.canQuickPrint, dataHint: '1', dataHintDirection: 'top', - dataHintTitle: 'P' + dataHintTitle: 'P', + printType: 'print' }); me.slideOnlyControls.push(me.btnPrint); @@ -1301,6 +1304,30 @@ define([ var me = this; if (!config.isEdit) return; + if(me.btnPrint.menu) { + me.btnPrint.setMenu( + new Common.UI.Menu({ + items:[ + { + caption: me.tipPrint, + iconCls: 'menu__icon btn-print', + toggleGroup: 'viewPrint', + value: 'print', + iconClsForMainBtn: 'btn-print', + platformKey: Common.Utils.String.platformKey('Ctrl+P') + }, + { + caption: me.tipPrintQuick, + iconCls: 'menu__icon btn-quick-print', + toggleGroup: 'viewPrint', + value: 'print-quick', + iconClsForMainBtn: 'btn-quick-print', + platformKey: '' + } + ] + })); + } + me.btnsInsertImage.forEach(function (btn) { btn.updateHint(me.tipInsertImage); btn.setMenu( @@ -1907,6 +1934,7 @@ define([ tipUndo: 'Undo', tipRedo: 'Redo', tipPrint: 'Print', + tipPrintQuick: 'Quick print', tipSave: 'Save', tipFontColor: 'Font color', tipMarkers: 'Bullets', diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 038a71687..1c58b43ca 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -2319,6 +2319,7 @@ "PE.Views.Toolbar.tipPaste": "Paste", "PE.Views.Toolbar.tipPreview": "Start slideshow", "PE.Views.Toolbar.tipPrint": "Print", + "PE.Views.Toolbar.tipPrintQuick": "Quick print", "PE.Views.Toolbar.tipRedo": "Redo", "PE.Views.Toolbar.tipSave": "Save", "PE.Views.Toolbar.tipSaveCoauth": "Save your changes for the other users to see them.", diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 5cf541689..74db5ca0c 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1291,8 +1291,7 @@ define([ this.appOptions.isEdit = (this.appOptions.canLicense || this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.permissions.edit !== false && this.editorConfig.mode !== 'view'; this.appOptions.canDownload = (this.permissions.download !== false); this.appOptions.canPrint = (this.permissions.print !== false); - this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && - !(this.editorConfig.customization && this.editorConfig.customization.compactHeader); + this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization; this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); this.appOptions.forcesave = this.appOptions.canForcesave; diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 7285f80de..9aede9004 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -359,6 +359,7 @@ define([ } else { toolbar.btnPrint.on('click', _.bind(this.onPrint, this)); toolbar.btnPrint.on('disabled', _.bind(this.onBtnChangeState, this, 'print:disabled')); + toolbar.btnPrint.menu && toolbar.btnPrint.menu.on('item:click', _.bind(this.onPrintMenu, this)); toolbar.btnSave.on('click', _.bind(this.onSave, this)); toolbar.btnSave.on('disabled', _.bind(this.onBtnChangeState, this, 'save:disabled')); toolbar.btnUndo.on('click', _.bind(this.onUndo, this)); @@ -523,7 +524,27 @@ define([ }, onPrint: function(e) { - Common.NotificationCenter.trigger('print', this.toolbar); + if (this.toolbar.btnPrint.options.printType == 'print') { + Common.NotificationCenter.trigger('print', this.toolbar); + } else { + var _main = this.getApplication().getController('Main'); + _main.onPrintQuick(); + } + }, + + onPrintMenu: function (btn, e){ + var oldType = this.toolbar.btnPrint.options.printType; + var newType = e.value; + + if(newType != oldType) { + this.toolbar.btnPrint.changeIcon({ + next: e.options.iconClsForMainBtn, + curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn + }); + this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]); + this.toolbar.btnPrint.options.printType = newType; + } + this.onPrint(e); }, onSave: function(e) { diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 0a42ae9bf..9888aed94 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -799,7 +799,7 @@ define([ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); - $('tr.quick-print', this.el)[mode.canQuickPrint ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 3e11fe62f..565688f16 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -800,10 +800,13 @@ define([ cls : 'btn-toolbar', iconCls : 'toolbar__icon btn-print no-mask', lock : [_set.editCell, _set.cantPrint, _set.disableOnStart], - signals: ['disabled'], + signals : ['disabled'], + split : config.canQuickPrint, + menu : config.canQuickPrint, dataHint : '1', dataHintDirection: 'top', - dataHintTitle: 'P' + dataHintTitle: 'P', + printType: 'print' }); me.btnSave = new Common.UI.Button({ @@ -2963,6 +2966,31 @@ define([ if (!this.mode.isEdit || this.mode.isEditMailMerge || this.mode.isEditDiagram || this.mode.isEditOle) return; var me = this; + + if(me.btnPrint.menu) { + me.btnPrint.setMenu( + new Common.UI.Menu({ + items:[ + { + caption: me.tipPrint, + iconCls: 'menu__icon btn-print', + toggleGroup: 'viewPrint', + value: 'print', + iconClsForMainBtn: 'btn-print', + platformKey: Common.Utils.String.platformKey('Ctrl+P') + }, + { + caption: me.tipPrintQuick, + iconCls: 'menu__icon btn-quick-print', + toggleGroup: 'viewPrint', + value: 'print-quick', + iconClsForMainBtn: 'btn-quick-print', + platformKey: '' + } + ] + })); + } + var _holder_view = SSE.getController('DocumentHolder').getView('DocumentHolder'); me.btnImgForward.updateHint(me.tipSendForward); me.btnImgForward.setMenu(new Common.UI.Menu({ @@ -3061,6 +3089,7 @@ define([ tipUndo: 'Undo', tipRedo: 'Redo', tipPrint: 'Print', + tipPrintQuick: 'Quick print', tipSave: 'Save', tipFontColor: 'Font color', tipPrColor: 'Background color', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 2b1e64c04..ad104c211 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -3538,6 +3538,7 @@ "SSE.Views.Toolbar.tipPrColor": "Fill color", "SSE.Views.Toolbar.tipPrint": "Print", "SSE.Views.Toolbar.tipPrintArea": "Print area", + "SSE.Views.Toolbar.tipPrintQuick": "Quick print", "SSE.Views.Toolbar.tipPrintTitles": "Print titles", "SSE.Views.Toolbar.tipRedo": "Redo", "SSE.Views.Toolbar.tipSave": "Save", From 2a94c622d426f963dbe91df528bd1388c14eaa2f Mon Sep 17 00:00:00 2001 From: OVSharova Date: Tue, 29 Nov 2022 18:10:48 +0300 Subject: [PATCH 3/8] fix bug --- apps/documenteditor/main/app/controller/Main.js | 2 +- apps/documenteditor/main/app/view/FileMenuPanels.js | 2 +- apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/presentationeditor/main/app/view/FileMenuPanels.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 278cc9ffb..f04deb67c 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1495,7 +1495,7 @@ define([ this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit; this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp; - this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization; + this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp; this.appOptions.canRename = this.editorConfig.canRename; this.appOptions.buildVersion = params.asc_getBuildVersion(); this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index efa86f224..bcdf3ce01 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -781,7 +781,7 @@ define([ $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ - $('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader) ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 4825c903e..5db4ec885 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1166,7 +1166,7 @@ define([ } this.appOptions.canPrint = (this.permissions.print !== false); this.appOptions.canPreviewPrint = this.appOptions.canPrint && !Common.Utils.isMac && this.appOptions.isDesktopApp; - this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization; + this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp; this.appOptions.canRename = this.editorConfig.canRename; this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); this.appOptions.forcesave = this.appOptions.canForcesave; diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 07a579645..c3a5e1220 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -612,7 +612,7 @@ define([ $('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); $('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide'](); - $('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader) ? 'show' : 'hide'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 74db5ca0c..b894e9284 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1291,7 +1291,7 @@ define([ this.appOptions.isEdit = (this.appOptions.canLicense || this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.permissions.edit !== false && this.editorConfig.mode !== 'view'; this.appOptions.canDownload = (this.permissions.download !== false); this.appOptions.canPrint = (this.permissions.print !== false); - this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp && !this.editorConfig.customization; + this.appOptions.canQuickPrint = this.appOptions.canPrint && this.appOptions.isDesktopApp; this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave); this.appOptions.forcesave = this.appOptions.canForcesave; diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 9888aed94..15dc54afe 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -799,7 +799,7 @@ define([ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); - $('tr.quick-print', this.el)[mode.canQuickPrint && !mode.customization.compactHeader ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader) ? 'show' : 'hide'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); From 7878e05c0d368976b76799ce46ba871073e0dfda Mon Sep 17 00:00:00 2001 From: OVSharova Date: Wed, 30 Nov 2022 13:10:34 +0300 Subject: [PATCH 4/8] corrections --- apps/documenteditor/main/app/controller/Toolbar.js | 2 +- apps/documenteditor/main/app/view/FileMenuPanels.js | 2 +- apps/documenteditor/main/app/view/Toolbar.js | 2 +- apps/presentationeditor/main/app/controller/Toolbar.js | 2 +- apps/presentationeditor/main/app/view/FileMenuPanels.js | 2 +- apps/presentationeditor/main/app/view/Toolbar.js | 1 + apps/spreadsheeteditor/main/app/controller/Toolbar.js | 2 +- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 2 +- apps/spreadsheeteditor/main/app/view/Toolbar.js | 1 + 9 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index c3ebfbae6..b609762e9 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -1083,7 +1083,7 @@ define([ next: e.options.iconClsForMainBtn, curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn }); - this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]); + this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey]); this.toolbar.btnPrint.options.printType = newType; } this.onPrint(e); diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index bcdf3ce01..da1c69ab4 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -781,7 +781,7 @@ define([ $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ - $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader) ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader && mode.isEdit) ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index e048a58c4..9f066e680 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -1736,7 +1736,7 @@ define([ true, true, undefined, '1', 'bottom', 'small'); Array.prototype.push.apply(this.paragraphControls, this.btnsPageBreak); Array.prototype.push.apply(this.lockControls, this.btnsPageBreak); - + this.btnPrint.menu && this.btnPrint.$el.toggleClass('btn-slot','btn-split'); return $host; }, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index dd525e36c..79c6f50ad 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1087,7 +1087,7 @@ define([ next: e.options.iconClsForMainBtn, curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn }); - this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]); + this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey]); this.toolbar.btnPrint.options.printType = newType; } this.onPrint(e); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index c3a5e1220..b946015b1 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -612,7 +612,7 @@ define([ $('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); $('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide'](); - $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader) ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader && mode.isEdit) ? 'show' : 'hide'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 64bbc3ee5..9a740f4fa 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1297,6 +1297,7 @@ define([ Array.prototype.push.apply(this.slideOnlyControls, created); Array.prototype.push.apply(this.lockControls, created); + this.btnPrint.menu && this.btnPrint.$el.toggleClass('btn-slot','btn-split'); return $host; }, diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 9aede9004..1cf3a2be9 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -541,7 +541,7 @@ define([ next: e.options.iconClsForMainBtn, curr: this.toolbar.btnPrint.menu.items.filter(function(item){return item.value == oldType;})[0].options.iconClsForMainBtn }); - this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey, this.views.Toolbar.prototype.tipInsertText]); + this.toolbar.btnPrint.updateHint([e.caption + e.options.platformKey]); this.toolbar.btnPrint.options.printType = newType; } this.onPrint(e); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 15dc54afe..8f738837d 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -799,7 +799,7 @@ define([ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.live-viewer', this.el)[mode.canLiveView && !mode.isOffline && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); - $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader) ? 'show' : 'hide'](); + $('tr.quick-print', this.el)[mode.canQuickPrint && !(mode.customization && mode.customization.compactHeader && mode.isEdit) ? 'show' : 'hide'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 565688f16..9c581d13e 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -2289,6 +2289,7 @@ define([ [Common.enumLock.editCell, Common.enumLock.selRangeEdit, Common.enumLock.headerLock, Common.enumLock.lostConnect, Common.enumLock.coAuth], undefined, undefined, undefined, '1', 'bottom', 'small'); Array.prototype.push.apply(this.lockControls, this.btnsEditHeader); + this.btnPrint.menu && this.btnPrint.$el.toggleClass('btn-slot','btn-split'); return $host; }, From 228497c1d5839aaaf4a7cdf252ee248288c8f915 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Wed, 30 Nov 2022 22:58:47 +0300 Subject: [PATCH 5/8] fix bug --- apps/documenteditor/main/app/view/Toolbar.js | 2 +- apps/presentationeditor/main/app/view/Toolbar.js | 2 +- apps/spreadsheeteditor/main/app/view/Toolbar.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 9f066e680..04380438b 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -1736,7 +1736,7 @@ define([ true, true, undefined, '1', 'bottom', 'small'); Array.prototype.push.apply(this.paragraphControls, this.btnsPageBreak); Array.prototype.push.apply(this.lockControls, this.btnsPageBreak); - this.btnPrint.menu && this.btnPrint.$el.toggleClass('btn-slot','btn-split'); + this.btnPrint.menu && this.btnPrint.$el.addClass('split'); return $host; }, diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 9a740f4fa..a34762743 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1297,7 +1297,7 @@ define([ Array.prototype.push.apply(this.slideOnlyControls, created); Array.prototype.push.apply(this.lockControls, created); - this.btnPrint.menu && this.btnPrint.$el.toggleClass('btn-slot','btn-split'); + this.btnPrint.menu && this.btnPrint.$el.addClass('split'); return $host; }, diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 9c581d13e..9388f77c5 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -2289,7 +2289,7 @@ define([ [Common.enumLock.editCell, Common.enumLock.selRangeEdit, Common.enumLock.headerLock, Common.enumLock.lostConnect, Common.enumLock.coAuth], undefined, undefined, undefined, '1', 'bottom', 'small'); Array.prototype.push.apply(this.lockControls, this.btnsEditHeader); - this.btnPrint.menu && this.btnPrint.$el.toggleClass('btn-slot','btn-split'); + this.btnPrint.menu && this.btnPrint.$el.addClass('split'); return $host; }, From 37b37425af0fdd736aba27dbb08713dc2e34f598 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sun, 4 Dec 2022 16:56:12 +0300 Subject: [PATCH 6/8] For Bug 59971 --- apps/common/main/lib/controller/Desktop.js | 1 + apps/common/main/lib/view/ExternalOleEditor.js | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/common/main/lib/controller/Desktop.js b/apps/common/main/lib/controller/Desktop.js index 9f9a4ba65..3e1275143 100644 --- a/apps/common/main/lib/controller/Desktop.js +++ b/apps/common/main/lib/controller/Desktop.js @@ -340,6 +340,7 @@ define([ Common.NotificationCenter.on({ 'modal:show': _onModalDialog.bind(this, 'open'), 'modal:close': _onModalDialog.bind(this, 'close'), + 'modal:hide': _onModalDialog.bind(this, 'hide'), 'uitheme:changed' : function (name) { if (Common.localStorage.getBool('ui-theme-use-system', false)) { native.execCommand("uitheme:changed", JSON.stringify({name:'theme-system'})); diff --git a/apps/common/main/lib/view/ExternalOleEditor.js b/apps/common/main/lib/view/ExternalOleEditor.js index 957018e21..00260f675 100644 --- a/apps/common/main/lib/view/ExternalOleEditor.js +++ b/apps/common/main/lib/view/ExternalOleEditor.js @@ -115,7 +115,6 @@ define([ }, onDlgBtnClick: function(event) { - Common.NotificationCenter.trigger('modal:close', this); if ( this.handler ) { this.handler.call(this, event.currentTarget.attributes['result'].value); return; @@ -124,7 +123,6 @@ define([ }, onToolClose: function() { - Common.NotificationCenter.trigger('modal:close', this); if ( this.handler ) { this.handler.call(this, 'cancel'); return; From 92052e645ac20922a7a4b3695b3c4f44cf546e4f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 5 Dec 2022 10:48:57 +0300 Subject: [PATCH 7/8] FIx merge hotfix 7.2.2 --- apps/spreadsheeteditor/main/app/view/Toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 6de1eed28..e1b63fd7a 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -2932,7 +2932,7 @@ define([ this.lockToolbar(Common.enumLock.cantPrint, true, {array: [this.btnPrint]}); } else { this.mode = mode; - !mode.canPrint && this.btnPrint.hide(); + !mode.canPrint && this.btnPrint && this.btnPrint.hide(); this.lockToolbar(Common.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]}); } From fad08ff7e723af01a7ac772d19949e4facc2a20e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 5 Dec 2022 12:05:43 +0300 Subject: [PATCH 8/8] [SSE] Fix internal editors --- apps/spreadsheeteditor/main/app/view/Toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index b2645d62c..e9dd2cc14 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -2317,7 +2317,7 @@ define([ [Common.enumLock.editCell, Common.enumLock.selRangeEdit, Common.enumLock.headerLock, Common.enumLock.lostConnect, Common.enumLock.coAuth], undefined, undefined, undefined, '1', 'bottom', 'small'); Array.prototype.push.apply(this.lockControls, this.btnsEditHeader); - this.btnPrint.menu && this.btnPrint.$el.addClass('split'); + this.btnPrint && this.btnPrint.menu && this.btnPrint.$el.addClass('split'); return $host; },