From d003018e2fe4d6ccb51151b755cdc337672d9bf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 22 Nov 2013 11:47:58 +0100 Subject: [PATCH] integration wip: removing unused code --- src/editor/modules/rng/rng.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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...')); -- 2.20.1