[SSE] Print preview: fix print and save buttons
This commit is contained in:
parent
81dcc267ef
commit
267bb39e98
|
@ -85,10 +85,15 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onAfterRender: function(view) {
|
onAfterRender: function(view) {
|
||||||
|
var me = this;
|
||||||
this.printSettings.menu.on('menu:hide', _.bind(this.onHidePrintMenu, this));
|
this.printSettings.menu.on('menu:hide', _.bind(this.onHidePrintMenu, this));
|
||||||
this.printSettings.cmbSheet.on('selected', _.bind(this.comboSheetsChange, this, this.printSettings));
|
this.printSettings.cmbSheet.on('selected', _.bind(this.comboSheetsChange, this, this.printSettings));
|
||||||
this.printSettings.btnSave.on('click', _.bind(this.querySavePrintSettings, this, false));
|
this.printSettings.btnsSave.forEach(function (btn) {
|
||||||
this.printSettings.btnPrint.on('click', _.bind(this.querySavePrintSettings, this, true));
|
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.btnPrevPage.on('click', _.bind(this.onChangePreviewPage, this, false));
|
||||||
this.printSettings.btnNextPage.on('click', _.bind(this.onChangePreviewPage, this, true));
|
this.printSettings.btnNextPage.on('click', _.bind(this.onChangePreviewPage, this, true));
|
||||||
this.printSettings.txtNumberPage.on({
|
this.printSettings.txtNumberPage.on({
|
||||||
|
|
|
@ -2745,8 +2745,8 @@ define([
|
||||||
//'<tr><td class="padding-large"><button type="button" class="btn btn-text-default" id="print-apply-all" style="width: 118px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtApplyToAllSheets %></button></td></tr>',
|
//'<tr><td class="padding-large"><button type="button" class="btn btn-text-default" id="print-apply-all" style="width: 118px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtApplyToAllSheets %></button></td></tr>',
|
||||||
'<tr class="fms-btn-apply"><td>',
|
'<tr class="fms-btn-apply"><td>',
|
||||||
'<div class="footer justify">',
|
'<div class="footer justify">',
|
||||||
'<button id="print-btn-print" class="btn normal dlg-btn primary" result="print" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtPrint %></button>',
|
'<button id="print-btn-print-0" class="btn normal dlg-btn primary" result="print" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtPrint %></button>',
|
||||||
'<button id="print-btn-save" class="btn normal dlg-btn" result="save" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtSave %></button>',
|
'<button id="print-btn-save-0" class="btn normal dlg-btn" result="save" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtSave %></button>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</td></tr>',
|
'</td></tr>',
|
||||||
'</tbody>',
|
'</tbody>',
|
||||||
|
@ -2754,8 +2754,8 @@ define([
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="fms-flex-apply hidden">',
|
'<div class="fms-flex-apply hidden">',
|
||||||
'<div class="footer justify">',
|
'<div class="footer justify">',
|
||||||
'<button id="print-btn-print" class="btn normal dlg-btn primary" result="print" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtPrint %></button>',
|
'<button id="print-btn-print-1" class="btn normal dlg-btn primary" result="print" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtPrint %></button>',
|
||||||
'<button id="print-btn-save" class="btn normal dlg-btn" result="save" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtSave %></button>',
|
'<button id="print-btn-save-1" class="btn normal dlg-btn" result="save" style="width: 96px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="big"><%= scope.txtSave %></button>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
|
@ -3016,13 +3016,16 @@ define([
|
||||||
this.pnlTable = $(this.pnlSettings.find('table')[0]);
|
this.pnlTable = $(this.pnlSettings.find('table')[0]);
|
||||||
this.trApply = $markup.find('.fms-btn-apply');
|
this.trApply = $markup.find('.fms-btn-apply');
|
||||||
|
|
||||||
this.btnSave = new Common.UI.Button({
|
this.btnsSave = [];
|
||||||
el: $markup.findById('#print-btn-save')
|
this.btnsPrint = [];
|
||||||
});
|
for (var i=0; i<2; i++) {
|
||||||
|
this.btnsSave.push(new Common.UI.Button({
|
||||||
this.btnPrint = new Common.UI.Button({
|
el: $markup.findById('#print-btn-save-'+i)
|
||||||
el: $markup.findById('#print-btn-print')
|
}));
|
||||||
});
|
this.btnsPrint.push(new Common.UI.Button({
|
||||||
|
el: $markup.findById('#print-btn-print-'+i)
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
this.btnPrevPage = new Common.UI.Button({
|
this.btnPrevPage = new Common.UI.Button({
|
||||||
parentEl: $markup.findById('#print-prev-page'),
|
parentEl: $markup.findById('#print-prev-page'),
|
||||||
|
|
Loading…
Reference in a new issue