[SSE] Print preview: add update name of preview sheet
This commit is contained in:
parent
6438d21602
commit
b0a69a7f1d
|
@ -104,6 +104,7 @@ define([
|
|||
setApi: function(o) {
|
||||
this.api = o;
|
||||
this.api.asc_registerCallback('asc_onSheetsChanged', _.bind(this.updateSheetsInfo, this));
|
||||
this.api.asc_registerCallback('asc_onPrintPreviewSheetChanged', _.bind(this.onApiChangePreviewSheet, this));
|
||||
},
|
||||
|
||||
updateSheetsInfo: function() {
|
||||
|
@ -685,6 +686,16 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onApiChangePreviewSheet: function (index) {
|
||||
var item = this.printSettings.cmbSheet.store.findWhere({value: index});
|
||||
if (item) {
|
||||
this.printSettings.cmbSheet.setValue(item.get('value'));
|
||||
this.comboSheetsChange(this.printSettings, this.printSettings.cmbSheet, item.toJSON());
|
||||
var sheetName = this.api.asc_getWorksheetName(index);
|
||||
this.printSettings.updateActiveSheet(sheetName);
|
||||
}
|
||||
},
|
||||
|
||||
warnCheckMargings: 'Margins are incorrect',
|
||||
strAllSheets: 'All Sheets',
|
||||
textWarning: 'Warning',
|
||||
|
|
Loading…
Reference in a new issue