Merge pull request #620 from ONLYOFFICE/fix/fix-history
Fix selecting revision
This commit is contained in:
commit
fe4d219bf9
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue