mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
lots of pagination work, query params, ajaxify to pids
This commit is contained in:
@@ -52,24 +52,10 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
pagination.init(templates.get('currentPage'), templates.get('pageCount'), loadPage);
|
||||
pagination.init(templates.get('currentPage'), templates.get('pageCount'));
|
||||
}
|
||||
}
|
||||
|
||||
function loadPage(page, callback) {
|
||||
socket.emit('categories.loadPage', {cid: templates.get('category_id'), page: page}, function(err, data) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (data && data.topics && data.topics.length) {
|
||||
Category.onTopicsLoaded(data.topics);
|
||||
}
|
||||
|
||||
callback(null);
|
||||
});
|
||||
}
|
||||
|
||||
Category.onNewTopic = function(data) {
|
||||
var html = templates.prepare(templates['category'].blocks['topics']).parse({
|
||||
topics: [data]
|
||||
|
||||
Reference in New Issue
Block a user