Commit e2e287ff authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Сохранение размеров окна печати и выбранного диапазона печати.

parent c377fb54
......@@ -12,8 +12,11 @@ define([
initialize: function() {
this.adjPrintParams = new Asc.asc_CAdjustPrint();
this.adjPrintParams.asc_setPrintType(c_oAscPrintType.ActiveSheets);
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.addListeners({
......@@ -269,7 +272,10 @@ define([
if ( this.checkMargins(this.printSettingsDlg) ) {
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.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.updateMetricUnit();
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) {
......@@ -224,11 +228,13 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
this.panelDetails.css({'display': 'none'});
this.setHeight(286);
btn.setCaption(this.textShowDetails);
Common.localStorage.setItem("sse-hide-print-settings", 1);
} else {
this.extended = false;
this.panelDetails.css({'display': 'block'});
this.setHeight(482);
btn.setCaption(this.textHideDetails);
Common.localStorage.setItem("sse-hide-print-settings", 0);
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment