Update _.template calls to undscore.js 1.7
This commit is contained in:
parent
13cb07fed7
commit
4e6eacbeb1
3 changed files with 4 additions and 4 deletions
|
|
@ -67,7 +67,7 @@ Handlebars.registerHelper('personImage', function(person, size, imageClass) {
|
|||
size = ( !_.isString(size) ) ? "small" : size;
|
||||
imageClass = ( !_.isString(imageClass) ) ? size : imageClass;
|
||||
|
||||
return _.template('<img src="<%= src %>" class="avatar <%= img_class %>" title="<%= title %>" alt="<%= title %>" />', {
|
||||
return _.template('<img src="<%= src %>" class="avatar <%= img_class %>" title="<%= title %>" alt="<%= title %>" />')({
|
||||
'src': avatar[size],
|
||||
'img_class': imageClass,
|
||||
'title': _.escape(name)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Diaspora.Alert = {
|
|||
'</div>',
|
||||
|
||||
show: function(title, content) {
|
||||
$(_.template(this.faceboxTemplate, {
|
||||
$(_.template(this.faceboxTemplate)({
|
||||
title: title,
|
||||
content: content
|
||||
})).appendTo(document.body);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Diaspora.I18n = {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return translatedMessage;
|
||||
},
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ Diaspora.I18n = {
|
|||
}
|
||||
|
||||
try {
|
||||
return _.template(this._resolve(locale, items), views || {});
|
||||
return _.template(this._resolve(locale, items))(views || {});
|
||||
} catch (e) {
|
||||
if (typeof locale.fallback === "undefined") {
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Reference in a new issue