change post nav setting to post nav js setting
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
if ($(".paginator").length) {
|
if ($(".paginator").length && (Danbooru.meta("enable-js-navigation") === "true")) {
|
||||||
$(document).bind("keydown.right", Danbooru.Paginator.next_page);
|
$(document).bind("keydown.right", Danbooru.Paginator.next_page);
|
||||||
$(document).bind("keydown.left", Danbooru.Paginator.prev_page);
|
$(document).bind("keydown.left", Danbooru.Paginator.prev_page);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
this.initialize_titles();
|
this.initialize_titles();
|
||||||
|
|
||||||
if ($("#c-posts").length) {
|
if ($("#c-posts").length) {
|
||||||
this.initialize_shortcuts();
|
if (Danbooru.meta("enable-js-navigation") === "true") {
|
||||||
this.initialize_nav_help_link();
|
this.initialize_shortcuts();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($("#c-posts").length && $("#a-index").length) {
|
if ($("#c-posts").length && $("#a-index").length) {
|
||||||
@@ -125,9 +126,6 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Post.initialize_nav_help_link = function() {
|
|
||||||
}
|
|
||||||
|
|
||||||
Danbooru.Post.initialize_titles = function() {
|
Danbooru.Post.initialize_titles = function() {
|
||||||
$(".post-preview").each(function(i, v) {
|
$(".post-preview").each(function(i, v) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<% if flash[:notice] =~ /error/ %>
|
<% if flash[:notice] =~ /error/ %>
|
||||||
<meta name="errors" content="true">
|
<meta name="errors" content="true">
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<meta name="enable-js-navigation" content="<%= CurrentUser.user.enable_post_navigation %>">
|
||||||
<meta name="default-image-size" content="<%= CurrentUser.user.default_image_size %>">
|
<meta name="default-image-size" content="<%= CurrentUser.user.default_image_size %>">
|
||||||
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
|
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
|
||||||
<%= stylesheet_link_tag "application", :media => "screen" %>
|
<%= stylesheet_link_tag "application", :media => "screen" %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<% if (position == "bottom" && CurrentUser.user.new_post_navigation_layout) || (position == "top" && !CurrentUser.user.new_post_navigation_layout) %>
|
<% if (position == "bottom" && CurrentUser.user.new_post_navigation_layout) || (position == "top" && !CurrentUser.user.new_post_navigation_layout) %>
|
||||||
<div id="nav-links" class="ui-corner-all nav-notice">
|
<div id="nav-links" class="ui-corner-all nav-notice">
|
||||||
<% if params[:tags].present? && CurrentUser.user.enable_post_navigation && params[:tags] !~ /order:/ %>
|
<% if params[:tags].present? && params[:tags] !~ /order:/ %>
|
||||||
<%= render "posts/partials/show/search_seq", :post => post %>
|
<%= render "posts/partials/show/search_seq", :post => post %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<%= f.input :comment_threshold, :hint => "Comments below this score will be hidden by default" %>
|
<%= f.input :comment_threshold, :hint => "Comments below this score will be hidden by default" %>
|
||||||
<%= f.input :always_resize_images, :as => :select, :include_blank => false %>
|
<%= f.input :always_resize_images, :as => :select, :include_blank => false %>
|
||||||
<%= f.input :default_image_size, :hint => "Large is #{Danbooru.config.large_image_width} pixels wide, and original is whatever the original image is", :collection => %w(large original), :include_blank => false %>
|
<%= f.input :default_image_size, :hint => "Large is #{Danbooru.config.large_image_width} pixels wide, and original is whatever the original image is", :collection => %w(large original), :include_blank => false %>
|
||||||
<%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :hint => "When searching, do you want to navigate from post to post?" %>
|
<%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :label => "Enable keyboard shortcuts" %>
|
||||||
<%= f.input :new_post_navigation_layout, :as => :select, :label => "Pool links", :include_blank => false, :collection => [["Bottom", "true"], ["Top", "false"]], :hint => "When browsing pools, where do you want the navigation links to be placed?" %>
|
<%= f.input :new_post_navigation_layout, :as => :select, :label => "Pool links", :include_blank => false, :collection => [["Bottom", "true"], ["Top", "false"]], :hint => "When browsing pools, where do you want the navigation links to be placed?" %>
|
||||||
<%= f.input :favorite_tags, :hint => "A list of whitespace delimited tags that show up in your profile", :input_html => {:size => "40x5"} %>
|
<%= f.input :favorite_tags, :hint => "A list of whitespace delimited tags that show up in your profile", :input_html => {:size => "40x5"} %>
|
||||||
<%= f.input :blacklisted_tags, :hint => "A list of newline delimited tags that you never want to see", :input_html => {:size => "40x5"} %>
|
<%= f.input :blacklisted_tags, :hint => "A list of newline delimited tags that you never want to see", :input_html => {:size => "40x5"} %>
|
||||||
|
|||||||
Reference in New Issue
Block a user