From a4373cd0e6ce6c3b1c7ad31d9f12f1f87de028e5 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 23 Jan 2013 09:06:27 +0100 Subject: o Better look for tables showing some kind of details of an object. o Using smaller buttons for navigation so they don't change their container's size. --- src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js') diff --git a/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js b/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js index f59c107..ea8eed8 100755 --- a/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js +++ b/src/main/resources/webapp/apps/jenkinsApp/jenkinsApp.js @@ -13,7 +13,15 @@ function NavTabsService($location) { var onClick = function(tab) { currentTab = tab; - currentIndex = _.indexOf(tabs, tab); + var x = _.indexOf(tabs, tab); + if(x == -1) { + x = _.indexOf(keys, tab); + if(x == -1) { + throw "Unknown tab: " + tab; + } + } + + currentIndex = x; $location.search(name, keys[currentIndex]); }; -- cgit v1.2.3