related tags: fix unnecessary .erb extensions, remove unused ids.

This commit is contained in:
evazion
2018-10-15 15:49:34 -05:00
parent 33ca028927
commit b166c8116a
5 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ export { default as Note } from '../src/javascripts/notes.js';
export { default as Post } from '../src/javascripts/posts.js.erb'; export { default as Post } from '../src/javascripts/posts.js.erb';
export { default as PostModeMenu } from '../src/javascripts/post_mode_menu.js'; export { default as PostModeMenu } from '../src/javascripts/post_mode_menu.js';
export { default as PostTooltip } from '../src/javascripts/post_tooltips.js'; export { default as PostTooltip } from '../src/javascripts/post_tooltips.js';
export { default as RelatedTag } from '../src/javascripts/related_tag.js.erb'; export { default as RelatedTag } from '../src/javascripts/related_tag.js';
export { default as Shortcuts } from '../src/javascripts/shortcuts.js'; export { default as Shortcuts } from '../src/javascripts/shortcuts.js';
export { default as Upload } from '../src/javascripts/uploads.js'; export { default as Upload } from '../src/javascripts/uploads.js';
export { default as Utility } from '../src/javascripts/utility.js'; export { default as Utility } from '../src/javascripts/utility.js';

View File

@@ -89,7 +89,7 @@ RelatedTag.current_tag = function() {
RelatedTag.update_selected = function(e) { RelatedTag.update_selected = function(e) {
var current_tags = $("#upload_tag_string,#post_tag_string").val().toLowerCase().match(/\S+/g) || []; var current_tags = $("#upload_tag_string,#post_tag_string").val().toLowerCase().match(/\S+/g) || [];
var $all_tags = $("#related-tags a"); var $all_tags = $(".related-tags a.search-tag");
$all_tags.removeClass("selected"); $all_tags.removeClass("selected");
$all_tags.each(function(i, tag) { $all_tags.each(function(i, tag) {

View File

@@ -1,4 +1,4 @@
<%= button_tag "Related tags", type: :button, id: "related-tags-button", class: "related-tags-button ui-button ui-widget ui-corner-all sub gradient" %> <%= button_tag "Related tags", type: :button, class: "related-tags-button ui-button ui-widget ui-corner-all sub gradient" %>
<% TagCategory.related_button_list.each do |category| %> <% TagCategory.related_button_list.each do |category| %>
<%= button_tag TagCategory.related_button_mapping[category], type: :button, "data-category": category, class: "related-tags-button ui-button ui-widget ui-corner-all sub gradient" %> <%= button_tag TagCategory.related_button_mapping[category], type: :button, "data-category": category, class: "related-tags-button ui-button ui-widget ui-corner-all sub gradient" %>

View File

@@ -5,7 +5,7 @@
<a href="#" id="hide-related-tags-link">«</a> <a href="#" id="hide-related-tags-link">«</a>
</h3> </h3>
<div id="related-tags" class="related-tags"> <div class="related-tags">
<%= render "related_tags/user_tags", related_tags: nil %> <%= render "related_tags/user_tags", related_tags: nil %>
<%= render "related_tags/current_tags", related_tags: nil %> <%= render "related_tags/current_tags", related_tags: nil %>
<%= render "related_tags/source_tags", source: nil %> <%= render "related_tags/source_tags", source: nil %>