Merge branch 'master' of github.com:r888888888/danbooru

This commit is contained in:
r888888888
2013-05-06 12:54:36 -07:00
4 changed files with 13 additions and 6 deletions

View File

@@ -32,7 +32,7 @@
}
Danbooru.Blacklist.toggle_entry = function(e) {
var tags = $(e.target).html();
var tags = $(e.target).text();
var match = $.grep(Danbooru.Blacklist.entries, function(entry, i) {
return entry.tags === tags;
})[0];

View File

@@ -155,6 +155,15 @@
return "";
}
query = query.replace(/_/g, " ");
var header = $("<em/>");
if (match = query.match(/^wiki:(.+)/)) {
header.html($("<a/>").attr("href", "/wiki_pages?title=" + match[1]).attr("target", "_blank").text(query));
} else {
header.text(query);
}
var current = $("#upload_tag_string,#post_tag_string").val().match(/\S+/g) || [];
var $div = $("<div/>");
$div.addClass("tag-column")
@@ -164,9 +173,7 @@
var $ul = $("<ul/>");
$ul.append(
$("<li/>").append(
$("<em/>").text(
query.replace(/_/g, " ")
)
header
)
);

View File

@@ -76,7 +76,7 @@ class Tag < ActiveRecord::Base
end
end
def categories_for(tag_names, options)
def categories_for(tag_names, options = {})
Array(tag_names).inject({}) do |hash, tag_name|
hash[tag_name] = category_for(tag_name, options)
hash

View File

@@ -166,7 +166,7 @@ class PostPresenter < Presenter
end
else
first = true
@post.pools.active.each do |pool|
@post.pools.each do |pool|
if first && template.params[:tags].blank?
html += pool_link_html(template, pool, :include_rel => true)
first = false