mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 18:26:15 +01:00
more fixes to ajaxify, updated /users blocks to sit flush to the left, started work on the ACP including basic templates, added a method to get active users in all rooms (socket connections), added more routes mostly pointing to admin, added a routing folder to start organizing routes better, starting with admin.
This commit is contained in:
@@ -68,7 +68,8 @@ var templates = {};
|
||||
'header', 'footer', 'register', 'home', 'topic','account', 'category', 'users', 'accountedit',
|
||||
'login', 'reset', 'reset_code', 'account',
|
||||
'confirm',
|
||||
'emails/reset', 'emails/reset_plaintext', 'emails/email_confirm', 'emails/email_confirm_plaintext'
|
||||
'emails/reset', 'emails/reset_plaintext', 'emails/email_confirm', 'emails/email_confirm_plaintext',
|
||||
'admin/index', 'admin/categories', 'admin/users', 'admin/topics', 'admin/settings', 'admin/themes', 'admin/twitter', 'admin/facebook', 'admin/gplus'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -168,15 +169,15 @@ function load_template(callback, custom_tpl) {
|
||||
|
||||
|
||||
jQuery.get(API_URL + url, function(data) {
|
||||
|
||||
var tpl = templates.get_custom_map(url);
|
||||
if (tpl == false) {
|
||||
tpl = url.split('/')[0];
|
||||
|
||||
if (tpl == false && !templates[url]) {
|
||||
tpl = (url === '' || url === '/') ? 'home' : url.split('/')[0];
|
||||
} else if (templates[url]) {
|
||||
tpl = url;
|
||||
}
|
||||
|
||||
if (custom_tpl && custom_tpl != "undefined")
|
||||
tpl = custom_tpl;
|
||||
|
||||
|
||||
|
||||
document.getElementById('content').innerHTML = templates[tpl].parse(JSON.parse(data));
|
||||
if (callback) callback();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user