Sha256: 3593010eb23f18ff92a17ff0bddfcd8c6223369d24a21d39a7762ff833c10cd1

Contents?: true

Size: 467 Bytes

Versions: 25

Compression:

Stored size: 467 Bytes

Contents

$ ->
 $('.ui-autocomplete-input').each ->
  element = $(this)
  target = $(this).attr('data-source-url')

  element.autocomplete
    source: target
    minLength: 2
    html: true
    open: (event, ui) ->
      $('.ui-autocomplete').css 'z-index', 1000
      return
    create: ->
      $(this).data('ui-autocomplete')._renderItem = (ul, item) ->
        $("<li>").append("<span>" + item.title + "<br><small>" + item.subtitle + "</small></span>").appendTo ul
  return

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
itsf_backend-1.1.7 app/assets/javascripts/itsf/backend/application/ui_autocomplete.js.coffee
itsf_backend-1.1.6 app/assets/javascripts/itsf/backend/application/ui_autocomplete.js.coffee
itsf_backend-1.1.5 app/assets/javascripts/itsf/backend/application/ui_autocomplete.js.coffee
itsf_backend-1.1.4 app/assets/javascripts/itsf/backend/application/ui_autocomplete.js.coffee
itsf_backend-1.1.3 app/assets/javascripts/itsf/backend/application/ui_autocomplete.js.coffee