From 5be9480128b2841647b204ba19ec9f45dac438f5 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 7 Jul 2018 17:20:08 -0400 Subject: Added tag autocompletion refs #2 --- app/assets/javascripts/admin/records.coffee | 3 +++ app/assets/javascripts/application.js | 2 ++ 2 files changed, 5 insertions(+) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/admin/records.coffee b/app/assets/javascripts/admin/records.coffee index 7a11ce1..27cdb78 100644 --- a/app/assets/javascripts/admin/records.coffee +++ b/app/assets/javascripts/admin/records.coffee @@ -25,3 +25,6 @@ $(document).on "turbolinks:load", -> published_field_toggle($(this).prop("checked")) $("input[type=tags]").each -> tagsInput(this) + $(".tags-input input[type=text]").autocomplete({ + source: Routes.suggest_tags_path() + }) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index a81b3b2..58e8fb7 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -15,4 +15,6 @@ //= require turbolinks //= require ckeditor/init //= require tags-input +//= require jquery-ui +//= require js-routes //= require_tree ./admin -- cgit 1.4.1