fixed infinite load and select

This commit is contained in:
barisusakli
2014-04-07 17:55:14 -04:00
parent 42c9185c7d
commit d1ec101248
3 changed files with 5 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ define(['forum/recent'], function(recent) {
}
if (data.topics && data.topics.length) {
recent.onTopicsLoaded('popular', data.topics);
recent.onTopicsLoaded('popular', data.topics, false);
$('#topics-container').attr('data-nextstart', data.nextStart);
} else {
$('#load-more-btn').hide();

View File

@@ -107,7 +107,7 @@ define(function() {
}
if (data.topics && data.topics.length) {
Recent.onTopicsLoaded('recent', data.topics);
Recent.onTopicsLoaded('recent', data.topics, false);
$('#topics-container').attr('data-nextstart', data.nextStart);
}
@@ -115,9 +115,9 @@ define(function() {
});
}
Recent.onTopicsLoaded = function(templateName, topics) {
Recent.onTopicsLoaded = function(templateName, topics, showSelect) {
ajaxify.loadTemplate(templateName, function(template) {
var html = templates.parse(templates.getBlock(template, 'topics'), {topics: topics});
var html = templates.parse(templates.getBlock(template, 'topics'), {topics: topics, showSelect: showSelect});
translator.translate(html, function(translatedHTML) {
$('#category-no-topics').remove();

View File

@@ -114,7 +114,7 @@ define(['forum/recent'], function(recent) {
}
if (data.topics && data.topics.length) {
recent.onTopicsLoaded('unread', data.topics);
recent.onTopicsLoaded('unread', data.topics, true);
$('#topics-container').attr('data-nextstart', data.nextStart);
} else {
$('#load-more-btn').hide();