diff --git a/CHANGELOG.md b/CHANGELOG.md index b7f28a98e..b598ec4f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Document Editor * Search selected text +* Add blank page ### Spreadsheet Editor * Set print area diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index cc6225771..e32cfbda5 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -349,4 +349,5 @@ .button-normal-icon(btn-controls, 54, @toolbar-big-icon-size); .button-normal-icon(~'x-huge .btn-select-pivot', 55, @toolbar-big-icon-size); .button-normal-icon(~'x-huge .btn-bookmarks', 56, @toolbar-big-icon-size); -.button-normal-icon(btn-print-area, 56, @toolbar-big-icon-size); \ No newline at end of file +.button-normal-icon(btn-print-area, 56, @toolbar-big-icon-size); +.button-normal-icon(btn-blankpage, 19, @toolbar-big-icon-size); \ No newline at end of file diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index fb6a2c204..65851c17e 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -312,6 +312,7 @@ define([ toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this)); toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this)); toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, this)); + toolbar.btnBlankPage.on('click', _.bind(this.onBtnBlankPageClick, this)); toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this)); toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this)); toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this)); @@ -746,6 +747,7 @@ define([ var in_footnote = this.api.asc_IsCursorInFootnote(); need_disable = paragraph_locked || header_locked || in_header || in_image || in_equation && !btn_eq_state || in_footnote || in_control; toolbar.btnsPageBreak.setDisabled(need_disable); + toolbar.btnBlankPage.setDisabled(need_disable); need_disable = paragraph_locked || header_locked || in_equation || control_plain; toolbar.btnInsertShape.setDisabled(need_disable); @@ -1856,6 +1858,14 @@ define([ Common.component.Analytics.trackEvent('ToolBar', 'Page Number'); }, + onBtnBlankPageClick: function(btn) { + if (this.api) + this.api.put_AddPageBreak();//insertBlankPage(); + + Common.NotificationCenter.trigger('edit:complete', this.toolbar); + Common.component.Analytics.trackEvent('ToolBar', 'Blank Page'); + }, + onListStyleSelect: function(combo, record) { this._state.prstyle = undefined; if (this.api) diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template index 3b15aed25..33c68c23c 100644 --- a/apps/documenteditor/main/app/template/Toolbar.template +++ b/apps/documenteditor/main/app/template/Toolbar.template @@ -81,6 +81,7 @@
+
diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 5a381bf10..cc084ce15 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -560,6 +560,14 @@ define([ this.paragraphControls.push(this.mnuInsertPageCount); this.toolbarControls.push(this.btnEditHeader); + this.btnBlankPage = new Common.UI.Button({ + id: 'id-toolbar-btn-blankpage', + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'btn-blankpage', + caption: me.capBtnBlankPage + }); + this.paragraphControls.push(this.btnBlankPage); + this.btnInsertShape = new Common.UI.Button({ id: 'tlbtn-insertshape', cls: 'btn-toolbar x-huge icon-top', @@ -1295,6 +1303,7 @@ define([ _injectComponent('#slot-btn-controls', this.btnContentControls); _injectComponent('#slot-btn-columns', this.btnColumns); _injectComponent('#slot-btn-editheader', this.btnEditHeader); + _injectComponent('#slot-btn-blankpage', this.btnBlankPage); _injectComponent('#slot-btn-insshape', this.btnInsertShape); _injectComponent('#slot-btn-insequation', this.btnInsertEquation); _injectComponent('#slot-btn-pageorient', this.btnPageOrient); @@ -1538,6 +1547,7 @@ define([ this.btnInsertText.updateHint(this.tipInsertText); this.btnInsertTextArt.updateHint(this.tipInsertTextArt); this.btnEditHeader.updateHint(this.tipEditHeader); + this.btnBlankPage.updateHint(this.tipBlankPage); this.btnInsertShape.updateHint(this.tipInsertShape); this.btnInsertEquation.updateHint(this.tipInsertEquation); this.btnDropCap.updateHint(this.tipDropCap); @@ -2372,7 +2382,9 @@ define([ tipControls: 'Insert content control', mniHighlightControls: 'Highlight settings', textNoHighlight: 'No highlighting', - mniImageFromStorage: 'Image from Storage' + mniImageFromStorage: 'Image from Storage', + capBtnBlankPage: 'Blank Page', + tipBlankPage: 'Insert blank page' } })(), DE.Views.Toolbar || {})); }); diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index d79db4e0a..55e911385 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1976,5 +1976,7 @@ "DE.Views.Toolbar.txtScheme7": "Equity", "DE.Views.Toolbar.txtScheme8": "Flow", "DE.Views.Toolbar.txtScheme9": "Foundry", + "DE.Views.Toolbar.capBtnBlankPage": "Blank Page", + "DE.Views.Toolbar.tipBlankPage": "Insert blank page", "DE.Views.Toolbar.mniImageFromStorage": "Image from Storage" } \ No newline at end of file