[SSE] Bug 57488 (#1786)

This commit is contained in:
JuliaSvinareva 2022-06-07 10:27:50 +03:00 committed by GitHub
parent f17c824f1e
commit a0be79bdee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 4 deletions

View file

@ -1387,7 +1387,7 @@ define([
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(this.onDocumentModifiedChanged, this)); this.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(this.onDocumentModifiedChanged, this));
var printController = app.getController('Print'); var printController = app.getController('Print');
printController && this.api && printController.setApi(this.api); printController && this.api && printController.setApi(this.api).setMode(this.appOptions);
} }

View file

@ -119,12 +119,19 @@ define([
this.printSettings.$previewBox.on(eventname, _.bind(this.onPreviewWheel, this)); this.printSettings.$previewBox.on(eventname, _.bind(this.onPreviewWheel, this));
}, },
setMode: function (mode) {
this.mode = mode;
this.printSettings && this.printSettings.setMode(mode);
},
setApi: function(o) { setApi: function(o) {
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_onPrintPreviewPageChanged', _.bind(this.onApiChangePreviewPage, this)); this.api.asc_registerCallback('asc_onPrintPreviewPageChanged', _.bind(this.onApiChangePreviewPage, this));
this.api.asc_registerCallback('asc_onPrintPreviewSheetDataChanged', _.bind(this.onApiPreviewSheetDataChanged, this)); this.api.asc_registerCallback('asc_onPrintPreviewSheetDataChanged', _.bind(this.onApiPreviewSheetDataChanged, this));
return this;
}, },
updateSheetsInfo: function() { updateSheetsInfo: function() {

View file

@ -2317,7 +2317,7 @@ define([
'<tr><td class="padding-small"><label class="header"><%= scope.txtGridlinesAndHeadings %></label></td></tr>', '<tr><td class="padding-small"><label class="header"><%= scope.txtGridlinesAndHeadings %></label></td></tr>',
'<tr><td class="padding-small"><div id="print-chb-grid" style="width: 248px;"></div></td></tr>', '<tr><td class="padding-small"><div id="print-chb-grid" style="width: 248px;"></div></td></tr>',
'<tr><td class="padding-large"><div id="print-chb-rows" style="width: 248px;"></div></td></tr>', '<tr><td class="padding-large"><div id="print-chb-rows" style="width: 248px;"></div></td></tr>',
'<tr><td class="padding-large"><label class="link" id="print-header-footer-settings" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtHeaderFooterSettings %></label></td></tr>', '<tr class="header-settings"><td class="padding-large"><label class="link" id="print-header-footer-settings" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtHeaderFooterSettings %></label></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><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">',
@ -2648,8 +2648,11 @@ define([
this.$el = $(node).html($markup); this.$el = $(node).html($markup);
this.$el.on('click', '#print-header-footer-settings', _.bind(this.openHeaderSettings, this)); if (!this.mode.isEdit) {
this.$headerSettings = $('#print-header-footer-settings'); $markup.find('.header-settings').hide();
} else {
this.$el.on('click', '#print-header-footer-settings', _.bind(this.openHeaderSettings, this));
}
this.$previewBox = $('#print-preview-box'); this.$previewBox = $('#print-preview-box');
this.$previewEmpty = $('#print-preview-empty'); this.$previewEmpty = $('#print-preview-empty');