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:
psychobunny
2013-05-09 03:33:53 +00:00
parent 8e1ee88878
commit f3f08a9c94
19 changed files with 521 additions and 14 deletions

View File

@@ -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();
});