[DE] Add blank page

This commit is contained in:
Julia Radzhabova 2018-11-20 12:57:29 +03:00
parent 173b5b5373
commit 34700233a6
6 changed files with 29 additions and 2 deletions

View file

@ -9,6 +9,7 @@
### Document Editor ### Document Editor
* Search selected text * Search selected text
* Add blank page
### Spreadsheet Editor ### Spreadsheet Editor
* Set print area * Set print area

View file

@ -349,4 +349,5 @@
.button-normal-icon(btn-controls, 54, @toolbar-big-icon-size); .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-select-pivot', 55, @toolbar-big-icon-size);
.button-normal-icon(~'x-huge .btn-bookmarks', 56, @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); .button-normal-icon(btn-print-area, 56, @toolbar-big-icon-size);
.button-normal-icon(btn-blankpage, 19, @toolbar-big-icon-size);

View file

@ -312,6 +312,7 @@ define([
toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this)); toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this));
toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this)); toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this));
toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, 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('click', _.bind(this.onListStyleSelect, this));
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this)); toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this)); toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
@ -746,6 +747,7 @@ define([
var in_footnote = this.api.asc_IsCursorInFootnote(); 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; 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.btnsPageBreak.setDisabled(need_disable);
toolbar.btnBlankPage.setDisabled(need_disable);
need_disable = paragraph_locked || header_locked || in_equation || control_plain; need_disable = paragraph_locked || header_locked || in_equation || control_plain;
toolbar.btnInsertShape.setDisabled(need_disable); toolbar.btnInsertShape.setDisabled(need_disable);
@ -1856,6 +1858,14 @@ define([
Common.component.Analytics.trackEvent('ToolBar', 'Page Number'); 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) { onListStyleSelect: function(combo, record) {
this._state.prstyle = undefined; this._state.prstyle = undefined;
if (this.api) if (this.api)

View file

@ -81,6 +81,7 @@
</section> </section>
<section class="panel" data-tab="ins"> <section class="panel" data-tab="ins">
<div class="group"> <div class="group">
<span class="btn-slot text x-huge" id="slot-btn-blankpage"></span>
<span class="btn-slot text x-huge btn-pagebreak"></span> <span class="btn-slot text x-huge btn-pagebreak"></span>
<span class="btn-slot text x-huge" id="slot-btn-editheader"></span> <span class="btn-slot text x-huge" id="slot-btn-editheader"></span>
</div> </div>

View file

@ -560,6 +560,14 @@ define([
this.paragraphControls.push(this.mnuInsertPageCount); this.paragraphControls.push(this.mnuInsertPageCount);
this.toolbarControls.push(this.btnEditHeader); 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({ this.btnInsertShape = new Common.UI.Button({
id: 'tlbtn-insertshape', id: 'tlbtn-insertshape',
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
@ -1295,6 +1303,7 @@ define([
_injectComponent('#slot-btn-controls', this.btnContentControls); _injectComponent('#slot-btn-controls', this.btnContentControls);
_injectComponent('#slot-btn-columns', this.btnColumns); _injectComponent('#slot-btn-columns', this.btnColumns);
_injectComponent('#slot-btn-editheader', this.btnEditHeader); _injectComponent('#slot-btn-editheader', this.btnEditHeader);
_injectComponent('#slot-btn-blankpage', this.btnBlankPage);
_injectComponent('#slot-btn-insshape', this.btnInsertShape); _injectComponent('#slot-btn-insshape', this.btnInsertShape);
_injectComponent('#slot-btn-insequation', this.btnInsertEquation); _injectComponent('#slot-btn-insequation', this.btnInsertEquation);
_injectComponent('#slot-btn-pageorient', this.btnPageOrient); _injectComponent('#slot-btn-pageorient', this.btnPageOrient);
@ -1538,6 +1547,7 @@ define([
this.btnInsertText.updateHint(this.tipInsertText); this.btnInsertText.updateHint(this.tipInsertText);
this.btnInsertTextArt.updateHint(this.tipInsertTextArt); this.btnInsertTextArt.updateHint(this.tipInsertTextArt);
this.btnEditHeader.updateHint(this.tipEditHeader); this.btnEditHeader.updateHint(this.tipEditHeader);
this.btnBlankPage.updateHint(this.tipBlankPage);
this.btnInsertShape.updateHint(this.tipInsertShape); this.btnInsertShape.updateHint(this.tipInsertShape);
this.btnInsertEquation.updateHint(this.tipInsertEquation); this.btnInsertEquation.updateHint(this.tipInsertEquation);
this.btnDropCap.updateHint(this.tipDropCap); this.btnDropCap.updateHint(this.tipDropCap);
@ -2372,7 +2382,9 @@ define([
tipControls: 'Insert content control', tipControls: 'Insert content control',
mniHighlightControls: 'Highlight settings', mniHighlightControls: 'Highlight settings',
textNoHighlight: 'No highlighting', textNoHighlight: 'No highlighting',
mniImageFromStorage: 'Image from Storage' mniImageFromStorage: 'Image from Storage',
capBtnBlankPage: 'Blank Page',
tipBlankPage: 'Insert blank page'
} }
})(), DE.Views.Toolbar || {})); })(), DE.Views.Toolbar || {}));
}); });

View file

@ -1976,5 +1976,7 @@
"DE.Views.Toolbar.txtScheme7": "Equity", "DE.Views.Toolbar.txtScheme7": "Equity",
"DE.Views.Toolbar.txtScheme8": "Flow", "DE.Views.Toolbar.txtScheme8": "Flow",
"DE.Views.Toolbar.txtScheme9": "Foundry", "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" "DE.Views.Toolbar.mniImageFromStorage": "Image from Storage"
} }