X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/cf7d465ce6ed2acbc2b1c028e46847ead5320e9c..87cdc842b0f5f80d78ecb3cbbc3ce5c6ed6a7e62:/modules/rng.js diff --git a/modules/rng.js b/modules/rng.js index 6ea6f40..36bd2f8 100644 --- a/modules/rng.js +++ b/modules/rng.js @@ -50,7 +50,7 @@ rng.modules.rng = function(sandbox) { eventHandlers.sourceEditor = { ready: function() { - addTab('Source', 'source', sandbox.getModule('sourceEditor').getView()); + addTab(gettext('Source'), 'source', sandbox.getModule('sourceEditor').getView()); sandbox.getModule('sourceEditor').setDocument(sandbox.getModule('data').getDocument()); } }; @@ -58,7 +58,7 @@ rng.modules.rng = function(sandbox) { eventHandlers.visualEditor = { ready: function() { sandbox.getModule('visualEditor').setDocument(sandbox.getModule('data').getDocument()); - addTab('Visual', 'visual', sandbox.getModule('visualEditor').getView()); + addTab(gettext('Visual'), 'visual', sandbox.getModule('visualEditor').getView()); } }; @@ -70,6 +70,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(); } }