X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4ae1d665fcd3af9fb06d664418f02f365933d9ae..64bdf1aaa07bd683a71241e18e6e26200a481bab:/modules/data.js?ds=inline 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