forked from e621ng/e621ng
fix tag legacy api limit
This commit is contained in:
parent
ea89218fdb
commit
207001655d
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user