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