[SSE] Set/clear/add print area
This commit is contained in:
parent
8315df83f1
commit
71768e13c4
|
@ -323,3 +323,4 @@
|
|||
.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);
|
|
@ -354,6 +354,8 @@ define([
|
|||
toolbar.btnPageOrient.menu.on('item:click', _.bind(this.onPageOrientSelect, this));
|
||||
toolbar.btnPageMargins.menu.on('item:click', _.bind(this.onPageMarginsSelect, this));
|
||||
toolbar.mnuPageSize.on('item:click', _.bind(this.onPageSizeClick, this));
|
||||
toolbar.btnPrintArea.menu.on('item:click', _.bind(this.onPrintAreaClick, this));
|
||||
toolbar.btnPrintArea.menu.on('show:after', _.bind(this.onPrintAreaMenuOpen, this));
|
||||
toolbar.btnImgGroup.menu.on('item:click', _.bind(this.onImgGroupSelect, this));
|
||||
toolbar.btnImgBackward.menu.on('item:click', _.bind(this.onImgArrangeSelect, this));
|
||||
toolbar.btnImgForward.menu.on('item:click', _.bind(this.onImgArrangeSelect, this));
|
||||
|
@ -3260,6 +3262,20 @@ define([
|
|||
Common.component.Analytics.trackEvent('ToolBar', 'Objects Align');
|
||||
},
|
||||
|
||||
onPrintAreaClick: function(menu, item) {
|
||||
if (this.api) {
|
||||
this.api.asc_ChangePrintArea(item.value);
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Print Area');
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
},
|
||||
|
||||
onPrintAreaMenuOpen: function() {
|
||||
if (this.api)
|
||||
this.toolbar.btnPrintArea.menu.items[2].setVisible(this.api.asc_CanAddPrintArea());
|
||||
},
|
||||
|
||||
textEmptyImgUrl : 'You need to specify image URL.',
|
||||
warnMergeLostData : 'Operation can destroy data in the selected cells.<br>Continue?',
|
||||
textWarning : 'Warning',
|
||||
|
|
|
@ -141,6 +141,7 @@
|
|||
<span class="btn-slot text x-huge" id="slot-btn-pagemargins"></span>
|
||||
<span class="btn-slot text x-huge" id="slot-btn-pageorient"></span>
|
||||
<span class="btn-slot text x-huge" id="slot-btn-pagesize"></span>
|
||||
<span class="btn-slot text x-huge" id="slot-btn-printarea"></span>
|
||||
</div>
|
||||
<div class="separator long"></div>
|
||||
<div class="group">
|
||||
|
|
|
@ -1406,6 +1406,31 @@ define([
|
|||
});
|
||||
me.mnuPageSize = me.btnPageSize.menu;
|
||||
|
||||
me.btnPrintArea = new Common.UI.Button({
|
||||
id: 'tlbtn-printarea',
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'btn-print-area',
|
||||
caption: me.capBtnPrintArea,
|
||||
lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.editCell, _set.selRangeEdit, _set.docPropsLock, _set.lostConnect, _set.coAuth],
|
||||
menu: new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar',
|
||||
items: [
|
||||
{
|
||||
caption: me.textSetPrintArea,
|
||||
value: Asc.c_oAscChangePrintAreaType.set
|
||||
},
|
||||
{
|
||||
caption: me.textClearPrintArea,
|
||||
value: Asc.c_oAscChangePrintAreaType.clear
|
||||
},
|
||||
{
|
||||
caption: me.textAddPrintArea,
|
||||
value: Asc.c_oAscChangePrintAreaType.add
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
me.btnImgAlign = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'btn-img-align',
|
||||
|
@ -1461,7 +1486,7 @@ define([
|
|||
me.btnInsertChart, me.btnColorSchemas,
|
||||
me.btnAutofilter, me.btnCopy, me.btnPaste, me.listStyles, me.btnPrint,
|
||||
/*me.btnSave,*/ me.btnClearStyle, me.btnCopyStyle,
|
||||
me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup
|
||||
me.btnPageMargins, me.btnPageSize, me.btnPageOrient, me.btnPrintArea, me.btnImgAlign, me.btnImgBackward, me.btnImgForward, me.btnImgGroup
|
||||
];
|
||||
|
||||
var _temp_array = [me.cmbFontName, me.cmbFontSize, me.btnAlignLeft,me.btnAlignCenter,me.btnAlignRight,me.btnAlignJust,me.btnAlignTop,
|
||||
|
@ -1630,6 +1655,7 @@ define([
|
|||
_injectComponent('#slot-btn-pageorient', this.btnPageOrient);
|
||||
_injectComponent('#slot-btn-pagemargins', this.btnPageMargins);
|
||||
_injectComponent('#slot-btn-pagesize', this.btnPageSize);
|
||||
_injectComponent('#slot-btn-printarea', this.btnPrintArea);
|
||||
_injectComponent('#slot-img-align', this.btnImgAlign);
|
||||
_injectComponent('#slot-img-group', this.btnImgGroup);
|
||||
_injectComponent('#slot-img-movefrwd', this.btnImgForward);
|
||||
|
@ -1706,6 +1732,7 @@ define([
|
|||
_updateHint(this.btnPageOrient, this.tipPageOrient);
|
||||
_updateHint(this.btnPageSize, this.tipPageSize);
|
||||
_updateHint(this.btnPageMargins, this.tipPageMargins);
|
||||
_updateHint(this.btnPrintArea, this.tipPrintArea);
|
||||
|
||||
// set menus
|
||||
if (this.btnBorders && this.btnBorders.rendered) {
|
||||
|
@ -2409,6 +2436,11 @@ define([
|
|||
textBottom: 'Bottom: ',
|
||||
textRight: 'Right: ',
|
||||
textPortrait: 'Portrait',
|
||||
textLandscape: 'Landscape'
|
||||
textLandscape: 'Landscape',
|
||||
capBtnPrintArea: 'Print Area',
|
||||
textSetPrintArea: 'Set Print Area',
|
||||
textClearPrintArea: 'Clear Print Area',
|
||||
textAddPrintArea: 'Add to Print Area',
|
||||
tipPrintArea: 'Print Area'
|
||||
}, SSE.Views.Toolbar || {}));
|
||||
});
|
|
@ -2074,6 +2074,11 @@
|
|||
"SSE.Views.Toolbar.txtTime": "Time",
|
||||
"SSE.Views.Toolbar.txtUnmerge": "Unmerge Cells",
|
||||
"SSE.Views.Toolbar.txtYen": "¥ Yen",
|
||||
"SSE.Views.Toolbar.capBtnPrintArea": "Print Area",
|
||||
"SSE.Views.Toolbar.textSetPrintArea": "Set Print Area",
|
||||
"SSE.Views.Toolbar.textClearPrintArea": "Clear Print Area",
|
||||
"SSE.Views.Toolbar.textAddPrintArea": "Add to Print Area",
|
||||
"SSE.Views.Toolbar.tipPrintArea": "Print Area",
|
||||
"SSE.Views.Top10FilterDialog.cancelButtonText": "Cancel",
|
||||
"SSE.Views.Top10FilterDialog.okButtonText": "OK",
|
||||
"SSE.Views.Top10FilterDialog.textType": "Show",
|
||||
|
|
Loading…
Reference in a new issue