app/assets/javascripts/itsf/backend/application/ui_autocomplete.js.coffee in itsf_backend-2.2.1 vs app/assets/javascripts/itsf/backend/application/ui_autocomplete.js.coffee in itsf_backend-3.0.0
- old
+ new
@@ -1,16 +1,16 @@
-$ ->
- $('.ui-autocomplete-input').each ->
- element = $(this)
- target = $(this).attr('data-source-url')
+$(document).on 'turbolinks:load', ->
+ $('.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
+ 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
\ No newline at end of file