mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 18:56:15 +01:00
added functionality to post button. also introduced some underlying concepts regarding modules and pulling template vars
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user