From: Aleksander Ɓukasz Date: Fri, 14 Jun 2013 10:54:20 +0000 (+0200) Subject: diffViewer: selecting tab with the latest requested diff X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/195a1011a3ac43b5ff7cec4346b87e7453cee16a diffViewer: selecting tab with the latest requested diff --- diff --git a/modules/diffViewer/diffViewer.js b/modules/diffViewer/diffViewer.js index 254a19a..ba88a48 100644 --- a/modules/diffViewer/diffViewer.js +++ b/modules/diffViewer/diffViewer.js @@ -27,7 +27,9 @@ return function(sandbox) { setDiff: function(diff) { var diffView = new DiffView(); diffView.setTable(diff.table); - tabsView.addTab(diff.ver1 + '->' + diff.ver2, diff.ver1 + '-' + diff.ver2, diffView.dom); + var slug = diff.ver1 + '-' + diff.ver2; + tabsView.addTab(diff.ver1 + '->' + diff.ver2, slug, diffView.dom); + tabsView.selectTab(slug); } }; };