Commit 10ed28bc authored by Alexander.Trofimov's avatar Alexander.Trofimov

update mode

parent de3250c5
...@@ -929,7 +929,7 @@ define([ ...@@ -929,7 +929,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
......
...@@ -711,7 +711,7 @@ define([ ...@@ -711,7 +711,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';
......
...@@ -726,7 +726,7 @@ define([ ...@@ -726,7 +726,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