commit
d06eed0083
|
@ -97,13 +97,14 @@ define([
|
||||||
'keyup:after': _.bind(this.onKeyupPageNumber, this)
|
'keyup:after': _.bind(this.onKeyupPageNumber, this)
|
||||||
});
|
});
|
||||||
this.printSettings.txtNumberPage.cmpEl.find('input').on('blur', _.bind(this.onBlurPageNumber, this));
|
this.printSettings.txtNumberPage.cmpEl.find('input').on('blur', _.bind(this.onBlurPageNumber, this));
|
||||||
this.printSettings.chIgnorePrintArea.on('change', _.bind(this.updatePreview, this));
|
this.printSettings.chIgnorePrintArea.on('change', _.bind(this.updatePreview, this, true));
|
||||||
|
|
||||||
this.fillComponents(this.printSettings);
|
this.fillComponents(this.printSettings);
|
||||||
this.registerControlEvents(this.printSettings);
|
this.registerControlEvents(this.printSettings);
|
||||||
|
|
||||||
Common.NotificationCenter.on('window:resize', _.bind(function () {
|
Common.NotificationCenter.on('window:resize', _.bind(function () {
|
||||||
if (this._isPreviewVisible) {
|
if (this._isPreviewVisible) {
|
||||||
|
this.notUpdateSheetSettings = true;
|
||||||
this.api.asc_drawPrintPreview(this._navigationPreview.currentPage);
|
this.api.asc_drawPrintPreview(this._navigationPreview.currentPage);
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
|
@ -248,7 +249,7 @@ define([
|
||||||
menu.chIgnorePrintArea.setDisabled(printtype == Asc.c_oAscPrintType.Selection);
|
menu.chIgnorePrintArea.setDisabled(printtype == Asc.c_oAscPrintType.Selection);
|
||||||
|
|
||||||
if (!isDlg) {
|
if (!isDlg) {
|
||||||
this.updatePreview();
|
this.updatePreview(true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -329,6 +330,7 @@ define([
|
||||||
this.printSettings.txtNumberPage.checkValidate();
|
this.printSettings.txtNumberPage.checkValidate();
|
||||||
}
|
}
|
||||||
this._isPreviewVisible = true;
|
this._isPreviewVisible = true;
|
||||||
|
!!pageCount && this.updatePreview();
|
||||||
},
|
},
|
||||||
|
|
||||||
openPrintSettings: function(type, cmp, format, asUrl) {
|
openPrintSettings: function(type, cmp, format, asUrl) {
|
||||||
|
@ -700,7 +702,7 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updatePreview: function () {
|
updatePreview: function (needUpdate) {
|
||||||
if (this._isPreviewVisible) {
|
if (this._isPreviewVisible) {
|
||||||
var adjPrintParams = new Asc.asc_CAdjustPrint(),
|
var adjPrintParams = new Asc.asc_CAdjustPrint(),
|
||||||
printType = this.printSettings.getRange();
|
printType = this.printSettings.getRange();
|
||||||
|
@ -723,6 +725,7 @@ define([
|
||||||
newPage = this._navigationPreview.currentPage;
|
newPage = this._navigationPreview.currentPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.notUpdateSheetSettings = !needUpdate;
|
||||||
this.api.asc_drawPrintPreview(newPage);
|
this.api.asc_drawPrintPreview(newPage);
|
||||||
|
|
||||||
this.updateNavigationButtons(newPage, pageCount);
|
this.updateNavigationButtons(newPage, pageCount);
|
||||||
|
@ -730,6 +733,10 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiChangePreviewSheet: function (index) {
|
onApiChangePreviewSheet: function (index) {
|
||||||
|
if (this.notUpdateSheetSettings) {
|
||||||
|
this.notUpdateSheetSettings = false;
|
||||||
|
return
|
||||||
|
}
|
||||||
var item = this.printSettings.cmbSheet.store.findWhere({value: index});
|
var item = this.printSettings.cmbSheet.store.findWhere({value: index});
|
||||||
if (item) {
|
if (item) {
|
||||||
this.printSettings.cmbSheet.setValue(item.get('value'));
|
this.printSettings.cmbSheet.setValue(item.get('value'));
|
||||||
|
|
Loading…
Reference in a new issue