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 @@
@@ -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 @@
<%= form_tag(moderator_post_queue_path, :method => :get) do %>
- <%= text_field_tag "query", params[:query], :size => 40 %>
+ <%= text_field_tag "query", params[:query], :size => 40, :data => { :autocomplete => "tag-query" } %>
<%= select_tag "per_page", options_for_select(%w(25 50 100 200), cookies["mq_per_page"])%>
<%= submit_tag "Search" %>
<% end %>
diff --git a/app/views/moderator/tags/edit.html.erb b/app/views/moderator/tags/edit.html.erb
index 8af898554..02131d819 100644
--- a/app/views/moderator/tags/edit.html.erb
+++ b/app/views/moderator/tags/edit.html.erb
@@ -5,12 +5,12 @@
<%= form_tag(moderator_tag_path, :method => :put, :class => "simple_form") do %>
Antecedent
- <%= text_field :tag, :antecedent, :value => params[:antecedent] %>
+ <%= text_field :tag, :antecedent, :value => params[:antecedent], :data => { :autocomplete => "tag-query" } %>
Consequent
- <%= text_field :tag, :consequent, :value => params[:consequent] %>
+ <%= text_field :tag, :consequent, :value => params[:consequent], :data => { :autocomplete => "tag-edit" } %>
diff --git a/app/views/notes/search.html.erb b/app/views/notes/search.html.erb
index f70315929..147cd51a3 100644
--- a/app/views/notes/search.html.erb
+++ b/app/views/notes/search.html.erb
@@ -7,7 +7,7 @@
<%= f.input :body_matches, label: "Body" %>
<%= f.input :creator_name, label: "Author" %>
- <%= f.input :post_tags_match, label: "Tags" %>
+ <%= f.input :post_tags_match, label: "Tags", input_html: { data: { autocomplete: "tag-query" } } %>
<%= f.submit "Search" %>
<% end %>
diff --git a/app/views/post_appeals/_search.html.erb b/app/views/post_appeals/_search.html.erb
index cc1a98dd0..37dd915b1 100644
--- a/app/views/post_appeals/_search.html.erb
+++ b/app/views/post_appeals/_search.html.erb
@@ -1,6 +1,6 @@
<%= simple_form_for(:search, url: post_appeals_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
<%= f.input :reason_matches, label: "Reason", hint: "Use * for wildcard searches", input_html: { value: params[:search][:reason_matches] } %>
- <%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match] } %>
+ <%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
<%= f.input :post_id, label: "Post ID", input_html: { value: params[:search][:post_id] } %>
<%= f.input :creator_name, label: "Creator", input_html: { value: params[:search][:creator_name] } %>
<%= f.input :is_resolved, label: "Resolved?", collection: [["Yes", true], ["No", false]], selected: params[:search][:is_resolved] %>
diff --git a/app/views/post_flags/_search.html.erb b/app/views/post_flags/_search.html.erb
index 2745c213f..f358ceb36 100644
--- a/app/views/post_flags/_search.html.erb
+++ b/app/views/post_flags/_search.html.erb
@@ -1,6 +1,6 @@
<%= simple_form_for(:search, url: post_flags_path, method: :get, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
<%= f.input :reason_matches, label: "Reason", hint: "Use * for wildcard searches", input_html: { value: params[:search][:reason_matches] } %>
- <%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match] } %>
+ <%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
<%= f.input :post_id, label: "Post ID", input_html: { value: params[:search][:post_id] } %>
<% if CurrentUser.is_moderator? %>
<%= f.input :creator_name, label: "Creator", input_html: { value: params[:search][:creator_name] } %>
diff --git a/app/views/posts/partials/common/_search.html.erb b/app/views/posts/partials/common/_search.html.erb
index f34a5f017..93c12a4f0 100644
--- a/app/views/posts/partials/common/_search.html.erb
+++ b/app/views/posts/partials/common/_search.html.erb
@@ -6,7 +6,7 @@
Search
<%= form_tag(path, :method => "get") do %>
- <%= text_field_tag("tags", tags, :size => 20, :id => tags_dom_id) %>
+ <%= text_field_tag("tags", tags, :size => 20, :id => tags_dom_id, :data => { :autocomplete => "tag-query" }) %>
<% if params[:raw] %>
<%= hidden_field_tag :raw, params[:raw] %>
<% end %>
diff --git a/app/views/posts/partials/index/_edit.html.erb b/app/views/posts/partials/index/_edit.html.erb
index a87f9081f..7301b1065 100644
--- a/app/views/posts/partials/index/_edit.html.erb
+++ b/app/views/posts/partials/index/_edit.html.erb
@@ -3,7 +3,7 @@
<%= form_tag("/posts", :class => "simple_form", :method => :put, :id => "quick-edit-form") do %>
- <%= text_area_tag "post[tag_string]", "" %>
+ <%= text_area_tag "post[tag_string]", "", :data => { :autocomplete => "tag-edit" } %>
<%= submit_tag "Submit", :data => { :disable_with => "Submitting..." } %>
<%= submit_tag "Cancel" %>
diff --git a/app/views/posts/partials/index/_mode_menu.html.erb b/app/views/posts/partials/index/_mode_menu.html.erb
index 692b7542c..a6d2ee91e 100644
--- a/app/views/posts/partials/index/_mode_menu.html.erb
+++ b/app/views/posts/partials/index/_mode_menu.html.erb
@@ -25,6 +25,6 @@
<% end %>
-
+
<% end %>
diff --git a/app/views/posts/partials/show/_edit.html.erb b/app/views/posts/partials/show/_edit.html.erb
index fae787987..57a82a701 100644
--- a/app/views/posts/partials/show/_edit.html.erb
+++ b/app/views/posts/partials/show/_edit.html.erb
@@ -79,7 +79,7 @@