fixed sidebar flashing in on empty category - got rid of javascript control and set the visibility properly from serverside

This commit is contained in:
psychobunny
2013-06-11 16:36:33 -04:00
parent c0b018cdf4
commit 1fc596b74b
3 changed files with 14 additions and 13 deletions

View File

@@ -27,7 +27,9 @@ var RDB = require('./redis.js'),
var categoryData = {
'category_name' : category_name,
'show_category_features' : 'show',
'show_sidebar' : 'show',
'show_topic_button': 'show',
'no_topics_message': 'hidden',
'topic_row_size': 'span9',
'category_id': category_id,
'active_users': active_users,
@@ -50,6 +52,8 @@ var RDB = require('./redis.js'),
getModerators(function(err, moderators) {
categoryData.moderator_block_class = moderators.length > 0 ? '' : 'none';
categoryData.moderators = moderators;
categoryData.show_sidebar = 'hidden';
categoryData.no_topics_message = 'show';
callback(categoryData);
});
@@ -70,7 +74,9 @@ var RDB = require('./redis.js'),
RDB.zrange('topics:recent', 0, -1, function(err, tids) {
var latestTopics = {
'category_name' : 'Recent',
'show_category_features' : 'hidden',
'show_sidebar' : 'hidden',
'show_topic_button' : 'hidden',
'no_topics_message' : 'hidden',
'topic_row_size': 'span12',
'category_id': false,
'topics' : []