diffViewer: selecting tab with the latest requested diff
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 14 Jun 2013 10:54:20 +0000 (12:54 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 14 Jun 2013 10:54:20 +0000 (12:54 +0200)
modules/diffViewer/diffViewer.js

index 254a19a..ba88a48 100644 (file)
@@ -27,7 +27,9 @@ return function(sandbox) {
         setDiff: function(diff) {\r
             var diffView = new DiffView();\r
             diffView.setTable(diff.table);\r
-            tabsView.addTab(diff.ver1 + '->' + diff.ver2, diff.ver1 + '-' + diff.ver2, diffView.dom);\r
+            var slug = diff.ver1 + '-' + diff.ver2;\r
+            tabsView.addTab(diff.ver1 + '->' + diff.ver2, slug, diffView.dom);\r
+            tabsView.selectTab(slug);\r
         }\r
     };\r
 };\r