Node.js based forum software built for the modern web
addressed issue #158, where topic buttons in admin panel were not working correctly
Julian Lam26944ae686d6
diff --git a/public/src/forum/admin/topics.js b/public/src/forum/admin/topics.jsindex ba4ae12ea3..aebdb8e1c8 100644--- a/public/src/forum/admin/topics.js+++ b/public/src/forum/admin/topics.js@@ -40,12 +40,12 @@ $(document).ready(function() {var topicEls = topicsListEl.querySelectorAll('li'),numTopics = topicEls.length;for(var x=0;x<numTopics;x++) {- if (topicEls[x].getAttribute('data-pinned')) topicEls[x].querySelector('[data-action="pin"]').className += ' active';- if (topicEls[x].getAttribute('data-locked')) topicEls[x].querySelector('[data-action="lock"]').className += ' active';- if (topicEls[x].getAttribute('data-deleted')) topicEls[x].querySelector('[data-action="delete"]').className += ' active';- topicEls[x].removeAttribute('data-pinned');- topicEls[x].removeAttribute('data-locked');- topicEls[x].removeAttribute('data-deleted');+ if (topicEls[x].getAttribute('data-pinned') === '1') topicEls[x].querySelector('[data-action="pin"]').className += ' active';+ if (topicEls[x].getAttribute('data-locked') === '1') topicEls[x].querySelector('[data-action="lock"]').className += ' active';+ if (topicEls[x].getAttribute('data-deleted') === '1') topicEls[x].querySelector('[data-action="delete"]').className += ' active';+ // topicEls[x].removeAttribute('data-pinned');+ // topicEls[x].removeAttribute('data-locked');+ // topicEls[x].removeAttribute('data-deleted');}});