[DE] Added parameter showReviewChanges to config: open review changes panel, when showReviewChanges is true (but not track review changes).

This commit is contained in:
Julia Radzhabova 2017-05-31 17:09:44 +03:00
parent e27d053872
commit c7a8f9efb8
2 changed files with 10 additions and 5 deletions

View file

@ -115,7 +115,8 @@
statusBar: true,
autosave: true,
forcesave: false,
commentAuthorOnly: false
commentAuthorOnly: false,
showReviewChanges: false
},
plugins: {
autoStartGuid: 'asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}',

View file

@ -184,6 +184,8 @@ define([
value = Common.localStorage.getItem("de-new-changes");
this.showNewChangesTip = !(value && parseInt(value) == 1) && !this.statusbar.mode.isLightVersion;
var showChangesPanel = (typeof (this.statusbar.mode.customization) == 'object' && !!this.statusbar.mode.customization.showReviewChanges);
if (this.statusbar.mode.isReviewOnly) {
var iconEl = $('.btn-icon', this.statusbar.btnReview.cmpEl);
(this.api.asc_HaveRevisionsChanges()) ? iconEl.removeClass(this.statusbar.btnReviewCls).addClass('btn-ic-changes') : iconEl.removeClass('btn-ic-changes').addClass(this.statusbar.btnReviewCls);
@ -199,9 +201,10 @@ define([
} else {
value = Common.localStorage.getItem("de-track-changes");
var doc_review = this.api.asc_IsTrackRevisions();
if (!doc_review)
if (!doc_review) {
this.changeReviewStatus(false);
else {
this.statusbar.mnuChangesPanel.setChecked(showChangesPanel);
} else {
var iconEl = $('.btn-icon', this.statusbar.btnReview.cmpEl);
(this.api.asc_HaveRevisionsChanges()) ? iconEl.removeClass(this.statusbar.btnReviewCls).addClass('btn-ic-changes') : iconEl.removeClass('btn-ic-changes').addClass(this.statusbar.btnReviewCls);
if (value!==null && parseInt(value) == 1) {
@ -216,6 +219,7 @@ define([
this.statusbar.btnReview.updateHint(this.statusbar.tipReview);
} else {
this.changeReviewStatus(false);
this.statusbar.mnuChangesPanel.setChecked(showChangesPanel);
if (this.api.asc_HaveRevisionsChanges() && this.showNewChangesTip && !statusbarIsHidden){
this.statusbar.btnReview.updateHint('');
if (this.newChangesTooltip===undefined)
@ -298,11 +302,11 @@ define([
if (this.api) {
this.api.asc_SetTrackRevisions(state);
}
this.showHideReviewChangesPanel(state && !this.statusbar.mode.isLightVersion);
this.showHideReviewChangesPanel(state);
},
showHideReviewChangesPanel: function(state) {
this.reviewChangesPanel[state ? 'show' : 'hide']();
this.reviewChangesPanel[(state && !this.statusbar.mode.isLightVersion) ? 'show' : 'hide']();
},
synchronizeChanges: function() {