X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/0990bc1dc7fad5165148a8993901138de9e22d0e..d003018e2fe4d6ccb51151b755cdc337672d9bf0:/src/editor/modules/rng/rng.js diff --git a/src/editor/modules/rng/rng.js b/src/editor/modules/rng/rng.js index 3621050..b1e091c 100644 --- a/src/editor/modules/rng/rng.js +++ b/src/editor/modules/rng/rng.js @@ -48,16 +48,9 @@ return function(sandbox) { }, resetDocument: function(document, reason) { var modules = []; - if(reason === 'source_edit') { - modules = ['documentCanvas', 'metadataEditor']; - } - else if (reason === 'edit') { - modules = ['sourceEditor']; - } - else if (reason === 'revert') { + if (reason === 'revert') { modules = ['documentCanvas', 'metadataEditor', 'sourceEditor']; } - modules.forEach(function(moduleName) { sandbox.getModule(moduleName).setDocument(document); }); @@ -103,9 +96,6 @@ return function(sandbox) { sandbox.getModule(moduleName).start(); }); }, - documentChanged: function(document, reason) { - commands.resetDocument(document, reason); - }, savingStarted: function() { sandbox.getModule('mainBar').setCommandEnabled('save', false); sandbox.getModule('indicator').showMessage(gettext('Saving...'));