src/js/utils.js
branchpopcorn-port
changeset 837 353a78021ebc
parent 836 526f91f5253e
child 840 ac66e2240e1e
equal deleted inserted replaced
836:526f91f5253e 837:353a78021ebc
   111   return zeroes + str;
   111   return zeroes + str;
   112 };
   112 };
   113 
   113 
   114 /* shortcut to have global variables in templates */
   114 /* shortcut to have global variables in templates */
   115 IriSP.templToHTML = function(template, values) {
   115 IriSP.templToHTML = function(template, values) {
   116   var params = IriSP.jQuery.extend(IriSP.default_templates_vars, values);
   116   var params = IriSP.jQuery.extend(
       
   117       { "defaults" : IriSP.default_templates_vars,
       
   118         "l10n" : IriSP.i18n.getMessages()
       
   119         },
       
   120       values);
   117   return Mustache.to_html(template, params);
   121   return Mustache.to_html(template, params);
   118 };
   122 };
   119 
   123 
   120 /* we need to be stricter than encodeURIComponent,
   124 /* we need to be stricter than encodeURIComponent,
   121    because of twitter
   125    because of twitter