X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/7e51aac084729ec15edc054e7c0bc3b07be05889..f8b3ddf413bc700b6c640a0da368b3a1a41c09cc:/modules/data.js diff --git a/modules/data.js b/modules/data.js index 36ba172..0fab1a7 100644 --- a/modules/data.js +++ b/modules/data.js @@ -1,4 +1,6 @@ -rng.modules.data = function(sandbox) { +define(function() { + +return function(sandbox) { var doc = sandbox.getBootstrappedData().document; var document_id = sandbox.getBootstrappedData().document_id; @@ -58,8 +60,15 @@ rng.modules.data = function(sandbox) { success: function() {sandbox.publish('savingEnded', 'success');}, error: function() {sandbox.publish('savingEnded', 'error');} }); + }, + fakeSave: function() { + sandbox.publish('savingStarted'); + window.setTimeout(function() { + sandbox.publish('savingEnded', 'success') + }, 2000); } } +}; -}; \ No newline at end of file +}); \ No newline at end of file