Revert "update mode"

This reverts commit 2d33507f5a0fec359cec394b7af8dfd83f1f9471.
This commit is contained in:
Alexander.Trofimov 2016-06-16 17:49:48 +03:00
parent 10ed28bcf4
commit 33dc2ca3e3
3 changed files with 3 additions and 3 deletions

View file

@ -929,7 +929,7 @@ define([
/** coauthoring end **/
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
this.appOptions.canLicense = true || (params.asc_getCanLicense ? params.asc_getCanLicense() : false);
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
this.appOptions.isOffline = this.api.asc_isOffline();
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

View file

@ -711,7 +711,7 @@ define([
this.appOptions.canCoAuthoring = true;
/** coauthoring end **/
this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.canLicense = true || (params.asc_getCanLicense ? params.asc_getCanLicense() : false);
this.appOptions.canLicense = params.asc_getCanLicense ? params.asc_getCanLicense() : false;
this.appOptions.canEdit = this.permissions.edit !== false && // can edit
(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';

View file

@ -726,7 +726,7 @@ define([
this.appOptions.canCoAuthoring = true;
/** coauthoring end **/
this.appOptions.isOffline = this.api.asc_isOffline();
this.appOptions.canLicense = true || (params.asc_getCanLicense ? params.asc_getCanLicense() : false);
this.appOptions.canLicense = 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.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);