From a6919c029590f1b93e156264b063f2a9bbcff8dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 7 Aug 2014 11:25:30 +0200 Subject: [PATCH 1/1] editor: Fix jumping to a different version of a document --- src/editor/modules/rng/rng.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/editor/modules/rng/rng.js b/src/editor/modules/rng/rng.js index e4731cc..e4f5c3e 100644 --- a/src/editor/modules/rng/rng.js +++ b/src/editor/modules/rng/rng.js @@ -203,7 +203,12 @@ return function(sandbox) { }, displayVersion: function(event) { /* globals window */ - window.open('/' + gettext('editor') + '/' + sandbox.getModule('data').getDocumentId() + '?version=' + event.version, _.uniqueId()); + var config = sandbox.getConfig(); + if(config.documentUrl) { + window.open(config.documentUrl(sandbox.getModule('data').getDocumentId(), event.version), _.uniqueId()); + } else { + logger.error('Unable to show version ' + event.version + ' of a document - config.documentUrl missing'); + } } }; -- 2.20.1