mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
removed deprecated functions from topics.js (server side parsing) and fixed the 150ms initial delay on first load
This commit is contained in:
@@ -35,7 +35,8 @@ var ajaxify = {};
|
|||||||
window.history.pushState({}, url, "/" + url);
|
window.history.pushState({}, url, "/" + url);
|
||||||
|
|
||||||
jQuery('#footer').fadeOut(100);
|
jQuery('#footer').fadeOut(100);
|
||||||
jQuery('#content').fadeOut(100, function() {
|
jQuery('#content').fadeOut(100);
|
||||||
|
|
||||||
load_template(function() {
|
load_template(function() {
|
||||||
|
|
||||||
exec_body_scripts(content);
|
exec_body_scripts(content);
|
||||||
@@ -47,7 +48,6 @@ var ajaxify = {};
|
|||||||
|
|
||||||
jQuery('#content, #footer').fadeIn(250);
|
jQuery('#content, #footer').fadeIn(250);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -10,25 +10,6 @@ var RDB = require('./redis.js'),
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Topics.generate_topic_body = function(callback, tid, start, end) {
|
|
||||||
var topic_body = global.templates['topic'];
|
|
||||||
|
|
||||||
posts.get(function(data) {
|
|
||||||
topic_body = topic_body.parse(data);
|
|
||||||
callback(topic_body);
|
|
||||||
}, tid, start, end);
|
|
||||||
};
|
|
||||||
|
|
||||||
// this needs to move into forum.js
|
|
||||||
Topics.generate_forum_body = function(callback, start, end) {
|
|
||||||
var forum_body = global.templates['home'];
|
|
||||||
|
|
||||||
|
|
||||||
Topics.get(function(data) {
|
|
||||||
forum_body = forum_body.parse(data);
|
|
||||||
callback(forum_body);
|
|
||||||
}, start, end);
|
|
||||||
};
|
|
||||||
|
|
||||||
Topics.get = function(callback, start, end) {
|
Topics.get = function(callback, start, end) {
|
||||||
if (start == null) start = 0;
|
if (start == null) start = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user