integration wip: removing unused code
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 22 Nov 2013 10:47:58 +0000 (11:47 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 2 Dec 2013 13:50:53 +0000 (14:50 +0100)
src/editor/modules/rng/rng.js

index 3621050..b1e091c 100644 (file)
@@ -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...'));