diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index 0ba2720e76..d5cccda675 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -85,10 +85,15 @@ define([ }, onAfterRender: function(view) { + var me = this; this.printSettings.menu.on('menu:hide', _.bind(this.onHidePrintMenu, this)); this.printSettings.cmbSheet.on('selected', _.bind(this.comboSheetsChange, this, this.printSettings)); - this.printSettings.btnSave.on('click', _.bind(this.querySavePrintSettings, this, false)); - this.printSettings.btnPrint.on('click', _.bind(this.querySavePrintSettings, this, true)); + this.printSettings.btnsSave.forEach(function (btn) { + btn.on('click', _.bind(me.querySavePrintSettings, me, false)); + }); + this.printSettings.btnsPrint.forEach(function (btn) { + btn.on('click', _.bind(me.querySavePrintSettings, me, true)); + }); this.printSettings.btnPrevPage.on('click', _.bind(this.onChangePreviewPage, this, false)); this.printSettings.btnNextPage.on('click', _.bind(this.onChangePreviewPage, this, true)); this.printSettings.txtNumberPage.on({ diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index dc4d4b4ea8..a8e4d4cb7e 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -2745,8 +2745,8 @@ define([ //'', '', '', '', '', @@ -2754,8 +2754,8 @@ define([ '', '', '', @@ -3016,13 +3016,16 @@ define([ this.pnlTable = $(this.pnlSettings.find('table')[0]); this.trApply = $markup.find('.fms-btn-apply'); - this.btnSave = new Common.UI.Button({ - el: $markup.findById('#print-btn-save') - }); - - this.btnPrint = new Common.UI.Button({ - el: $markup.findById('#print-btn-print') - }); + this.btnsSave = []; + this.btnsPrint = []; + for (var i=0; i<2; i++) { + this.btnsSave.push(new Common.UI.Button({ + el: $markup.findById('#print-btn-save-'+i) + })); + this.btnsPrint.push(new Common.UI.Button({ + el: $markup.findById('#print-btn-print-'+i) + })); + } this.btnPrevPage = new Common.UI.Button({ parentEl: $markup.findById('#print-prev-page'),