[DE] Change track revisions
This commit is contained in:
parent
f76b650704
commit
526732cc53
|
@ -562,24 +562,24 @@ define([
|
||||||
this.view.turnChanges(true);
|
this.view.turnChanges(true);
|
||||||
} else
|
} else
|
||||||
if ( this.appConfig.canReview ) {
|
if ( this.appConfig.canReview ) {
|
||||||
var sendMessage = !fromApi;
|
|
||||||
var saveToFile = !!global; // save track changes flag (state) to file
|
var saveToFile = !!global; // save track changes flag (state) to file
|
||||||
this.api.asc_SetTrackRevisions(!!state, saveToFile, sendMessage);
|
if (saveToFile) {
|
||||||
|
this.api.asc_SetLocalTrackRevisions(null);
|
||||||
|
this.api.asc_SetGlobalTrackRevisions(!!state);
|
||||||
|
} else
|
||||||
|
this.api.asc_SetLocalTrackRevisions(!!state);
|
||||||
Common.Utils.InternalSettings.set(this.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
|
Common.Utils.InternalSettings.set(this.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
|
||||||
this.view.turnChanges(state, global);
|
this.view.turnChanges(state, global);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiTrackRevisionsChange: function(state, global, userId) {
|
onApiTrackRevisionsChange: function(localFlag, globalFlag, userId) { // use userId only for globalFlag
|
||||||
// change local or global state
|
// change global state
|
||||||
if (userId && this.getUserName(userId)) {
|
if (userId) {
|
||||||
if (state)
|
this.showTips(Common.Utils.String.format(globalFlag ? this.textOnGlobal : this.textOffGlobal, this.getUserName(userId)));
|
||||||
this.showTips(Common.Utils.String.format(global ? this.textOnGlobal : this.textOn, this.getUserName(userId)));
|
if (Common.Utils.InternalSettings.get(this.view.appPrefix + "track-changes")>1) {
|
||||||
else
|
Common.NotificationCenter.trigger('reviewchanges:turn', globalFlag, true, true);
|
||||||
this.showTips(Common.Utils.String.format(global ? this.textOffGlobal : this.textOff, this.getUserName(userId)));
|
}
|
||||||
}
|
|
||||||
if (global && Common.Utils.InternalSettings.get(this.view.appPrefix + "track-changes")>1) {
|
|
||||||
Common.NotificationCenter.trigger('reviewchanges:turn', state, global, true);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ define([
|
||||||
})).then(function () {
|
})).then(function () {
|
||||||
function _setReviewStatus(state, global) {
|
function _setReviewStatus(state, global) {
|
||||||
me.view.turnChanges(state, global);
|
me.view.turnChanges(state, global);
|
||||||
me.api.asc_SetTrackRevisions(state);
|
!global && me.api.asc_SetLocalTrackRevisions(state);
|
||||||
Common.Utils.InternalSettings.set(me.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
|
Common.Utils.InternalSettings.set(me.view.appPrefix + "track-changes", (state ? 0 : 1) + (global ? 2 : 0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue