From 3206724aea59748a097d334c3a09e5b079d98ed7 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 12 Apr 2014 20:22:49 -0700 Subject: [PATCH] fix nonrebuilding of index Also hide page list in threads instead of deleting. --- src/General/Index.coffee | 12 +++++------- src/General/Navigate.coffee | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 7e4ae9c9c..042a52306 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -167,10 +167,8 @@ Index = if Conf['Refreshed Navigation'] and Conf['Index Mode'] isnt 'all pages' Index.update pageNum else - Index.pageNav pageNum - pageNav: (pageNum) -> - return if Index.currentPage is pageNum - Index.pageLoad pageNum + return if Index.currentPage is pageNum + Index.pageLoad pageNum pageLoad: (pageNum) -> Index.currentPage = pageNum return if Conf['Index Mode'] is 'all pages' @@ -281,7 +279,7 @@ Index = if req.status is 200 Index.parse req.response, pageNum else if req.status is 304 and pageNum? - Index.pageNav pageNum + Index.pageLoad pageNum catch err c.error "Index failure: #{err.message}", err.stack # network error or non-JSON content for example. @@ -304,7 +302,7 @@ Index = Index.sort() Index.buildPagelist() if pageNum? - Index.pageNav pageNum + Index.pageLoad pageNum return Index.buildIndex() Index.setPage() @@ -493,7 +491,7 @@ Index = Index.setPage() else Navigate.pushState if pageNum is 0 then './' else pageNum - Index.pageNav pageNum + Index.pageLoad pageNum querySearch: (query) -> return unless keywords = query.toLowerCase().match /\S+/g diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index f728527b7..7dc0564dc 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -39,7 +39,7 @@ Navigate = QuoteBacklink.containers = {} $.rmAll $('.board') - $('.pagelist')?.remove() + Index.pagelist.hidden = true features: [ ['Thread Excerpt', ThreadExcerpt]