|
|
@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/* global define, socket, app, templates, RELATIVE_PATH */
|
|
|
|
|
|
|
|
|
|
|
|
define(function() {
|
|
|
|
define(function() {
|
|
|
|
var Topics = {};
|
|
|
|
var Topics = {};
|
|
|
|
|
|
|
|
|
|
|
@ -36,7 +39,6 @@ define(function() {
|
|
|
|
socket.emit('topics.restore', tid, Topics.restore);
|
|
|
|
socket.emit('topics.restore', tid, Topics.restore);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -48,7 +50,7 @@ define(function() {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var lastTid = parseInt(topics.eq(topics.length - 1).attr('data-tid'));
|
|
|
|
var lastTid = parseInt(topics.eq(topics.length - 1).attr('data-tid'), 10);
|
|
|
|
|
|
|
|
|
|
|
|
$(this).html('<i class="fa fa-refresh fa-spin"></i> Retrieving topics');
|
|
|
|
$(this).html('<i class="fa fa-refresh fa-spin"></i> Retrieving topics');
|
|
|
|
socket.emit('admin.topics.getMore', {
|
|
|
|
socket.emit('admin.topics.getMore', {
|
|
|
@ -64,7 +66,7 @@ define(function() {
|
|
|
|
if (topics.length > 0) {
|
|
|
|
if (topics.length > 0) {
|
|
|
|
templates.preload_template('admin/topics', function() {
|
|
|
|
templates.preload_template('admin/topics', function() {
|
|
|
|
templates['admin/topics'].parse({topics:[]});
|
|
|
|
templates['admin/topics'].parse({topics:[]});
|
|
|
|
var html = templates.prepare(templates['admin/topics'].blocks['topics']).parse({
|
|
|
|
var html = templates.prepare(templates['admin/topics'].blocks.topics).parse({
|
|
|
|
topics: topics
|
|
|
|
topics: topics
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
topicsListEl = $('.topics');
|
|
|
|
topicsListEl = $('.topics');
|
|
|
|