fix tag legacy api limit

This commit is contained in:
albert 2013-02-28 21:48:48 -08:00
parent ea89218fdb
commit 207001655d
3 changed files with 9 additions and 3 deletions

View File

@ -95,7 +95,7 @@
if ($("#a-show").length) {
$(document).bind("keydown.e", function(e) {
$("#post-edit-link").trigger("click");
$("#post_tag_string").trigger("focus");
$("#post_tag_string").focus();
e.preventDefault();
});
@ -238,6 +238,8 @@
$("#edit").show();
$("#comments").hide();
$("#share").hide();
$("#post_tag_string").focus();
$("")
} else {
$("#edit").hide();
$("#comments").hide();

View File

@ -25,7 +25,7 @@ class LegacyController < ApplicationController
end
def tags
@tags = Tag.limit(100).search(params).paginate(params[:page])
@tags = Tag.limit(100).search(params).paginate(params[:page], :limit => params[:limit])
end
def artists

View File

@ -81,7 +81,11 @@ module Danbooru
def option_for(key)
case key
when :limit
@paginator_options.try(:[], :limit) || Danbooru.config.posts_per_page
limit = @paginator_options.try(:[], :limit) || Danbooru.config.posts_per_page
if limit.to_i > 1_000
limit = 1000
end
limit
when :count
if @paginator_options.has_key?(:search_count) && @paginator_options[:search_count].blank?