Commit 2d33507f authored by Alexander.Trofimov's avatar Alexander.Trofimov

update mode

parent f5aa4fb2
...@@ -921,7 +921,7 @@ define([ ...@@ -921,7 +921,7 @@ define([
/** coauthoring end **/ /** coauthoring end **/
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review; this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable(); this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; this.appOptions.canLicense = true || (params.asc_getCanLicense ? params.asc_getCanLicense() : false);
this.appOptions.isOffline = this.api.asc_isOffline(); this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.isReviewOnly = (this.permissions.review === true) && (this.permissions.edit === false); this.appOptions.isReviewOnly = (this.permissions.review === true) && (this.permissions.edit === false);
this.appOptions.canEdit = (this.permissions.edit !== false || this.permissions.review === true) && // can edit or review this.appOptions.canEdit = (this.permissions.edit !== false || this.permissions.review === true) && // can edit or review
......
...@@ -703,7 +703,7 @@ define([ ...@@ -703,7 +703,7 @@ define([
this.appOptions.canCoAuthoring = true; this.appOptions.canCoAuthoring = true;
/** coauthoring end **/ /** coauthoring end **/
this.appOptions.isOffline = this.api.asc_isOffline(); this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; this.appOptions.canLicense = true || (params.asc_getCanLicense ? params.asc_getCanLicense() : false);
this.appOptions.canEdit = this.permissions.edit !== false && // can edit this.appOptions.canEdit = this.permissions.edit !== false && // can edit
(this.editorConfig.canRequestEditRights || this.editorConfig.mode !== 'view'); // if mode=="view" -> canRequestEditRights must be defined (this.editorConfig.canRequestEditRights || this.editorConfig.mode !== 'view'); // if mode=="view" -> canRequestEditRights must be defined
this.appOptions.isEdit = this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view'; this.appOptions.isEdit = this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
......
...@@ -718,7 +718,7 @@ define([ ...@@ -718,7 +718,7 @@ define([
this.appOptions.canCoAuthoring = true; this.appOptions.canCoAuthoring = true;
/** coauthoring end **/ /** coauthoring end **/
this.appOptions.isOffline = this.api.asc_isOffline(); this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false; this.appOptions.canLicense = true || (params.asc_getCanLicense ? params.asc_getCanLicense() : false);
this.appOptions.canComments = this.appOptions.canLicense && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false); this.appOptions.canComments = this.appOptions.canLicense && !((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.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment