From 93e63111de4738629b0921cc5ca9882ef35a7581 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 2 Feb 2017 13:54:52 +0100 Subject: [PATCH] cleaned fix --- website/public/js/masonry.js | 8 ++++---- website/public/js/post.js | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index 5a4ca4c..a628e96 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -38,8 +38,6 @@ function postPost() { window.scrollTo(0,0); } else { $('#alertbox').hide(); - noposts = false; - postAmount = 0; masonry(masonryMode); } }); @@ -53,8 +51,6 @@ function postPost() { window.scrollTo(0,0); } else { $('#alertbox').hide(); - noposts = false; - postAmount = 0; masonry(masonryMode); } }); @@ -116,6 +112,10 @@ function masonry(mode) { masonryMode = mode; $container.children().remove(); + // reinit posts + noposts = false; + postAmount = 0; + /* * Initialise columns. */ diff --git a/website/public/js/post.js b/website/public/js/post.js index 20da034..4009023 100644 --- a/website/public/js/post.js +++ b/website/public/js/post.js @@ -32,8 +32,6 @@ function deletePost(postID) { alert("Je account is bevroren, dus je kan geen posts verwijderen. Contacteer een admin als je denkt dat dit onjuist is."); } }); - noposts = false; - postAmount = 0; closeModal(); masonry(masonryMode); } \ No newline at end of file