Fix broken tag autocomplete on multiple pages.
Mark all tag <input>s with a `data-autocomplete` attribute, instead of
hardcoding a list of html IDs to autocomplete in javascript.
This way should be less error prone. It fixes autocomplete in several places:
* Autocomplete for the search box on /posts didn't work in the
responsive layout. This was because /posts has two search boxes that
both have the id `tags`: one in the normal sidebar, and one in the
responsive tag list. $("#tags") only initialized autocomplete on the
first one.
* Autocomplete didn't work on the aliases or implications pages. This
was due to selecting the wrong html ids.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<%= hidden_field_tag "group_by", "comment", :id => "group_by_full" %>
|
||||
<%= f.input :creator_name, label: "Commenter" %>
|
||||
<%= f.input :body_matches, label: "Body" %>
|
||||
<%= f.input :post_tags_match, label: "Tags" %>
|
||||
<%= f.input :post_tags_match, label: "Tags", input_html: { data: { autocomplete: "tag-query" } } %>
|
||||
<%= f.input :is_deleted, label: "Deleted?", collection: [["Yes", true], ["No", false]] %>
|
||||
<%= f.input :is_sticky, label: "Sticky?", collection: [["Yes", true], ["No", false]] %>
|
||||
<%= f.input :do_not_bump_post, label: "Bumping?", collection: [["Yes", false], ["No", true]] %>
|
||||
|
||||
Reference in New Issue
Block a user