diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-03-27 13:27:49 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-03-27 13:27:49 -0500 |
commit | d681623c716360282c27e3a9762d5f7e634c666b (patch) | |
tree | 9511b8efc03d03162fa5f302c3a648059e69abe3 | |
parent | c1e7351b4afde5f0cb7e92592c9109da301f4c17 (diff) | |
download | gitlab-ce-d681623c716360282c27e3a9762d5f7e634c666b.tar.gz |
Add option to submit the typed query
-rw-r--r-- | app/assets/javascripts/search_autocomplete.js.coffee | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/search_autocomplete.js.coffee b/app/assets/javascripts/search_autocomplete.js.coffee index ff81a39146a..e873a3d2570 100644 --- a/app/assets/javascripts/search_autocomplete.js.coffee +++ b/app/assets/javascripts/search_autocomplete.js.coffee @@ -100,6 +100,16 @@ class @SearchAutocomplete text: suggestion.label url: suggestion.url + # Add option to proceed with the search + if data.length + data.push('separator') + data.push + text: "Result name contains \"#{term}\"" + url: "/search?\ + search=#{term}\ + &project_id=#{_this.projectInputEl.val()}\ + &group_id=#{_this.groupInputEl.val()}" + callback(data) ).always -> _this.loadingSuggestions = false |