diff -r 15074091bdba -r 0b1bf06c28ed src/js/utils.js --- a/src/js/utils.js Wed Nov 30 14:27:39 2011 +0100 +++ b/src/js/utils.js Wed Nov 30 16:13:22 2011 +0100 @@ -97,6 +97,12 @@ return(hex); }; +/* shortcut to have global variables in templates */ +IriSP.templToHTML = function(template, values) { + var params = IriSP.jQuery.extend(IriSP.default_templates_vars, values); + return Mustache.to_html(template, params); +}; + /* for ie compatibility if (Object.prototype.__defineGetter__&&!Object.defineProperty) { Object.defineProperty=function(obj,prop,desc) {