X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2936591f2732b8c8f23c4edffc0f1a7b30d4bcf0..195a1011a3ac43b5ff7cec4346b87e7453cee16a:/modules/data/data.js?ds=inline diff --git a/modules/data/data.js b/modules/data/data.js index 22c77fe..9b2b0cb 100644 --- a/modules/data/data.js +++ b/modules/data/data.js @@ -92,6 +92,16 @@ return function(sandbox) { }, getHistory: function() { return history; + }, + fetchDiff: function(ver1, ver2) { + $.ajax({ + method: 'get', + url: '/' + gettext('editor') + '/' + document_id + '/diff', + data: {from: ver1, to: ver2}, + success: function(data) { + sandbox.publish('diffFetched', {table: data, ver1: ver1, ver2: ver2}) + }, + }); } } };