mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
[SSE] Set scroll settings from config
This commit is contained in:
@ -260,6 +260,8 @@
|
|||||||
},
|
},
|
||||||
slidePlayerBackground: '#000000', // background color for slide show in presentation editor
|
slidePlayerBackground: '#000000', // background color for slide show in presentation editor
|
||||||
wordHeadingsColor: '#00ff00' // set color for default heading styles in document 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: {
|
coEditing: {
|
||||||
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor
|
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor
|
||||||
|
|||||||
@ -157,6 +157,13 @@ SSE.ApplicationController = new(function(){
|
|||||||
enable = !config.customization || (config.customization.plugins!==false);
|
enable = !config.customization || (config.customization.plugins!==false);
|
||||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
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) {
|
if (api) {
|
||||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||||
api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses);
|
||||||
|
|||||||
@ -608,6 +608,13 @@ define([
|
|||||||
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
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);
|
this.headerView && this.headerView.setDocumentCaption(data.doc.title);
|
||||||
Common.Utils.InternalSettings.set("sse-doc-info-key", data.doc.key);
|
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);
|
enable = !this.editorConfig.customization || (this.editorConfig.customization.plugins!==false);
|
||||||
docInfo.asc_putIsEnabledPlugins(!!enable);
|
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
|
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.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';
|
this.editorConfig.coEditing.mode || 'fast';
|
||||||
|
|||||||
Reference in New Issue
Block a user