clean up client side + config.json

This commit is contained in:
psychobunny
2013-04-22 19:13:39 +00:00
parent 65b035c9c9
commit 1d35f369d9
5 changed files with 124 additions and 109 deletions

19
public/src/templates.js Normal file
View File

@@ -0,0 +1,19 @@
var templates = {};
function loadTemplates(templatesToLoad) {
var timestamp = new Date().getTime();
for (var t in templatesToLoad) {
(function(template) {
$.get('templates/' + template + '.tpl?v=' + timestamp, function(html) {
templates[template] = html;
});
}(templatesToLoad[t]));
}
}
function templates_init() {
loadTemplates(['register', 'home', 'login']);
}
templates_init();