Merge pull request #620 from ONLYOFFICE/fix/fix-history

Fix selecting revision
This commit is contained in:
Julia Radzhabova 2020-12-10 19:05:25 +03:00 committed by GitHub
commit fe4d219bf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,6 +139,12 @@ define([
Common.Gateway.requestHistoryData(rev); // получаем url-ы для ревизий
}, 10);
} else {
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
if (commentsController) {
commentsController.onApiHideComment();
commentsController.clearCollections();
}
var urlDiff = record.get('urlDiff'),
token = record.get('token'),
hist = new Asc.asc_CVersionHistory();
@ -152,11 +158,6 @@ define([
hist.asc_setServerVersion(this.currentServerVersion);
this.api.asc_showRevision(hist);
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
if (commentsController) {
commentsController.onApiHideComment();
commentsController.clearCollections();
}
var reviewController = this.getApplication().getController('Common.Controllers.ReviewChanges');
if (reviewController)
reviewController.onApiShowChange();
@ -175,6 +176,12 @@ define([
};
Common.UI.alert(config);
} else {
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
if (commentsController) {
commentsController.onApiHideComment();
commentsController.clearCollections();
}
var data = opts.data;
var historyStore = this.getApplication().getCollection('Common.Collections.HistoryVersions');
if (historyStore && data!==null) {
@ -210,11 +217,6 @@ define([
hist.asc_setServerVersion(this.currentServerVersion);
this.api.asc_showRevision(hist);
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
if (commentsController) {
commentsController.onApiHideComment();
commentsController.clearCollections();
}
var reviewController = this.getApplication().getController('Common.Controllers.ReviewChanges');
if (reviewController)
reviewController.onApiShowChange();