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

@@ -13,6 +13,7 @@ var express = require('express'),
passportFacebook = require('passport-facebook').Strategy,
user = require('./user.js'),
utils = require('./utils.js'),
admin = require('./routes/admin.js'),
login_strategies = [];
passport.use(new passportLocal(function(user, password, next) {
@@ -122,9 +123,10 @@ passport.deserializeUser(function(uid, done) {
});
function create_route(url, tpl) {
function create_route(url, tpl) { // to remove
return '<script>templates.ready(function(){ajaxify.go("' + url + '", null, "' + tpl + '");});</script>';
}
app.create_route = create_route;
// Basic Routes (entirely client-side parsed, goal is to move the rest of the crap in this file into this one section)
@@ -162,6 +164,8 @@ passport.deserializeUser(function(uid, done) {
res.send(templates['header'] + '<script>templates.ready(function(){ajaxify.go("confirm/' + req.params.code + '");});</script>' + templates['footer']);
});
admin.create_routes(app);
// These functions are called via ajax once the initial page is loaded to populate templates with data
function api_method(req, res) {