added functionality to post button. also introduced some underlying concepts regarding modules and pulling template vars

This commit is contained in:
psychobunny
2013-06-05 17:00:58 -04:00
parent a846caa387
commit 5bb9933f4a
4 changed files with 35 additions and 4 deletions

View File

@@ -169,7 +169,7 @@
if (!templates[tpl_url] || !template_data) return;
document.getElementById('content').innerHTML = templates[tpl_url].parse(JSON.parse(template_data));
jQuery('#content [template-variable]').each(function(index, element) {
templates.set(element.getAttribute('template-variable'), element.value);
});
@@ -181,6 +181,10 @@
}
templates.flush = function() {
parsed_variables = {};
}
templates.get = function(key) {
return parsed_variables[key];
}