From 6d293dfde25bc8b579370846f5af4a213a9fbc12 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 16 Oct 2018 12:44:49 -0500 Subject: [PATCH] related tags: fix style issues. --- app/javascript/src/javascripts/related_tag.js | 12 +++++++++--- app/views/posts/partials/show/_edit.html.erb | 2 +- app/views/related_tags/_source_tags.html.erb | 8 ++++---- app/views/uploads/new.html.erb | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/app/javascript/src/javascripts/related_tag.js b/app/javascript/src/javascripts/related_tag.js index 1076c90f9..2b34c5d17 100644 --- a/app/javascript/src/javascripts/related_tag.js +++ b/app/javascript/src/javascripts/related_tag.js @@ -34,7 +34,7 @@ RelatedTag.on_click_related_tags_button = function (event) { RelatedTag.show(); } -RelatedTag.on_update_source_data = function (event, { source, related_tags_html }) { +RelatedTag.on_update_source_data = function (event, { related_tags_html }) { $(".source-related-tags-columns").replaceWith(related_tags_html); RelatedTag.update_selected(); } @@ -126,12 +126,18 @@ RelatedTag.toggle_tag = function(e) { RelatedTag.show = function(e) { $(document).trigger("danbooru:show-related-tags"); $("#related-tags-container").removeClass("hidden").addClass("visible"); - return false; + + if (e) { + e.preventDefault(); + } } RelatedTag.hide = function(e) { $("#related-tags-container").removeClass("visible").addClass("hidden"); - return false; + + if (e) { + e.preventDefault(); + } } $(function() { diff --git a/app/views/posts/partials/show/_edit.html.erb b/app/views/posts/partials/show/_edit.html.erb index ab4fef581..c2123c752 100644 --- a/app/views/posts/partials/show/_edit.html.erb +++ b/app/views/posts/partials/show/_edit.html.erb @@ -89,5 +89,5 @@ <%= submit_tag "Submit", :class => "ui-button ui-widget ui-corner-all" %> - <%= render "related_tags/container", related_tags: nil %> + <%= render "related_tags/container" %> <% end %> diff --git a/app/views/related_tags/_source_tags.html.erb b/app/views/related_tags/_source_tags.html.erb index a49308932..13b2a0cea 100644 --- a/app/views/related_tags/_source_tags.html.erb +++ b/app/views/related_tags/_source_tags.html.erb @@ -5,13 +5,13 @@ - <%= render "related_tags/container", related_tags: nil %> + <%= render "related_tags/container" %> <% end %> <% else %>

You <%= CurrentUser.user.upload_limited_reason %>