commit
8d7da47db2
|
@ -115,6 +115,7 @@ define([
|
||||||
this.api = o;
|
this.api = o;
|
||||||
this.api.asc_registerCallback('asc_onSheetsChanged', _.bind(this.updateSheetsInfo, this));
|
this.api.asc_registerCallback('asc_onSheetsChanged', _.bind(this.updateSheetsInfo, this));
|
||||||
this.api.asc_registerCallback('asc_onPrintPreviewSheetChanged', _.bind(this.onApiChangePreviewSheet, this));
|
this.api.asc_registerCallback('asc_onPrintPreviewSheetChanged', _.bind(this.onApiChangePreviewSheet, this));
|
||||||
|
this.api.asc_registerCallback('asc_onUpdateDocumentProps', _.bind(this.updateDocumentProps, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
updateSheetsInfo: function() {
|
updateSheetsInfo: function() {
|
||||||
|
@ -456,8 +457,8 @@ define([
|
||||||
panel.spnMarginRight.on('change', _.bind(this.propertyChange, this, panel));
|
panel.spnMarginRight.on('change', _.bind(this.propertyChange, this, panel));
|
||||||
panel.chPrintGrid.on('change', _.bind(this.propertyChange, this, panel));
|
panel.chPrintGrid.on('change', _.bind(this.propertyChange, this, panel));
|
||||||
panel.chPrintRows.on('change', _.bind(this.propertyChange, this, panel));
|
panel.chPrintRows.on('change', _.bind(this.propertyChange, this, panel));
|
||||||
panel.txtRangeTop.on('changing', _.bind(this.propertyChange, this, panel));
|
panel.txtRangeTop.on('changed:after', _.bind(this.propertyChange, this, panel));
|
||||||
panel.txtRangeLeft.on('changing', _.bind(this.propertyChange, this, panel));
|
panel.txtRangeLeft.on('changed:after', _.bind(this.propertyChange, this, panel));
|
||||||
panel.txtRangeTop.on('button:click', _.bind(this.onPresetSelect, this, panel, 'top', panel.btnPresetsTop.menu, {value: 'select'}));
|
panel.txtRangeTop.on('button:click', _.bind(this.onPresetSelect, this, panel, 'top', panel.btnPresetsTop.menu, {value: 'select'}));
|
||||||
panel.txtRangeLeft.on('button:click', _.bind(this.onPresetSelect, this, panel, 'left', panel.btnPresetsLeft.menu, {value: 'select'}));
|
panel.txtRangeLeft.on('button:click', _.bind(this.onPresetSelect, this, panel, 'left', panel.btnPresetsLeft.menu, {value: 'select'}));
|
||||||
panel.btnPresetsTop.menu.on('item:click', _.bind(this.onPresetSelect, this, panel, 'top'));
|
panel.btnPresetsTop.menu.on('item:click', _.bind(this.onPresetSelect, this, panel, 'top'));
|
||||||
|
@ -521,7 +522,6 @@ define([
|
||||||
fillComponents: function(panel, selectdata) {
|
fillComponents: function(panel, selectdata) {
|
||||||
var me = this;
|
var me = this;
|
||||||
panel.txtRangeTop.validation = function(value) {
|
panel.txtRangeTop.validation = function(value) {
|
||||||
!me._noApply && me.propertyChange(panel);
|
|
||||||
if (_.isEmpty(value)) {
|
if (_.isEmpty(value)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -531,7 +531,6 @@ define([
|
||||||
selectdata && panel.txtRangeTop.updateBtnHint(this.textSelectRange);
|
selectdata && panel.txtRangeTop.updateBtnHint(this.textSelectRange);
|
||||||
|
|
||||||
panel.txtRangeLeft.validation = function(value) {
|
panel.txtRangeLeft.validation = function(value) {
|
||||||
!me._noApply && me.propertyChange(panel);
|
|
||||||
if (_.isEmpty(value)) {
|
if (_.isEmpty(value)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -748,6 +747,13 @@ define([
|
||||||
this.printSettings.btnNextPage.setDisabled(curPage > pageCount - 2);
|
this.printSettings.btnNextPage.setDisabled(curPage > pageCount - 2);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateDocumentProps: function (index) {
|
||||||
|
if (this._isPreviewVisible) {
|
||||||
|
this._changedProps[index] = this.api.asc_getPageOptions(index);
|
||||||
|
this.updatePreview();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
warnCheckMargings: 'Margins are incorrect',
|
warnCheckMargings: 'Margins are incorrect',
|
||||||
strAllSheets: 'All Sheets',
|
strAllSheets: 'All Sheets',
|
||||||
textWarning: 'Warning',
|
textWarning: 'Warning',
|
||||||
|
|
Loading…
Reference in a new issue