add tag seq nav

This commit is contained in:
albert
2013-02-25 12:09:02 -05:00
parent 2aa141aa69
commit c6d03f2d3a
10 changed files with 81 additions and 13 deletions

View File

@@ -50,18 +50,26 @@
}
Danbooru.Post.nav_pool_prev = function() {
location.href = $("#pool-nav a.active[rel=prev]").attr("href");
if ($("#tag-seq-nav").length) {
location.href = $("#tag-seq-nav a[rel=prev]").attr("href");
} else {
location.href = $("#pool-nav a.active[rel=prev]").attr("href");
}
}
Danbooru.Post.nav_pool_next = function() {
location.href = $("#pool-nav a.active[rel=next]").attr("href");
if ($("#tag-seq-nav").length) {
location.href = $("#tag-seq-nav a[rel=next]").attr("href");
} else {
location.href = $("#pool-nav a.active[rel=next]").attr("href");
}
}
Danbooru.Post.nav_pool_scroll = function() {
var scroll_top = $(window).scrollTop() + $(window).height();
if (scroll_top > $("#image").height() + $("#image").offset().top + 100) {
location.href = $("#pool-nav a.active[rel=next]").attr("href");
Danbooru.Post.nav_pool_next();
return;
}
@@ -321,10 +329,10 @@
if (width > 1000) {
width = 1000;
}
if (width < 400) {
$("#pool-nav li").css("textAlign", "left");
if (width > 700) {
width = 700
}
$("#pool-nav").width(width);
$("#pool-nav,#tag-seq-nav").width(width);
}
})();