# HG changeset patch # User neko259 # Date 2014-01-23 14:32:59 # Node ID af8fdac868ff38eb8e0498df456dc44f695a83f4 # Parent 72b216a38a2990af8e0345e8f2750b0d8746820c Fixed adding dead_post class to posts after bumplimit reached diff --git a/boards/static/js/thread_update.js b/boards/static/js/thread_update.js --- a/boards/static/js/thread_update.js +++ b/boards/static/js/thread_update.js @@ -111,7 +111,6 @@ function updateThread() { } updateBumplimitProgress(data.added.length); - updatePostBumpableStatus(); if (data.added.length + data.updated.length > 0) { showNewPostsTitle(data.added.length); @@ -179,6 +178,7 @@ function updateBumplimitProgress(postDel var newPostsToLimit = bumplimit - postCount; if (newPostsToLimit <= 0) { $('.bar-bg').remove(); + $('.thread').children('.post').addClass('dead_post'); } else { postsToLimitElement.text(newPostsToLimit); progressBar.width((100 - postCount / bumplimit * 100.0) + '%'); @@ -186,17 +186,6 @@ function updateBumplimitProgress(postDel } } -/** - * If the bumplimit is reached, add dead_post class to all posts - */ -function updatePostBumpableStatus() { - var postsToLimitElement = $('#left_to_limit'); - - if (postsToLimitElement === null) { - $('.thread').children('.post').addClass('dead_post'); - } -} - var documentOriginalTitle = ''; /** * Show 'new posts' text in the title if the document is not visible to a user