diff --git a/app/assets/javascripts/autocomplete.js b/app/assets/javascripts/autocomplete.js index ee20bd969..efb540955 100644 --- a/app/assets/javascripts/autocomplete.js +++ b/app/assets/javascripts/autocomplete.js @@ -87,18 +87,8 @@ } Danbooru.Autocomplete.initialize_tag_autocomplete = function() { - var $fields_multiple = $( - "#tags,#post_tag_string,#upload_tag_string,#tag-script-field,#c-moderator-post-queues #query," + - "#user_blacklisted_tags,#user_favorite_tags,#search_post_tags_match" - ); - var $fields_single = $( - "#c-tags #search_name_matches,#c-tag-aliases #query,#c-tag-implications #query," + - "#wiki_page_title," + - "#tag_alias_request_antecedent_name,#tag_alias_request_consequent_name," + - "#tag_implication_request_antecedent_name,#tag_implication_request_consequent_name," + - "#tag_alias_antecedent_name,#tag_alias_consequent_name," + - "#tag_implication_antecedent_name,#tag_implication_consequent_name" - ); + var $fields_multiple = $('[data-autocomplete="tag-query"], [data-autocomplete="tag-edit"]'); + var $fields_single = $('[data-autocomplete="tag"]'); var prefixes = "-|~|general:|gen:|artist:|art:|copyright:|copy:|co:|character:|char:|ch:"; var metatags = "order|-status|status|-rating|rating|-locked|locked|child|filetype|-filetype|" + diff --git a/app/views/artist_commentaries/search.html.erb b/app/views/artist_commentaries/search.html.erb index 287441607..9d7b3a8d0 100644 --- a/app/views/artist_commentaries/search.html.erb +++ b/app/views/artist_commentaries/search.html.erb @@ -4,7 +4,7 @@ <%= simple_form_for(:search, url: artist_commentaries_path, method: :get, defaults: { required: false }) do |f| %> <%= f.input :text_matches, label: "Text" %> - <%= f.input :post_tags_match, label: "Tags" %> + <%= f.input :post_tags_match, label: "Tags", input_html: { data: { autocomplete: "tag-query" } } %> <%= f.input :original_present, label: "Original present?", collection: ["yes", "no"], include_blank: true %> <%= f.input :translated_present, label: "Translation present?", collection: ["yes", "no"], include_blank: true %> <%= f.submit "Search" %> diff --git a/app/views/comments/search.html.erb b/app/views/comments/search.html.erb index eab275a4e..7d0fb2c48 100644 --- a/app/views/comments/search.html.erb +++ b/app/views/comments/search.html.erb @@ -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]] %> diff --git a/app/views/meta_searches/tags.html.erb b/app/views/meta_searches/tags.html.erb index 3423ff1c8..bc227b4f6 100644 --- a/app/views/meta_searches/tags.html.erb +++ b/app/views/meta_searches/tags.html.erb @@ -4,7 +4,7 @@
<%= form_tag(meta_searches_tags_path, :method => :get) do %> - <%= text_field_tag "name", params[:name] %> + <%= text_field_tag "name", params[:name], :data => { :autocomplete => "tag" } %> <%= submit_tag "Go" %> <% end %>
@@ -126,4 +126,4 @@ <% content_for(:page_title) do %> MetaSearch - Tags - <%= Danbooru.config.app_name %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/moderator/bulk_reverts/new.html.erb b/app/views/moderator/bulk_reverts/new.html.erb index 2d87e13d0..f0b703187 100644 --- a/app/views/moderator/bulk_reverts/new.html.erb +++ b/app/views/moderator/bulk_reverts/new.html.erb @@ -22,13 +22,13 @@
- <%= text_field :constraints, :added_tags, :value => @constraints[:added_tags] %> + <%= text_field :constraints, :added_tags, :value => @constraints[:added_tags], :data => { :autocomplete => "tag" } %>

You must specify a user to add tags

- <%= text_field :constraints, :removed_tags, :value => @constraints[:removed_tags] %> + <%= text_field :constraints, :removed_tags, :value => @constraints[:removed_tags], :data => { :autocomplete => "tag" } %>

You must specify a user to add tags

@@ -96,4 +96,4 @@ }); }); <% end %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/moderator/post/queues/show.html.erb b/app/views/moderator/post/queues/show.html.erb index adecac0b7..d59893763 100644 --- a/app/views/moderator/post/queues/show.html.erb +++ b/app/views/moderator/post/queues/show.html.erb @@ -5,7 +5,7 @@