X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/61637cd5c0cb56fe9cbadd1066ba37d38604249e..fc38c8a4517c3733dc5e47bc25f5c1ac85a0afc6:/modules/rng/rng.js diff --git a/modules/rng/rng.js b/modules/rng/rng.js index 3b41394..c83228b 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -96,7 +96,7 @@ return function(sandbox) { views.visualEditing.setView('rightColumn', views.visualEditingSidebar.getAsView()); addMainTab('Edytor', 'editor', views.visualEditing.getAsView()); - + addMainTab(gettext('Source'), 'sourceEditor', ''); addMainTab('Historia', 'history', views.diffLayout.getAsView()); sandbox.getDOM().append(views.mainLayout.getAsView()); @@ -158,12 +158,14 @@ return function(sandbox) { documentReverted: function(event) { commands.resetDocument(event.document, 'revert'); sandbox.getModule('mainBar').setCommandEnabled('save', true); - sandbox.getModule('indicator').clearMessage({message:'Wersja ' + event.version + ' przywrócona'}); + sandbox.getModule('indicator').clearMessage({message:'Wersja ' + event.reverted_version + ' przywrócona'}); + sandbox.getModule('mainBar').setVersion(event.current_version); } } eventHandlers.mainBar = { ready: function() { + sandbox.getModule('mainBar').setVersion(sandbox.getModule('data').getDocumentVersion()); views.mainLayout.setView('topPanel', sandbox.getModule('mainBar').getView()); }, 'cmd.save': function() {