Issue 2711 - select the first search tab on search

stable
Juanfran 2015-06-05 08:14:14 +02:00
parent 992f793f76
commit 6c9c6475d6
1 changed files with 9 additions and 6 deletions

View File

@ -164,12 +164,15 @@ SearchDirective = ($log, $compile, $templatecache, $routeparams, $location) ->
selectedSectionName = null
selectedSectionData = null
for name, value of data
continue if name == "count"
if value.length > maxVal
maxVal = value.length
selectedSectionName = name
selectedSectionData = value
if data
for name in ["userstories", "issues", "tasks", "wikipages"]
value = data[name]
if value.length > maxVal
maxVal = value.length
selectedSectionName = name
selectedSectionData = value
break;
if maxVal == 0
return {name: "userstories", value: []}