Skip to content

Commit b831881

Browse files
author
Olivier Giulieri
committed
Fixed forgotten check for field "value" property.
1 parent 89b610b commit b831881

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

js/many-badges.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@ Evol.ViewMany.Badges = Evol.ViewMany.extend({
3535

3636
HTMLItem: function(h, fields, model, icon, selectable, route){
3737
var that = this,
38+
v,
3839
opts = this.options,
3940
link = (opts.links!==false);
4041

4142
h.push('<div class="panel ',this.options.style,'">');
4243
_.each(fields, function(f, idx){
43-
var v = that._HTMLField(f, model.escape(f.id));
44+
if(f.value){
45+
v = f.value(model);
46+
}else{
47+
v = that._HTMLField(f, model.escape(f.id));
48+
}
4449
if (idx === 0) {
4550
h.push('<div data-mid="', model.id, '"><h4>',
4651
selectable?that._HTMLCheckbox(model.id):'',

0 commit comments

Comments
 (0)