Some code improvements suggested by linter
[fnpeditor.git] / modules / diffViewer / diffViewer.js
index 254a19a..12e022a 100644 (file)
@@ -14,11 +14,12 @@ return function(sandbox) {
     dom.append(tabsView.getAsView());\r
     \r
     var DiffView = function() {\r
-        this.dom = $(diffTemplateSrc)\r
-    }\r
+        this.dom = $(diffTemplateSrc);\r
+    };\r
+    \r
     DiffView.prototype.setTable = function(table) {\r
         this.dom.append(table);\r
-    }\r
+    };\r
     \r
 \r
     return {\r
@@ -27,7 +28,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