X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2e961758137b3843f0cc38fe2f66f30979794c33..a15440ff7162c8cc0731e260cf4cacab5b998c62:/modules/rng.js diff --git a/modules/rng.js b/modules/rng.js index 0a39ed8..ffb228d 100644 --- a/modules/rng.js +++ b/modules/rng.js @@ -1,4 +1,6 @@ -rng.modules.rng = function(sandbox) { +define(function() { + +return function(sandbox) { function addTab(title, slug, view) { sandbox.getModule('tabsManager').addTab(title, slug, view); @@ -70,6 +72,14 @@ rng.modules.rng = function(sandbox) { documentChanged: function(document, reason) { var slug = (reason === 'visual_edit' ? 'source' : 'visual'); sandbox.getModule(slug+'Editor').setDocument(document); + }, + savingStarted: function() { + sandbox.getModule('skelton').deactivateCommand('save'); + sandbox.getModule('skelton').showMessage(gettext('Saving...')); + }, + savingEnded: function(status) { + sandbox.getModule('skelton').activateCommand('save'); + sandbox.getModule('skelton').clearMessage(); } } @@ -86,4 +96,6 @@ rng.modules.rng = function(sandbox) { } } } -}; \ No newline at end of file +}; + +}); \ No newline at end of file