popular/tab component

This commit is contained in:
psychobunny
2016-01-07 16:24:14 -05:00
parent 8fa2c34fc5
commit 70bbf41dc3

View File

@@ -2,13 +2,16 @@
/* globals define, app, socket*/
define('forum/popular', function() {
define('forum/popular', ['components'], function(components) {
var Popular = {};
Popular.init = function() {
app.enterRoom('popular_topics');
$('.nav-pills li').removeClass('active').find('a[href="' + window.location.pathname + '"]').parent().addClass('active');
components.get('popular/tab')
.removeClass('active')
.find('a[href="' + window.location.pathname + '"]')
.parent().addClass('active');
};
return Popular;