diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 723a0748e7..7884ecabc3 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -577,6 +577,7 @@ define([ this.mode.canPrint = this.mode.canDownload = false; } else { this.mode = mode; + this.mode.canPreviewPrint = true; } if (!delay) { diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 2a07305a5f..2055c2f93e 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -48,6 +48,13 @@ define([ this.adjPrintParams = new Asc.asc_CAdjustPrint(); this.adjPrintParams.asc_setPrintType(value); + this._state = { + firstPrintPage: 0, + isPrinterInfoLoad: false, + currentPrinter: null, + printersList: [] + }; + this._changedProps = null; this._originalPageSettings = null; @@ -99,15 +106,16 @@ define([ this.printSettings.printScroller && this.printSettings.printScroller.update(); } }, this)); + this.printSettings.btnPrintSystemDialog.on('click', _.bind(this.querySavePrintSettings, this, 'print', true)); this.printSettings.btnsSave.forEach(function (btn) { - btn.on('click', _.bind(me.querySavePrintSettings, me, 'save')); + btn.on('click', _.bind(me.querySavePrintSettings, me, 'save', false)); }); this.printSettings.btnsPrint.forEach(function (btn) { - btn.on('click', _.bind(me.querySavePrintSettings, me, 'print')); + btn.on('click', _.bind(me.querySavePrintSettings, me, 'print', false)); }); if (this.mode.isDesktopApp) { this.printSettings.btnsPrintPDF.forEach(function (btn) { - btn.on('click', _.bind(me.querySavePrintSettings, me, 'print-pdf')); + btn.on('click', _.bind(me.querySavePrintSettings, me, 'print-pdf', false)); }); } this.printSettings.btnPrevPage.on('click', _.bind(this.onChangePreviewPage, this, false)); @@ -124,6 +132,10 @@ define([ this.fillComponents(this.printSettings); this.registerControlEvents(this.printSettings); + if(this._state.isPrinterInfoLoad) { + this.printSettings.updateCmbPrinter(this._state.currentPrinter, this._state.printersList); + } + Common.NotificationCenter.on('window:resize', _.bind(function () { if (this._isPreviewVisible) { this.notUpdateSheetSettings = true; @@ -214,9 +226,9 @@ define([ item = null; for (var i=0; i<%= scope.txtPrint %>', '', '', + '', + '', '', '', '', @@ -2762,6 +2764,7 @@ define([], function () { '', '', '', + '', //'', '
', '