Fixin fucking suggest
This commit is contained in:
parent
63a567f7ce
commit
190e19a7f1
|
@ -4,7 +4,6 @@ class window.Search
|
|||
$('#search').attr(disabled: 'disabled').blur()
|
||||
$('#autocomplete-container').hide()
|
||||
$('#artist-load-spinner').show()
|
||||
this.hideSuggestions()
|
||||
false
|
||||
|
||||
hideSpinner: ->
|
||||
|
@ -42,24 +41,9 @@ class window.Search
|
|||
_search.hideSpinner()
|
||||
alert "Not found"
|
||||
false
|
||||
|
||||
showSuggestions: (values) ->
|
||||
for item in values
|
||||
$('.suggestions ul').append '
|
||||
<li>
|
||||
<a class="data artist">' +item.name+ '</a>
|
||||
' +(if item.desc? then '<br/><span>'+item.desc+'</span>' else '')+ '
|
||||
</li>'
|
||||
$('.suggestions').show()
|
||||
false
|
||||
|
||||
hideSuggestions: ->
|
||||
$('.suggestions ul li').remove()
|
||||
$('.suggestions').hide()
|
||||
false
|
||||
|
||||
$('#search-form').live 'submit', ->
|
||||
$('#autocomplete-container').remove()
|
||||
$('#autocomplete-container').hide()
|
||||
_search.loadArtistData $('#search').val()
|
||||
false
|
||||
$('.data.artist').live 'click', ->
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
#search-form {
|
||||
height: 28px !important;
|
||||
}
|
||||
|
||||
#artist-load-spinner {
|
||||
display: none;
|
||||
float: right;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%ul.suggestions
|
||||
- @suggestions.each do |artist|
|
||||
%li
|
||||
%a.data.artist= artist[:name]
|
||||
%a.data.artist= artist[:sort_name]
|
||||
(
|
||||
= artist[:type]
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue