- 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');
- }
+ //window.open(sandbox.getConfig().documentPreviewUrl(revision), _.uniqueId());
+ window.open(sandbox.getConfig().documentPreviewUrl(revision), 'preview');
+ },
+ publishVersion: function(version) {
+ sandbox.getModule('data').publishVersion(version);