From: Aleksander Ɓukasz Date: Fri, 22 Nov 2013 10:47:58 +0000 (+0100) Subject: integration wip: removing unused code X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/d003018e2fe4d6ccb51151b755cdc337672d9bf0?ds=sidebyside;hp=0990bc1dc7fad5165148a8993901138de9e22d0e integration wip: removing unused code --- 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...'));