Commit 30eeb453 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Remove unused instance variable

parent c3773584
......@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment