Issue 2711 - select the first search tab on search
parent
992f793f76
commit
6c9c6475d6
|
@ -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: []}
|
||||
|
|
Loading…
Reference in New Issue