[DE] Save track-changes option for file key
This commit is contained in:
parent
37aa12a9b6
commit
d5c7220c9c
|
@ -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({
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue