Commit 9b0f7018 authored by JC Brand's avatar JC Brand

Need to configure _.templateSettings in converse.js

The tpl configuration in main.js is only for externally loaded templates, if we
use inline templates (as is the case with the room invite feature), we need to
configure _.templateSettings as well.
parent 481ea9e7
...@@ -32,6 +32,15 @@ ...@@ -32,6 +32,15 @@
console = { log: function () {}, error: function () {} }; console = { log: function () {}, error: function () {} };
} }
// Configuration of underscore templates (this config is distict to the
// config of requirejs-tpl in main.js). This one is for normal inline
// templates.
// Use Mustache style syntax for variable interpolation
_.templateSettings = {
evaluate : /\{\[([\s\S]+?)\]\}/g,
interpolate : /\{\{([\s\S]+?)\}\}/g
};
// TODO: these non-backbone methods should all be moved to utils. // TODO: these non-backbone methods should all be moved to utils.
$.fn.addHyperlinks = function() { $.fn.addHyperlinks = function() {
if (this.length > 0) { if (this.length > 0) {
......
...@@ -104,6 +104,7 @@ config = { ...@@ -104,6 +104,7 @@ config = {
}, },
tpl: { tpl: {
// Configuration for requirejs-tpl
// Use Mustache style syntax for variable interpolation // Use Mustache style syntax for variable interpolation
templateSettings: { templateSettings: {
evaluate : /\{\[([\s\S]+?)\]\}/g, evaluate : /\{\[([\s\S]+?)\]\}/g,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment