This commit is contained in:
Baris Soner Usakli
2013-11-26 23:55:55 -05:00
parent 31635b92f3
commit 3a8dca6fb9
2 changed files with 11 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
define(function () {
var Category = {};
var Category = {},
loadingMoreTopics = false;
Category.init = function() {
var cid = templates.get('category_id'),
@@ -8,8 +9,7 @@ define(function () {
googleEl = jQuery('#google-share'),
twitter_url = templates.get('twitter-intent-url'),
facebook_url = templates.get('facebook-share-url'),
google_url = templates.get('google-share-url'),
loadingMoreTopics = false;
google_url = templates.get('google-share-url');
app.enterRoom('category_' + cid);
@@ -147,6 +147,10 @@ define(function () {
Category.loadMoreTopics = function(cid) {
if (loadingMoreTopics) {
return;
}
loadingMoreTopics = true;
socket.emit('api:category.loadMore', {
cid: cid,