history wip: Updating history list after saving document
[fnpeditor.git] / modules / rng / rng.js
index 3f89cd7..fe666e0 100644 (file)
@@ -130,6 +130,9 @@ return function(sandbox) {
         savingEnded: function(status) {\r
             sandbox.getModule('mainBar').setCommandEnabled('save', true);\r
             sandbox.getModule('indicator').clearMessage();\r
+        },\r
+        historyItemAdded: function(item) {\r
+            sandbox.getModule('documentHistory').addHistory([item]);\r
         }\r
     }\r
     \r
@@ -248,7 +251,7 @@ return function(sandbox) {
     \r
     eventHandlers.documentHistory = {\r
         ready: function() {\r
-            sandbox.getModule('documentHistory').setHistory(sandbox.getModule('data').getHistory());\r
+            sandbox.getModule('documentHistory').addHistory(sandbox.getModule('data').getHistory());\r
             addMainTab('Historia', 'history', sandbox.getModule('documentHistory').getView());\r
         }\r
     }\r