diff --git a/apps/common/main/lib/controller/History.js b/apps/common/main/lib/controller/History.js index 70ce86123..6be2b1405 100644 --- a/apps/common/main/lib/controller/History.js +++ b/apps/common/main/lib/controller/History.js @@ -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'); diff --git a/apps/common/main/lib/model/HistoryVersion.js b/apps/common/main/lib/model/HistoryVersion.js index 10fe1f9fe..4908e09b7 100644 --- a/apps/common/main/lib/model/HistoryVersion.js +++ b/apps/common/main/lib/model/HistoryVersion.js @@ -73,7 +73,8 @@ define([ isExpanded: true, isVisible: true, allowSelected: true, - selected: false + selected: false, + serverVersion: 0 } } }); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 076484751..87af50eb0 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -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')); }