mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
templates refactor part 2
updated so that tpls get loaded on demand as opposed to all at once on load; added a function to pull the tpl list on load instead of having to manually define new templates in code; some clean up; added utils.walk;
This commit is contained in:
@@ -39,17 +39,16 @@ var ajaxify = {};
|
||||
tpl_url = url;
|
||||
}
|
||||
|
||||
if (templates[tpl_url] && !templates.force_refresh(tpl_url)) {
|
||||
if (templates.is_available(tpl_url) && !templates.force_refresh(tpl_url)) {
|
||||
if (quiet !== true) {
|
||||
window.history.pushState({
|
||||
"url": url
|
||||
}, url, "/" + url);
|
||||
}
|
||||
|
||||
jQuery('#footer').fadeOut(100);
|
||||
jQuery('#content').fadeOut(100);
|
||||
jQuery('#footer, #content').fadeOut(100);
|
||||
|
||||
load_template(function() {
|
||||
templates.load_template(function() {
|
||||
exec_body_scripts(content);
|
||||
|
||||
ajaxify.enable();
|
||||
|
||||
Reference in New Issue
Block a user