editor: minor refactoring
[fnpeditor.git] / src / editor / modules / rng / rng.js
index ff23c9d..4e7ff0c 100644 (file)
@@ -42,6 +42,7 @@ return function(sandbox) {
             sandbox.getModule('nodePane').setNodeElement(nodeElement);
             sandbox.getModule('nodeFamilyTree').setElement(nodeElement);
             sandbox.getModule('nodeBreadCrumbs').setNodeElement(nodeElement);
             sandbox.getModule('nodePane').setNodeElement(nodeElement);
             sandbox.getModule('nodeFamilyTree').setElement(nodeElement);
             sandbox.getModule('nodeBreadCrumbs').setNodeElement(nodeElement);
+            sandbox.getModule('documentToolbar').setNodeElement(nodeElement);
         },
         updateCurrentTextElement: function(textElement) {
             sandbox.getModule('nodeFamilyTree').setElement(textElement);
         },
         updateCurrentTextElement: function(textElement) {
             sandbox.getModule('nodeFamilyTree').setElement(textElement);
@@ -107,10 +108,10 @@ return function(sandbox) {
         diffFetched: function(diff) {
             sandbox.getModule('diffViewer').setDiff(diff);
         },
         diffFetched: function(diff) {
             sandbox.getModule('diffViewer').setDiff(diff);
         },
-        documentReverted: function(event) {
+        documentReverted: function(version) {
             sandbox.getModule('mainBar').setCommandEnabled('save', true);
             sandbox.getModule('mainBar').setCommandEnabled('save', true);
-            sandbox.getModule('indicator').clearMessage({message:'Wersja ' + event.reverted_version + ' przywrócona'});
-            sandbox.getModule('mainBar').setVersion(event.current_version);
+            sandbox.getModule('indicator').clearMessage({message:'Wersja ' + version + ' przywrócona'});
+            sandbox.getModule('mainBar').setVersion(version);
         }
     };
     
         }
     };
     
@@ -223,8 +224,8 @@ return function(sandbox) {
         compare: function(ver1, ver2) {
             sandbox.getModule('data').fetchDiff(ver1, ver2);
         },
         compare: function(ver1, ver2) {
             sandbox.getModule('data').fetchDiff(ver1, ver2);
         },
-        restoreVersion: function(event) {
-            sandbox.getModule('data').restoreVersion(event);
+        restoreVersion: function(version) {
+            sandbox.getModule('data').restoreVersion(version);
         },
         displayVersion: function(event) {
             /* globals window */
         },
         displayVersion: function(event) {
             /* globals window */