Disable file renaming if onRequestRename isn't defined
This commit is contained in:
parent
bcf65fa0e8
commit
c12a591e6f
|
@ -191,6 +191,7 @@
|
|||
_config.editorConfig.canSendEmailAddresses = _config.events && !!_config.events.onRequestEmailAddresses;
|
||||
_config.editorConfig.canRequestEditRights = _config.events && !!_config.events.onRequestEditRights;
|
||||
_config.editorConfig.canRequestClose = _config.events && !!_config.events.onRequestClose;
|
||||
_config.editorConfig.canRename = _config.events && !!_config.events.onRequestRename;
|
||||
_config.frameEditorId = placeholderId;
|
||||
|
||||
_config.events && !!_config.events.onReady && console.log("Obsolete: The onReady event is deprecated. Please use onAppReady instead.");
|
||||
|
|
|
@ -1082,7 +1082,7 @@ define([
|
|||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
|
||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||
this.appOptions.canRename = !!this.permissions.rename;
|
||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
||||
this.appOptions.buildVersion = params.asc_getBuildVersion();
|
||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||
|
|
|
@ -847,7 +847,7 @@ define([
|
|||
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||
this.appOptions.canRename = !!this.permissions.rename;
|
||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
|
||||
|
|
|
@ -870,7 +870,7 @@ define([
|
|||
this.appOptions.canComments = this.appOptions.canLicense && (this.permissions.comment===undefined ? (this.permissions.edit !== false && this.editorConfig.mode !== 'view') : this.permissions.comment);
|
||||
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canRename = !!this.permissions.rename;
|
||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
||||
this.appOptions.trialMode = params.asc_getLicenseMode();
|
||||
this.appOptions.canProtect = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport();
|
||||
this.appOptions.canModifyFilter = (this.permissions.modifyFilter!==false);
|
||||
|
|
Loading…
Reference in a new issue