summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-03-23 16:13:46 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-03-23 16:13:46 -0500
commit30eeb453bd4ed0d710ae74a8bf5b8c8a48a2f96b (patch)
treee078af6f1ee44114dec512e155b5e85d824c471f
parentc37735841b096eec5935e5c5ccb6d3d8b4f8234a (diff)
downloadgitlab-ce-30eeb453bd4ed0d710ae74a8bf5b8c8a48a2f96b.tar.gz
Remove unused instance variable
-rw-r--r--app/assets/javascripts/search_autocomplete.js.coffee17
1 files changed, 3 insertions, 14 deletions
diff --git a/app/assets/javascripts/search_autocomplete.js.coffee b/app/assets/javascripts/search_autocomplete.js.coffee
index 4aa658735de..a7130c5796e 100644
--- a/app/assets/javascripts/search_autocomplete.js.coffee
+++ b/app/assets/javascripts/search_autocomplete.js.coffee
@@ -35,7 +35,6 @@ class @SearchAutocomplete
@createAutocomplete()
@searchInput.addClass('disabled')
- @autocomplete = false
@bindEvents()
@@ -60,10 +59,6 @@ class @SearchAutocomplete
getData: (term, callback) ->
_this = @
- # Ensure this is not called when autocomplete is disabled because
- # this method still will be called because `GitLabDropdownFilter` is triggering this on keyup
- return if @autocomplete is false
-
# Do not trigger request if input is empty
return if @searchInput.val() is ''
@@ -118,15 +113,12 @@ class @SearchAutocomplete
@clearInput.on 'click', @onRemoveLocationClick
enableAutocomplete: ->
- return if @autocomplete
-
dropdownMenu = @dropdown.find('.dropdown-menu')
_this = @
@loadingSuggestions = false
@dropdown.addClass('open')
@searchInput.removeClass('disabled')
- @autocomplete = true
onDropdownOpen: (e) =>
@dropdown.dropdown('toggle')
@@ -239,12 +231,9 @@ class @SearchAutocomplete
@wrap.removeClass('has-location-badge')
disableAutocomplete: ->
- if @autocomplete
- @searchInput.addClass('disabled')
- @dropdown.removeClass('open')
- @restoreMenu()
-
- @autocomplete = false
+ @searchInput.addClass('disabled')
+ @dropdown.removeClass('open')
+ @restoreMenu()
restoreMenu: ->
html = "<ul>