Use editorConfig.coEditing parameter for collaboration settings
This commit is contained in:
parent
fc2bcf24bd
commit
2f5e7b4ef7
|
@ -55,8 +55,7 @@
|
|||
view: ["Group1", ""] // current user can view comments made by users from Group1 and users without a group.
|
||||
edit: ["Group1", ""] // current user can edit comments made by users from Group1 and users without a group.
|
||||
remove: ["Group1", ""] // current user can remove comments made by users from Group1 and users without a group.
|
||||
},
|
||||
changeCoAuthoring: true // can change co-authoring mode
|
||||
}
|
||||
}
|
||||
},
|
||||
editorConfig: {
|
||||
|
@ -135,7 +134,7 @@
|
|||
anonymous: { // set name for anonymous user
|
||||
request: bool (default: true), // enable set name
|
||||
label: string (default: "Guest") // postfix for user name
|
||||
}
|
||||
},
|
||||
chat: true,
|
||||
comments: true,
|
||||
zoom: 100,
|
||||
|
@ -162,9 +161,12 @@
|
|||
plugins: true // can run plugins in document
|
||||
macrosMode: 'warn' // warn about automatic macros, 'enable', 'disable', 'warn',
|
||||
trackChanges: undefined // true/false - open editor with track changes mode on/off,
|
||||
hideRulers: false, // hide or show rulers on first loading (presentation or document editor),
|
||||
modeCoAuthoring: <coauthoring mode>, 'fast' (default) or 'strict'. if 'fast' and 'autosave'=false -> set 'autosave'=true
|
||||
hideRulers: false // hide or show rulers on first loading (presentation or document editor)
|
||||
},
|
||||
coEditing: {
|
||||
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true
|
||||
change: true, // can change co-authoring mode
|
||||
},
|
||||
plugins: {
|
||||
autostart: ['asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}'],
|
||||
pluginsData: [
|
||||
|
|
|
@ -1357,7 +1357,7 @@ define([
|
|||
Common.NotificationCenter.on('comments:cleardummy', _.bind(this.onClearDummyComment, this));
|
||||
Common.NotificationCenter.on('comments:showdummy', _.bind(this.onShowDummyComment, this));
|
||||
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && (this.permissions.changeCoAuthoring!==false);
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
|
||||
|
||||
this.loadCoAuthSettings();
|
||||
this.applyModeCommonElements();
|
||||
|
@ -1381,15 +1381,15 @@ define([
|
|||
autosave = 1,
|
||||
value;
|
||||
if (this.appOptions.isEdit && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) {
|
||||
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use customization.modeCoAuthoring or 'fast' by default
|
||||
value = (this.appOptions.customization && this.appOptions.customization.modeCoAuthoring!==undefined) ? (this.appOptions.customization.modeCoAuthoring==='strict' ? 0 : 1) : null;
|
||||
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use coEditing.mode or 'fast' by default
|
||||
value = (this.editorConfig.coEditing && this.editorConfig.coEditing.mode!==undefined) ? (this.editorConfig.coEditing.mode==='strict' ? 0 : 1) : null;
|
||||
if (value===null && this.appOptions.customization && this.appOptions.customization.autosave===false) {
|
||||
value = 0; // use customization.autosave only when modeCoAuthoring are null
|
||||
value = 0; // use customization.autosave only when coEditing.mode is null
|
||||
}
|
||||
} else {
|
||||
value = Common.localStorage.getItem("de-settings-coauthmode");
|
||||
if (value===null) {
|
||||
value = (this.appOptions.customization && this.appOptions.customization.modeCoAuthoring!==undefined) ? (this.appOptions.customization.modeCoAuthoring==='strict' ? 0 : 1) : null;
|
||||
value = (this.editorConfig.coEditing && this.editorConfig.coEditing.mode!==undefined) ? (this.editorConfig.coEditing.mode==='strict' ? 0 : 1) : null;
|
||||
if (value===null && !Common.localStorage.itemExists("de-settings-autosave") &&
|
||||
this.appOptions.customization && this.appOptions.customization.autosave===false) {
|
||||
value = 0; // use customization.autosave only when de-settings-coauthmode and de-settings-autosave are null
|
||||
|
|
|
@ -1065,7 +1065,7 @@ define([
|
|||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
|
||||
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
|
||||
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && (this.permissions.changeCoAuthoring!==false);
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
|
||||
|
||||
this.loadCoAuthSettings();
|
||||
this.applyModeCommonElements();
|
||||
|
@ -1089,15 +1089,15 @@ define([
|
|||
value;
|
||||
|
||||
if (this.appOptions.isEdit && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) {
|
||||
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use customization.modeCoAuthoring or 'fast' by default
|
||||
value = (this.appOptions.customization && this.appOptions.customization.modeCoAuthoring!==undefined) ? (this.appOptions.customization.modeCoAuthoring==='strict' ? 0 : 1) : null;
|
||||
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use coEditing.mode or 'fast' by default
|
||||
value = (this.editorConfig.coEditing && this.editorConfig.coEditing.mode!==undefined) ? (this.editorConfig.coEditing.mode==='strict' ? 0 : 1) : null;
|
||||
if (value===null && this.appOptions.customization && this.appOptions.customization.autosave===false) {
|
||||
value = 0; // use customization.autosave only when modeCoAuthoring are null
|
||||
value = 0; // use customization.autosave only when coEditing.mode is null
|
||||
}
|
||||
} else {
|
||||
value = Common.localStorage.getItem("pe-settings-coauthmode");
|
||||
if (value===null) {
|
||||
value = (this.appOptions.customization && this.appOptions.customization.modeCoAuthoring!==undefined) ? (this.appOptions.customization.modeCoAuthoring==='strict' ? 0 : 1) : null;
|
||||
value = (this.editorConfig.coEditing && this.editorConfig.coEditing.mode!==undefined) ? (this.editorConfig.coEditing.mode==='strict' ? 0 : 1) : null;
|
||||
if (value===null && !Common.localStorage.itemExists("pe-settings-autosave") &&
|
||||
this.appOptions.customization && this.appOptions.customization.autosave===false) {
|
||||
value = 0; // use customization.autosave only when de-settings-coauthmode and pe-settings-autosave are null
|
||||
|
|
|
@ -1124,7 +1124,8 @@ define([
|
|||
this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false);
|
||||
this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments;
|
||||
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) && this.appOptions.canCoAuthoring && (this.permissions.changeCoAuthoring!==false);
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) && this.appOptions.canCoAuthoring &&
|
||||
!(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false);
|
||||
|
||||
if (!this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge) {
|
||||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
|
||||
|
@ -1153,15 +1154,15 @@ define([
|
|||
value;
|
||||
|
||||
if (this.appOptions.isEdit && !this.appOptions.isOffline && this.appOptions.canCoAuthoring) {
|
||||
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use customization.modeCoAuthoring or 'fast' by default
|
||||
value = (this.appOptions.customization && this.appOptions.customization.modeCoAuthoring!==undefined) ? (this.appOptions.customization.modeCoAuthoring==='strict' ? 0 : 1) : null;
|
||||
if (!this.appOptions.canChangeCoAuthoring) { //can't change co-auth. mode. Use coEditing.mode or 'fast' by default
|
||||
value = (this.editorConfig.coEditing && this.editorConfig.coEditing.mode!==undefined) ? (this.editorConfig.coEditing.mode==='strict' ? 0 : 1) : null;
|
||||
if (value===null && this.appOptions.customization && this.appOptions.customization.autosave===false) {
|
||||
value = 0; // use customization.autosave only when modeCoAuthoring are null
|
||||
value = 0; // use customization.autosave only when coEditing.mode is null
|
||||
}
|
||||
} else {
|
||||
value = Common.localStorage.getItem("sse-settings-coauthmode");
|
||||
if (value===null) {
|
||||
value = (this.appOptions.customization && this.appOptions.customization.modeCoAuthoring!==undefined) ? (this.appOptions.customization.modeCoAuthoring==='strict' ? 0 : 1) : null;
|
||||
value = (this.editorConfig.coEditing && this.editorConfig.coEditing.mode!==undefined) ? (this.editorConfig.coEditing.mode==='strict' ? 0 : 1) : null;
|
||||
if (value===null && !Common.localStorage.itemExists("sse-settings-autosave") &&
|
||||
this.appOptions.customization && this.appOptions.customization.autosave===false) {
|
||||
value = 0; // use customization.autosave only when de-settings-coauthmode and de-settings-autosave are null
|
||||
|
|
Loading…
Reference in a new issue