[DE] Set serverVersion parameter to version history items.

This commit is contained in:
Julia Radzhabova 2017-09-22 17:18:06 +03:00
parent 44eedf543d
commit 52b56fa997
3 changed files with 10 additions and 3 deletions

View file

@ -58,6 +58,7 @@ define([
this.currentDocId = '';
this.currentDocIdPrev = '';
this.currentRev = 0;
this.currentServerVersion = 0;
},
events: {
@ -130,6 +131,7 @@ define([
this.currentDocId = record.get('docId');
this.currentDocIdPrev = record.get('docIdPrev');
this.currentRev = rev;
this.currentServerVersion = record.get('serverVersion');
if ( _.isEmpty(url) || (urlGetTime - record.get('urlGetTime') > 5 * 60000)) {
_.delay(function() {
@ -146,6 +148,7 @@ define([
hist.asc_setArrColors(this.currentArrColors);
hist.asc_setToken(token);
hist.asc_setIsRequested(false);
hist.asc_setServerVersion(this.currentServerVersion);
this.api.asc_showRevision(hist);
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
@ -196,6 +199,7 @@ define([
hist.asc_setArrColors(this.currentArrColors);
hist.asc_setToken(token);
hist.asc_setIsRequested(true);
hist.asc_setServerVersion(this.currentServerVersion);
this.api.asc_showRevision(hist);
var commentsController = this.getApplication().getController('Common.Controllers.Comments');

View file

@ -73,7 +73,8 @@ define([
isExpanded: true,
isVisible: true,
allowSelected: true,
selected: false
selected: false,
serverVersion: 0
}
}
});

View file

@ -442,7 +442,8 @@ define([
markedAsVersion: (group!==version.versionGroup),
selected: (opts.data.currentVersion == version.version),
canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1),
isExpanded: true
isExpanded: true,
serverVersion: version.serverVersion
}));
if (opts.data.currentVersion == version.version) {
currentVersion = arrVersions[arrVersions.length-1];
@ -491,7 +492,8 @@ define([
selected: false,
canRestore: this.appOptions.canHistoryRestore,
isRevision: false,
isVisible: true
isVisible: true,
serverVersion: version.serverVersion
}));
arrColors.push(user.get('colorval'));
}