diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index d0bf1aefb..ddf8c1b6b 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -497,7 +497,7 @@ define([ state = (state == 'on'); this.api.asc_SetTrackRevisions(state); - Common.localStorage.setItem(this.view.appPrefix + "track-changes", state ? 1 : 0); + Common.localStorage.setItem(this.view.appPrefix + "track-changes-" + (this.appConfig.fileKey || ''), state ? 1 : 0); this.view.turnChanges(state); } @@ -612,17 +612,9 @@ define([ me.api.asc_SetTrackRevisions(state); }; - if ( config.isReviewOnly ) { - me.api.asc_HaveRevisionsChanges() && me.view.markChanges(true); - - _setReviewStatus(true); - } else - if ( !me.api.asc_IsTrackRevisions() ) { - _setReviewStatus(false); - } else { - me.api.asc_HaveRevisionsChanges() && me.view.markChanges(true); - _setReviewStatus(Common.localStorage.getBool(me.view.appPrefix + "track-changes")); - } + var state = config.isReviewOnly || Common.localStorage.getBool(me.view.appPrefix + "track-changes-" + (config.fileKey || '')); + (me.api.asc_IsTrackRevisions() || state) && me.api.asc_HaveRevisionsChanges() && me.view.markChanges(true); + _setReviewStatus(state); if ( typeof (me.appConfig.customization) == 'object' && (me.appConfig.customization.showReviewChanges==true) ) { me.dlgChanges = (new Common.Views.ReviewChangesDialog({ diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 95b312e3f..6ef4210d5 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1143,6 +1143,8 @@ define([ this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string'); this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string'); + this.appOptions.fileKey = this.document.key; + this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object'); if (this.appOptions.canBranding) appHeader.setBranding(this.editorConfig.customization); diff --git a/apps/documenteditor/main/app/controller/Statusbar.js b/apps/documenteditor/main/app/controller/Statusbar.js index 35237e80c..cdb4c001e 100644 --- a/apps/documenteditor/main/app/controller/Statusbar.js +++ b/apps/documenteditor/main/app/controller/Statusbar.js @@ -143,27 +143,20 @@ define([ } } - if ( config.isReviewOnly ) { + if ( config.isReviewOnly || Common.localStorage.getBool("de-track-changes-" + (config.fileKey || ''))) { _process_changestip(); - } else - if ( me.api.asc_IsTrackRevisions() ) { - if ( Common.localStorage.getBool("de-track-changes") ) { - // show tooltip "track changes in this document" - _process_changestip(); - } else { - var showNewChangesTip = !Common.localStorage.getBool("de-new-changes"); - if ( me.api.asc_HaveRevisionsChanges() && showNewChangesTip ) { - me.btnTurnReview.updateHint(''); + } else if ( me.api.asc_IsTrackRevisions() ) { + var showNewChangesTip = !Common.localStorage.getBool("de-new-changes"); + if ( me.api.asc_HaveRevisionsChanges() && showNewChangesTip ) { + me.btnTurnReview.updateHint(''); - if (me.newChangesTooltip === undefined) - me.newChangesTooltip = me.createChangesTip(me.textHasChanges, 'de-new-changes', true); + if (me.newChangesTooltip === undefined) + me.newChangesTooltip = me.createChangesTip(me.textHasChanges, 'de-new-changes', true); - me.newChangesTooltip.show(); - } else - me.btnTurnReview.updateHint(me.tipReview); - } + me.newChangesTooltip.show(); + } else + me.btnTurnReview.updateHint(me.tipReview); } - } }); },