X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/d003018e2fe4d6ccb51151b755cdc337672d9bf0..5b8c5ec57dcfd98cf14f98b54f84e6bb55dec23d:/src/editor/modules/rng/rng.js diff --git a/src/editor/modules/rng/rng.js b/src/editor/modules/rng/rng.js index b1e091c..bc4ea7f 100644 --- a/src/editor/modules/rng/rng.js +++ b/src/editor/modules/rng/rng.js @@ -45,15 +45,6 @@ return function(sandbox) { }, updateCurrentTextElement: function(textElement) { sandbox.getModule('nodeFamilyTree').setElement(textElement); - }, - resetDocument: function(document, reason) { - var modules = []; - if (reason === 'revert') { - modules = ['documentCanvas', 'metadataEditor', 'sourceEditor']; - } - modules.forEach(function(moduleName) { - sandbox.getModule(moduleName).setDocument(document); - }); } }; @@ -116,7 +107,6 @@ return function(sandbox) { sandbox.getModule('diffViewer').setDiff(diff); }, documentReverted: function(event) { - commands.resetDocument(event.document, 'revert'); sandbox.getModule('mainBar').setCommandEnabled('save', true); sandbox.getModule('indicator').clearMessage({message:'Wersja ' + event.reverted_version + ' przywrócona'}); sandbox.getModule('mainBar').setVersion(event.current_version); @@ -236,6 +226,7 @@ return function(sandbox) { sandbox.getModule('data').restoreVersion(event); }, displayVersion: function(event) { + /* globals window */ window.open('/' + gettext('editor') + '/' + sandbox.getModule('data').getDocumentId() + '?version=' + event.version, _.uniqueId()); } };