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.
12 lines
424 B
Plaintext
12 lines
424 B
Plaintext
<div id="quick-edit-div" style="display: none;">
|
|
<h1>Edit</h1>
|
|
|
|
<%= form_tag("/posts", :class => "simple_form", :method => :put, :id => "quick-edit-form") do %>
|
|
<div class="input">
|
|
<%= text_area_tag "post[tag_string]", "", :data => { :autocomplete => "tag-edit" } %>
|
|
<%= submit_tag "Submit", :data => { :disable_with => "Submitting..." } %>
|
|
<%= submit_tag "Cancel" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|