views.visualEditing.setView('leftColumn', sandbox.getModule('documentCanvas').getView());
},
- nodeHovered: function(canvasNode) {
- commands.highlightDocumentNode(canvasNode);
- },
-
- nodeBlured: function(canvasNode) {
- commands.dimDocumentNode(canvasNode);
- },
-
selectionChanged: function(selection) {
commands.refreshCanvasSelection(selection);
}
},
displayVersion: function(event) {
/* globals window */
- window.open('/' + gettext('editor') + '/' + sandbox.getModule('data').getDocumentId() + '?version=' + event.version, _.uniqueId());
+ var config = sandbox.getConfig(),
+ doc = sandbox.getModule('data').getDocument();
+
+ if(config.documentUrl) {
+ window.open(config.documentUrl(doc.properties.document_id, event.version), _.uniqueId());
+ } else {
+ logger.error('Unable to show version ' + event.version + ' of a document - config.documentUrl missing');
+ }
}
};