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