[SSE] Сохранение размеров окна печати и выбранного диапазона печати.
This commit is contained in:
parent
c377fb54c3
commit
e2e287ffde
|
@ -12,8 +12,11 @@ define([
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.adjPrintParams = new Asc.asc_CAdjustPrint();
|
this.adjPrintParams = new Asc.asc_CAdjustPrint();
|
||||||
this.adjPrintParams.asc_setPrintType(c_oAscPrintType.ActiveSheets);
|
|
||||||
this.adjPrintParams.asc_setLayoutPageType(c_oAscLayoutPageType.ActualSize);
|
this.adjPrintParams.asc_setLayoutPageType(c_oAscLayoutPageType.ActualSize);
|
||||||
|
|
||||||
|
var value = Common.localStorage.getItem("sse-print-settings-range");
|
||||||
|
value = (value!==null) ? parseInt(value) : c_oAscPrintType.ActiveSheets;
|
||||||
|
this.adjPrintParams.asc_setPrintType(value);
|
||||||
this.diffParams = {};
|
this.diffParams = {};
|
||||||
|
|
||||||
this.addListeners({
|
this.addListeners({
|
||||||
|
@ -269,7 +272,10 @@ define([
|
||||||
if ( this.checkMargins(this.printSettingsDlg) ) {
|
if ( this.checkMargins(this.printSettingsDlg) ) {
|
||||||
this.savePageOptions(this.printSettingsDlg, this.printSettingsDlg.getRange() == c_oAscPrintType.EntireWorkbook ? -255:undefined);
|
this.savePageOptions(this.printSettingsDlg, this.printSettingsDlg.getRange() == c_oAscPrintType.EntireWorkbook ? -255:undefined);
|
||||||
|
|
||||||
this.adjPrintParams.asc_setPrintType(this.printSettingsDlg.getRange());
|
var printtype = this.printSettingsDlg.getRange();
|
||||||
|
this.adjPrintParams.asc_setPrintType(printtype);
|
||||||
|
Common.localStorage.setItem("sse-print-settings-range", printtype);
|
||||||
|
|
||||||
// this.adjPrintParams.asc_setLayoutPageType(this.printSettingsDlg.getLayout());
|
// this.adjPrintParams.asc_setLayoutPageType(this.printSettingsDlg.getLayout());
|
||||||
this.api.asc_Print(this.adjPrintParams, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
|
this.api.asc_Print(this.adjPrintParams, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
|
||||||
|
|
||||||
|
|
|
@ -185,6 +185,10 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
|
||||||
this.panelDetails = $('#printadv-dlg-content-to-hide');
|
this.panelDetails = $('#printadv-dlg-content-to-hide');
|
||||||
this.updateMetricUnit();
|
this.updateMetricUnit();
|
||||||
this.options.afterrender && this.options.afterrender.call(this);
|
this.options.afterrender && this.options.afterrender.call(this);
|
||||||
|
|
||||||
|
var value = Common.localStorage.getItem("sse-hide-print-settings");
|
||||||
|
this.extended = (value!==null && parseInt(value)==0);
|
||||||
|
this.handlerShowDetails(this.btnHide);
|
||||||
},
|
},
|
||||||
|
|
||||||
setRange: function(value) {
|
setRange: function(value) {
|
||||||
|
@ -224,11 +228,13 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
|
||||||
this.panelDetails.css({'display': 'none'});
|
this.panelDetails.css({'display': 'none'});
|
||||||
this.setHeight(286);
|
this.setHeight(286);
|
||||||
btn.setCaption(this.textShowDetails);
|
btn.setCaption(this.textShowDetails);
|
||||||
|
Common.localStorage.setItem("sse-hide-print-settings", 1);
|
||||||
} else {
|
} else {
|
||||||
this.extended = false;
|
this.extended = false;
|
||||||
this.panelDetails.css({'display': 'block'});
|
this.panelDetails.css({'display': 'block'});
|
||||||
this.setHeight(482);
|
this.setHeight(482);
|
||||||
btn.setCaption(this.textHideDetails);
|
btn.setCaption(this.textHideDetails);
|
||||||
|
Common.localStorage.setItem("sse-hide-print-settings", 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue