X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4ae1d665fcd3af9fb06d664418f02f365933d9ae..f8b3ddf413bc700b6c640a0da368b3a1a41c09cc:/modules/data.js diff --git a/modules/data.js b/modules/data.js index 7a59cfb..0fab1a7 100644 --- a/modules/data.js +++ b/modules/data.js @@ -1,12 +1,13 @@ -rng.modules.data = function(sandbox) { +define(function() { + +return function(sandbox) { var doc = sandbox.getBootstrappedData().document; var document_id = sandbox.getBootstrappedData().document_id; if(doc === '') { - doc = '\n\ - '; } @@ -60,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