X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/61637cd5c0cb56fe9cbadd1066ba37d38604249e..f21a91b10cced1d0fd3be6b183bc64303e7f4f94:/modules/data/data.js?ds=sidebyside diff --git a/modules/data/data.js b/modules/data/data.js index e2cdbb1..108f2ea 100644 --- a/modules/data/data.js +++ b/modules/data/data.js @@ -6,6 +6,7 @@ return function(sandbox) { var doc = sandbox.getBootstrappedData().document; var document_id = sandbox.getBootstrappedData().document_id; + var document_version = sandbox.getBootstrappedData().version var history = sandbox.getBootstrappedData().history; @@ -113,14 +114,18 @@ return function(sandbox) { data: JSON.stringify(options), success: function(data) { doc = data.document; + document_version = data.version; reloadHistory(); - sandbox.publish('documentReverted', {document: data.document, version: data.version}); + sandbox.publish('documentReverted', data); }, }); } }, getDocumentId: function() { return document_id; + }, + getDocumentVersion: function() { + return document_version; } } };