summaryrefslogtreecommitdiffstats
path: root/web/js/labitrack.d/30-setcontent.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/labitrack.d/30-setcontent.js')
-rw-r--r--web/js/labitrack.d/30-setcontent.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/web/js/labitrack.d/30-setcontent.js b/web/js/labitrack.d/30-setcontent.js
new file mode 100644
index 0000000..d33a4c8
--- /dev/null
+++ b/web/js/labitrack.d/30-setcontent.js
@@ -0,0 +1,12 @@
+$(function(){
+ var template = λ.template = function (tmpl, context){
+ return Handlebars.templates[tmpl](context);
+ };
+
+ var tmplcontent = $('#tmplcontent');
+ var h1 = $('h1');
+ λ.setcontent = function(tmpl, context) {
+ tmplcontent.html(template(tmpl, context));
+ h1.html(tmplcontent.find('.tmplheader').html());
+ };
+});