X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a892115bc1f94bfd53873dd442854b5ebe3fd03c..a6919c029590f1b93e156264b063f2a9bbcff8dc:/src/editor/modules/rng/rng.js 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'); + } } };