Fix coEditing=null
This commit is contained in:
parent
3fe450ef0b
commit
f046177e53
|
@ -473,7 +473,7 @@ define([
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
|
@ -1548,8 +1548,8 @@ define([
|
|||
Common.NotificationCenter.on('comments:showdummy', _.bind(this.onShowDummyComment, this));
|
||||
|
||||
// change = true by default in editor, change = false by default in viewer
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
|
||||
|
||||
this.loadCoAuthSettings();
|
||||
this.applyModeCommonElements();
|
||||
|
|
|
@ -430,7 +430,7 @@ define([
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
|
@ -1195,8 +1195,8 @@ define([
|
|||
this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features, this.appOptions.canBrandingExt);
|
||||
|
||||
// change = true by default in editor, change = false by default in viewer
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
|
||||
|
||||
this.loadCoAuthSettings();
|
||||
this.applyModeCommonElements();
|
||||
|
|
|
@ -504,7 +504,7 @@ define([
|
|||
docInfo.put_Lang(this.editorConfig.lang);
|
||||
docInfo.put_Mode(this.editorConfig.mode);
|
||||
|
||||
if (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
if (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.mode!==undefined)
|
||||
docInfo.put_CoEditingMode(this.editorConfig.coEditing.mode);
|
||||
|
||||
var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false);
|
||||
|
@ -1284,8 +1284,8 @@ define([
|
|||
|
||||
// change = true by default in editor, change = false by default in viewer
|
||||
this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) && this.appOptions.canCoAuthoring &&
|
||||
!(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
|
||||
!(this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false) ||
|
||||
!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit && (this.editorConfig.coEditing && typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===true) ;
|
||||
|
||||
if (!this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge && !this.appOptions.isEditOle) {
|
||||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
|
||||
|
|
Loading…
Reference in a new issue