From 1a3f1f5af2df959e1356a35950bb68d43be01b0a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 12 Apr 2014 19:34:00 -0700 Subject: [PATCH 1/3] fix Thread Stats bug --- src/Monitoring/ThreadStats.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Monitoring/ThreadStats.coffee b/src/Monitoring/ThreadStats.coffee index ad3d869d1..0d8fcfdae 100755 --- a/src/Monitoring/ThreadStats.coffee +++ b/src/Monitoring/ThreadStats.coffee @@ -40,7 +40,7 @@ ThreadStats = if Conf['Updater and Stats in Header'] Header.rmShortcut @dialog else - $.rm d.body, sc + $.rm @dialog clearTimeout @timeout # a possible race condition might be that this won't clear in time, but the resulting error will prevent issues anyways. @@ -49,6 +49,7 @@ ThreadStats = delete @postCountEl delete @fileCountEl delete @pageCountEl + delete @dialog Thread.callbacks.disconnect 'Thread Stats' $.off d, 'ThreadUpdate', ThreadStats.onUpdate @@ -81,4 +82,4 @@ ThreadStats = for thread in page.threads when thread.no is ThreadStats.thread.ID ThreadStats.pageCountEl.textContent = page.page (if page.page is @response.length - 1 then $.addClass else $.rmClass) ThreadStats.pageCountEl, 'warning' - return \ No newline at end of file + return From 67ddd00d7bf61fda6fc5c7ceb770841ac11b29ec Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 12 Apr 2014 19:54:03 -0700 Subject: [PATCH 2/3] stop page list from appearing in threads --- src/General/Navigate.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index 32a5f9c0e..f728527b7 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -39,6 +39,7 @@ Navigate = QuoteBacklink.containers = {} $.rmAll $('.board') + $('.pagelist')?.remove() features: [ ['Thread Excerpt', ThreadExcerpt] From 3206724aea59748a097d334c3a09e5b079d98ed7 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 12 Apr 2014 20:22:49 -0700 Subject: [PATCH 3/3] 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]