[SSE] By bug 59219 (make PDF settings)

This commit is contained in:
JuliaSvinareva 2022-11-21 22:57:12 +03:00
parent 63f2801a99
commit ed909d24b9
5 changed files with 67 additions and 7 deletions

View file

@ -274,7 +274,7 @@ define([
menu.cmbSheet.setValue(item.get('value'));
this.comboSheetsChange(menu, menu.cmbSheet, item.toJSON());
}
//menu.cmbSheet.setDisabled(printtype !== Asc.c_oAscPrintType.EntireWorkbook);
menu.cmbSheet.setDisabled(printtype === Asc.c_oAscPrintType.Selection || printtype === Asc.c_oAscPrintType.ActiveSheets && menu.cmbSheet.store.length < 2);
menu.chIgnorePrintArea.setDisabled(printtype == Asc.c_oAscPrintType.Selection);
if (!isDlg) {
@ -406,6 +406,9 @@ define([
this.adjPrintParams.asc_setPrintType(printtype);
this.adjPrintParams.asc_setPageOptionsMap(this._changedProps);
this.adjPrintParams.asc_setIgnorePrintArea(this.printSettingsDlg.getIgnorePrintArea());
this.adjPrintParams.asc_setActiveSheetsArray(SSE.getController('Statusbar').getSelectTabs());
this.adjPrintParams.asc_setStartPageIndex(this.printSettingsDlg.getPagesFrom() - 1);
this.adjPrintParams.asc_setEndPageIndex(this.printSettingsDlg.getPagesTo() - 1);
Common.localStorage.setItem("sse-print-settings-range", printtype);
if ( this.printSettingsDlg.type=='print' ) {

View file

@ -2,8 +2,13 @@
<div class="padding-large inner-content" >
<div id="printadv-dlg-combo-range" class="input-group-nr"></div>
<div id="printadv-dlg-chb-ignore" style="margin-top: 5px;"></div>
<div id="printadv-dlg-pages">
<label><%= scope.textPages %></label>
<div id="printadv-dlg-spin-pages-from"></div>
<label><%= scope.textTo %></label>
<div id="printadv-dlg-spin-pages-to"></div>
</div>
</div>
<div class="padding-small"></div>
<div class="padding-large inner-content" >
<div id="printadv-dlg-combo-sheets" class="input-group-nr"></div>
</div>

View file

@ -62,7 +62,7 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
template: [
'<div class="box" style="height:' + (this.options.height-85) + 'px;">',
'<div class="menu-panel" style="overflow: hidden;">',
'<div style="height: 54px; line-height: 42px;" class="div-category">' + ((this.type == 'print') ? this.textPrintRange : this.textRange)+ '</div>',
'<div style="height: 84px; line-height: 42px;" class="div-category">' + ((this.type == 'print') ? this.textPrintRange : this.textRange)+ '</div>',
'<div style="height: 52px; line-height: 66px;" class="div-category">' + this.textSettings + '</div>',
'<div style="height: 38px; line-height: 38px;" class="div-category">' + this.textPageSize + '</div>',
'<div style="height: 38px; line-height: 38px;" class="div-category">' + this.textPageOrientation + '</div>',
@ -96,7 +96,7 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
takeFocusOnClose: true,
cls : 'input-group-nr',
data : [
{ value: Asc.c_oAscPrintType.ActiveSheets, displayValue: this.textCurrentSheet },
{ value: Asc.c_oAscPrintType.ActiveSheets, displayValue: this.textActiveSheets },
{ value: Asc.c_oAscPrintType.EntireWorkbook, displayValue: this.textAllSheets },
{ value: Asc.c_oAscPrintType.Selection, displayValue: this.textSelection }
]
@ -108,6 +108,32 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
labelText: this.textIgnore
});
this.spnPagesFrom = new Common.UI.MetricSpinner({
el: $('#printadv-dlg-spin-pages-from'),
step: 1,
width: 60,
defaultUnit : '',
value: '1',
maxValue: 1000,
minValue: 1,
dataHint: '2',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.spnPagesTo = new Common.UI.MetricSpinner({
el: $('#printadv-dlg-spin-pages-to'),
step: 1,
width: 60,
defaultUnit : '',
value: '1',
maxValue: 1000,
minValue: 1,
dataHint: '2',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbSheet = new Common.UI.ComboBox({
el : $('#printadv-dlg-combo-sheets'),
style : 'width: 242px;',
@ -326,6 +352,14 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
return (this.chIgnorePrintArea.getValue()=='checked');
},
getPagesFrom: function () {
return this.spnPagesFrom.getValue();
},
getPagesTo: function () {
return this.spnPagesTo.getValue();
},
comboRangeChange: function(combo, record) {
this.fireEvent('changerange', this);
},
@ -355,13 +389,13 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
if (!this.extended) {
this.extended = true;
this.panelDetails.css({'display': 'none'});
this.setHeight(314);
this.setHeight(344);
btn.setCaption(this.textShowDetails);
Common.localStorage.setItem("sse-hide-print-settings", 1);
} else {
this.extended = false;
this.panelDetails.css({'display': 'block'});
this.setHeight(585);
this.setHeight(615);
btn.setCaption(this.textHideDetails);
Common.localStorage.setItem("sse-hide-print-settings", 0);
}
@ -384,6 +418,7 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
textPrintRange: 'Print Range',
textLayout: 'Layout',
textCurrentSheet: 'Current Sheet',
textActiveSheets: 'Active Sheets',
textAllSheets: 'All Sheets',
textSelection: 'Selection',
textActualSize: 'Actual Size',
@ -406,7 +441,9 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
strPrintTitles: 'Print Titles',
textRepeatTop: 'Repeat rows at top',
textRepeatLeft: 'Repeat columns at left',
textRepeat: 'Repeat...'
textRepeat: 'Repeat...',
textPages: 'Pages:',
textTo: 'to'
}, SSE.Views.PrintSettings || {}));
});

View file

@ -3018,6 +3018,7 @@
"SSE.Views.PrintSettings.textActualSize": "Actual Size",
"SSE.Views.PrintSettings.textAllSheets": "All Sheets",
"SSE.Views.PrintSettings.textCurrentSheet": "Current Sheet",
"SSE.Views.PrintSettings.textActiveSheets": "Active Sheets",
"SSE.Views.PrintSettings.textCustom": "Custom",
"SSE.Views.PrintSettings.textCustomOptions": "Custom Options",
"SSE.Views.PrintSettings.textFitCols": "Fit All Columns on One Page",
@ -3043,6 +3044,8 @@
"SSE.Views.PrintSettings.textShowHeadings": "Show Rows and Columns Headings",
"SSE.Views.PrintSettings.textTitle": "Print Settings",
"SSE.Views.PrintSettings.textTitlePDF": "PDF Settings",
"SSE.Views.PrintSettings.textPages": "Pages:",
"SSE.Views.PrintSettings.textTo": "to",
"SSE.Views.PrintTitlesDialog.textFirstCol": "First column",
"SSE.Views.PrintTitlesDialog.textFirstRow": "First row",
"SSE.Views.PrintTitlesDialog.textFrozenCols": "Frozen columns",

View file

@ -84,4 +84,16 @@
.preview-canvas-container {
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
border: @scaled-one-px-value solid @border-regular-control;
}
#printadv-dlg-pages {
margin-top: 16px;
label, #printadv-dlg-spin-pages-from {
margin-right: 6px;
}
label, div {
display: inline-block;
}
}