fix tag legacy api limit
This commit is contained in:
@@ -95,7 +95,7 @@
|
|||||||
if ($("#a-show").length) {
|
if ($("#a-show").length) {
|
||||||
$(document).bind("keydown.e", function(e) {
|
$(document).bind("keydown.e", function(e) {
|
||||||
$("#post-edit-link").trigger("click");
|
$("#post-edit-link").trigger("click");
|
||||||
$("#post_tag_string").trigger("focus");
|
$("#post_tag_string").focus();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -238,6 +238,8 @@
|
|||||||
$("#edit").show();
|
$("#edit").show();
|
||||||
$("#comments").hide();
|
$("#comments").hide();
|
||||||
$("#share").hide();
|
$("#share").hide();
|
||||||
|
$("#post_tag_string").focus();
|
||||||
|
$("")
|
||||||
} else {
|
} else {
|
||||||
$("#edit").hide();
|
$("#edit").hide();
|
||||||
$("#comments").hide();
|
$("#comments").hide();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class LegacyController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def tags
|
def tags
|
||||||
@tags = Tag.limit(100).search(params).paginate(params[:page])
|
@tags = Tag.limit(100).search(params).paginate(params[:page], :limit => params[:limit])
|
||||||
end
|
end
|
||||||
|
|
||||||
def artists
|
def artists
|
||||||
|
|||||||
@@ -81,7 +81,11 @@ module Danbooru
|
|||||||
def option_for(key)
|
def option_for(key)
|
||||||
case key
|
case key
|
||||||
when :limit
|
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
|
when :count
|
||||||
if @paginator_options.has_key?(:search_count) && @paginator_options[:search_count].blank?
|
if @paginator_options.has_key?(:search_count) && @paginator_options[:search_count].blank?
|
||||||
|
|||||||
Reference in New Issue
Block a user