diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index ce7d98534f..a340d34f4b 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -260,6 +260,8 @@ }, slidePlayerBackground: '#000000', // background color for slide show in presentation editor wordHeadingsColor: '#00ff00' // set color for default heading styles in document editor + showVerticalScroll: true/false, // show/hide scroll in the spreadsheet editor by default + showHorizontalScroll: true/false // show/hide scroll in the spreadsheet editor by default }, coEditing: { mode: 'fast', // , 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 888f1371ee..fcd54552a8 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -157,6 +157,13 @@ SSE.ApplicationController = new(function(){ enable = !config.customization || (config.customization.plugins!==false); docInfo.asc_putIsEnabledPlugins(!!enable); + if (config.customization) { + if (config.customization.showVerticalScroll!==undefined && config.customization.showVerticalScroll!==null) + docInfo.asc_putShowVerticalScroll(config.customization.showVerticalScroll); + if (config.customization.showHorizontalScroll!==undefined && config.customization.showHorizontalScroll!==null) + docInfo.asc_putShowHorizontalScroll(config.customization.showHorizontalScroll); + } + if (api) { api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 14125dd4e2..83e605419a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -608,6 +608,13 @@ define([ enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); docInfo.asc_putIsEnabledPlugins(!!enable); + if (this.editorConfig.customization) { + if (this.editorConfig.customization.showVerticalScroll!==undefined && this.editorConfig.customization.showVerticalScroll!==null) + docInfo.asc_putShowVerticalScroll(this.editorConfig.customization.showVerticalScroll); + if (this.editorConfig.customization.showHorizontalScroll!==undefined && this.editorConfig.customization.showHorizontalScroll!==null) + docInfo.asc_putShowHorizontalScroll(this.editorConfig.customization.showHorizontalScroll); + } + this.headerView && this.headerView.setDocumentCaption(data.doc.title); Common.Utils.InternalSettings.set("sse-doc-info-key", data.doc.key); } @@ -3690,6 +3697,13 @@ define([ enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false); docInfo.asc_putIsEnabledPlugins(!!enable); + if (this.editorConfig.customization) { + if (this.editorConfig.customization.showVerticalScroll!==undefined && this.editorConfig.customization.showVerticalScroll!==null) + docInfo.asc_putShowVerticalScroll(this.editorConfig.customization.showVerticalScroll); + if (this.editorConfig.customization.showHorizontalScroll!==undefined && this.editorConfig.customization.showHorizontalScroll!==null) + docInfo.asc_putShowHorizontalScroll(this.editorConfig.customization.showHorizontalScroll); + } + var coEditMode = !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object') ? 'fast' : // fast by default this.editorConfig.mode === 'view' && this.editorConfig.coEditing.change!==false ? 'fast' : // if can change mode in viewer - set fast for using live viewer this.editorConfig.coEditing.mode || 'fast';