cleanup popular.js

v1.18.x
barisusakli 10 years ago
parent 89bf036262
commit 9084ee2d7e

@ -6,6 +6,7 @@
"year": "Year", "year": "Year",
"alltime": "All Time", "alltime": "All Time",
"no_recent_topics": "There are no recent topics.", "no_recent_topics": "There are no recent topics.",
"no_popular_topics": "There are no popular topics.",
"there-is-a-new-topic": "There is a new topic.", "there-is-a-new-topic": "There is a new topic.",
"there-is-a-new-topic-and-a-new-post": "There is a new topic and a new post.", "there-is-a-new-topic-and-a-new-post": "There is a new topic and a new post.",

@ -2,16 +2,12 @@
/* globals define, app, socket*/ /* globals define, app, socket*/
define('forum/popular', ['forum/recent', 'forum/infinitescroll'], function(recent, infinitescroll) { define('forum/popular', ['forum/recent'], function(recent) {
var Popular = {}; var Popular = {};
Popular.init = function() { Popular.init = function() {
app.enterRoom('recent_posts'); app.enterRoom('recent_posts');
$('#new-topics-alert').on('click', function() {
$(this).addClass('hide');
});
selectActivePill(); selectActivePill();
}; };
@ -26,10 +22,10 @@ define('forum/popular', ['forum/recent', 'forum/infinitescroll'], function(recen
return false; return false;
} }
}); });
}; }
function getActiveSection() { function getActiveSection() {
parts = window.location.href.split('/'); var parts = window.location.href.split('/');
return parts[parts.length - 1]; return parts[parts.length - 1];
} }

Loading…
Cancel
Save