Skip to content
Snippets Groups Projects
Commit 675ad2f3 authored by Alfredo Sumaran's avatar Alfredo Sumaran
Browse files

Better wording

parent 4f2f3b8f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -84,14 +84,14 @@ class @SearchAutocomplete
if event.keyCode is @keyCode.ENTER
@goToResult(ui.item)
else
# Pressing tab sets the scope
if event.keyCode is @keyCode.TAB and ui.item.scope?
# Pressing tab sets the location
if event.keyCode is @keyCode.TAB and ui.item.location?
@setLocationBadge(ui.item)
@searchInput
.val('') # remove selected value from input
.focus()
else
# If option is not a scope go to page
# If option is not a location go to page
@goToResult(ui.item)
 
# Return false to avoid focus on the next element
Loading
Loading
@@ -153,7 +153,7 @@ class @SearchAutocomplete
# Reset input states
@resetSearchState()
 
switch item.scope
switch item.location
when 'projects'
@projectInputEl.val(item.id)
# @searchCodeInputEl.val('true') # TODO: always true for projects?
Loading
Loading
Loading
Loading
@@ -72,7 +72,7 @@ module SearchHelper
current_user.authorized_groups.search(term).limit(limit).map do |group|
{
category: "Groups",
scope: "groups",
location: "groups",
id: group.id,
label: "#{search_result_sanitize(group.name)}",
url: group_path(group)
Loading
Loading
@@ -86,7 +86,7 @@ module SearchHelper
sorted_by_stars.non_archived.limit(limit).map do |p|
{
category: "Projects",
scope: "projects",
location: "projects",
id: p.id,
value: "#{search_result_sanitize(p.name)}",
label: "#{search_result_sanitize(p.name_with_namespace)}",
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment