[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');
|
state = (state == 'on');
|
||||||
|
|
||||||
this.api.asc_SetTrackRevisions(state);
|
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);
|
this.view.turnChanges(state);
|
||||||
}
|
}
|
||||||
|
@ -612,17 +612,9 @@ define([
|
||||||
me.api.asc_SetTrackRevisions(state);
|
me.api.asc_SetTrackRevisions(state);
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( config.isReviewOnly ) {
|
var state = config.isReviewOnly || Common.localStorage.getBool(me.view.appPrefix + "track-changes-" + (config.fileKey || ''));
|
||||||
me.api.asc_HaveRevisionsChanges() && me.view.markChanges(true);
|
(me.api.asc_IsTrackRevisions() || state) && me.api.asc_HaveRevisionsChanges() && me.view.markChanges(true);
|
||||||
|
_setReviewStatus(state);
|
||||||
_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"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( typeof (me.appConfig.customization) == 'object' && (me.appConfig.customization.showReviewChanges==true) ) {
|
if ( typeof (me.appConfig.customization) == 'object' && (me.appConfig.customization.showReviewChanges==true) ) {
|
||||||
me.dlgChanges = (new Common.Views.ReviewChangesDialog({
|
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.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string');
|
||||||
this.appOptions.canDownload = 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');
|
this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object');
|
||||||
if (this.appOptions.canBranding)
|
if (this.appOptions.canBranding)
|
||||||
appHeader.setBranding(this.editorConfig.customization);
|
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();
|
_process_changestip();
|
||||||
} else
|
} else if ( me.api.asc_IsTrackRevisions() ) {
|
||||||
if ( me.api.asc_IsTrackRevisions() ) {
|
var showNewChangesTip = !Common.localStorage.getBool("de-new-changes");
|
||||||
if ( Common.localStorage.getBool("de-track-changes") ) {
|
if ( me.api.asc_HaveRevisionsChanges() && showNewChangesTip ) {
|
||||||
// show tooltip "track changes in this document"
|
me.btnTurnReview.updateHint('');
|
||||||
_process_changestip();
|
|
||||||
} else {
|
|
||||||
var showNewChangesTip = !Common.localStorage.getBool("de-new-changes");
|
|
||||||
if ( me.api.asc_HaveRevisionsChanges() && showNewChangesTip ) {
|
|
||||||
me.btnTurnReview.updateHint('');
|
|
||||||
|
|
||||||
if (me.newChangesTooltip === undefined)
|
if (me.newChangesTooltip === undefined)
|
||||||
me.newChangesTooltip = me.createChangesTip(me.textHasChanges, 'de-new-changes', true);
|
me.newChangesTooltip = me.createChangesTip(me.textHasChanges, 'de-new-changes', true);
|
||||||
|
|
||||||
me.newChangesTooltip.show();
|
me.newChangesTooltip.show();
|
||||||
} else
|
} else
|
||||||
me.btnTurnReview.updateHint(me.tipReview);
|
me.btnTurnReview.updateHint(me.tipReview);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue