[DE] Set serverVersion parameter to version history items.
This commit is contained in:
parent
44eedf543d
commit
52b56fa997
|
@ -58,6 +58,7 @@ define([
|
||||||
this.currentDocId = '';
|
this.currentDocId = '';
|
||||||
this.currentDocIdPrev = '';
|
this.currentDocIdPrev = '';
|
||||||
this.currentRev = 0;
|
this.currentRev = 0;
|
||||||
|
this.currentServerVersion = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
|
@ -130,6 +131,7 @@ define([
|
||||||
this.currentDocId = record.get('docId');
|
this.currentDocId = record.get('docId');
|
||||||
this.currentDocIdPrev = record.get('docIdPrev');
|
this.currentDocIdPrev = record.get('docIdPrev');
|
||||||
this.currentRev = rev;
|
this.currentRev = rev;
|
||||||
|
this.currentServerVersion = record.get('serverVersion');
|
||||||
|
|
||||||
if ( _.isEmpty(url) || (urlGetTime - record.get('urlGetTime') > 5 * 60000)) {
|
if ( _.isEmpty(url) || (urlGetTime - record.get('urlGetTime') > 5 * 60000)) {
|
||||||
_.delay(function() {
|
_.delay(function() {
|
||||||
|
@ -146,6 +148,7 @@ define([
|
||||||
hist.asc_setArrColors(this.currentArrColors);
|
hist.asc_setArrColors(this.currentArrColors);
|
||||||
hist.asc_setToken(token);
|
hist.asc_setToken(token);
|
||||||
hist.asc_setIsRequested(false);
|
hist.asc_setIsRequested(false);
|
||||||
|
hist.asc_setServerVersion(this.currentServerVersion);
|
||||||
this.api.asc_showRevision(hist);
|
this.api.asc_showRevision(hist);
|
||||||
|
|
||||||
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
||||||
|
@ -196,6 +199,7 @@ define([
|
||||||
hist.asc_setArrColors(this.currentArrColors);
|
hist.asc_setArrColors(this.currentArrColors);
|
||||||
hist.asc_setToken(token);
|
hist.asc_setToken(token);
|
||||||
hist.asc_setIsRequested(true);
|
hist.asc_setIsRequested(true);
|
||||||
|
hist.asc_setServerVersion(this.currentServerVersion);
|
||||||
this.api.asc_showRevision(hist);
|
this.api.asc_showRevision(hist);
|
||||||
|
|
||||||
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
var commentsController = this.getApplication().getController('Common.Controllers.Comments');
|
||||||
|
|
|
@ -73,7 +73,8 @@ define([
|
||||||
isExpanded: true,
|
isExpanded: true,
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
allowSelected: true,
|
allowSelected: true,
|
||||||
selected: false
|
selected: false,
|
||||||
|
serverVersion: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -442,7 +442,8 @@ define([
|
||||||
markedAsVersion: (group!==version.versionGroup),
|
markedAsVersion: (group!==version.versionGroup),
|
||||||
selected: (opts.data.currentVersion == version.version),
|
selected: (opts.data.currentVersion == version.version),
|
||||||
canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1),
|
canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1),
|
||||||
isExpanded: true
|
isExpanded: true,
|
||||||
|
serverVersion: version.serverVersion
|
||||||
}));
|
}));
|
||||||
if (opts.data.currentVersion == version.version) {
|
if (opts.data.currentVersion == version.version) {
|
||||||
currentVersion = arrVersions[arrVersions.length-1];
|
currentVersion = arrVersions[arrVersions.length-1];
|
||||||
|
@ -491,7 +492,8 @@ define([
|
||||||
selected: false,
|
selected: false,
|
||||||
canRestore: this.appOptions.canHistoryRestore,
|
canRestore: this.appOptions.canHistoryRestore,
|
||||||
isRevision: false,
|
isRevision: false,
|
||||||
isVisible: true
|
isVisible: true,
|
||||||
|
serverVersion: version.serverVersion
|
||||||
}));
|
}));
|
||||||
arrColors.push(user.get('colorval'));
|
arrColors.push(user.get('colorval'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue