X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/9d74ca302ea182d336853aa2578cc455c32556be..c66ddb7dbe763b261c7dd4a037239a667f60cd95:/modules/rng/rng.js diff --git a/modules/rng/rng.js b/modules/rng/rng.js index 992d601..9abe00c 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -108,7 +108,7 @@ return function(sandbox) { ready: function() { views.mainLayout.setView('mainView', views.mainTabs.getAsView()); - _.each(['sourceEditor', 'documentCanvas', 'documentToolbar', 'nodePane', 'metadataEditor', 'nodeFamilyTree', 'nodeBreadCrumbs', 'mainBar', 'indicator'], function(moduleName) { + _.each(['sourceEditor', 'documentCanvas', 'documentToolbar', 'nodePane', 'metadataEditor', 'nodeFamilyTree', 'nodeBreadCrumbs', 'mainBar', 'indicator', 'documentHistory'], function(moduleName) { sandbox.getModule(moduleName).start(); }); }, @@ -130,6 +130,9 @@ return function(sandbox) { savingEnded: function(status) { sandbox.getModule('mainBar').setCommandEnabled('save', true); sandbox.getModule('indicator').clearMessage(); + }, + historyItemAdded: function(item) { + sandbox.getModule('documentHistory').addHistory([item], {animate: true}); } } @@ -246,6 +249,13 @@ return function(sandbox) { } } + eventHandlers.documentHistory = { + ready: function() { + sandbox.getModule('documentHistory').addHistory(sandbox.getModule('data').getHistory()); + addMainTab('Historia', 'history', sandbox.getModule('documentHistory').getView()); + } + } + /* api */ return {