diff --git a/public/src/forum/category.js b/public/src/forum/category.js index 620ba2eae9..4388198e5b 100644 --- a/public/src/forum/category.js +++ b/public/src/forum/category.js @@ -15,11 +15,6 @@ 'event:new_topic' ]); - if (jQuery('.category-item').length == 0) { - jQuery('#topics-container, .category-sidebar').hide(); - jQuery('#category-no-topics').show(); - } - socket.on('event:new_topic', function(data) { var html = templates.prepare(templates['category'].blocks['topics']).parse({ topics: [data] }), topic = document.createElement('div'), @@ -28,8 +23,8 @@ numTopics = topics.length, x; - jQuery('#topics-container, .category-sidebar').show(); - jQuery('#category-no-topics').hide(); + jQuery('#topics-container, .category-sidebar').removeClass('hidden'); + jQuery('#category-no-topics').remove(); topic.innerHTML = html; if (numTopics > 0) { diff --git a/public/templates/category.tpl b/public/templates/category.tpl index e730e33e34..38fa7a059f 100644 --- a/public/templates/category.tpl +++ b/public/templates/category.tpl @@ -5,7 +5,7 @@
-
+
There are no topics in this category.
Why don't you try posting one?
@@ -42,10 +42,10 @@ -
- +
+
-
+