[IMP] Improved list view boolean formatting
lp bug: https://launchpad.net/bugs/910767 fixed bzr revid: fme@openerp.com-20120109134757-wbuy45h1pca9lpgo
This commit is contained in:
commit
21cda98906
|
@ -254,6 +254,12 @@ openerp.web.format_cell = function (row_data, column, value_if_empty, process_mo
|
||||||
attrs = column.modifiers_for(row_data);
|
attrs = column.modifiers_for(row_data);
|
||||||
}
|
}
|
||||||
if (attrs.invisible) { return ''; }
|
if (attrs.invisible) { return ''; }
|
||||||
|
|
||||||
|
if (column.type === "boolean") {
|
||||||
|
return _.str.sprintf('<input type="checkbox" %s disabled="disabled"/>',
|
||||||
|
row_data[column.id].value ? 'checked="checked"' : '');
|
||||||
|
}
|
||||||
|
|
||||||
if (column.tag === 'button') {
|
if (column.tag === 'button') {
|
||||||
return _.template('<button type="button" title="<%-title%>" <%=additional_attributes%> >' +
|
return _.template('<button type="button" title="<%-title%>" <%=additional_attributes%> >' +
|
||||||
'<img src="<%-prefix%>/web/static/src/img/icons/<%-icon%>.png" alt="<%-alt%>"/>' +
|
'<img src="<%-prefix%>/web/static/src/img/icons/<%-icon%>.png" alt="<%-alt%>"/>' +
|
||||||
|
@ -272,5 +278,5 @@ openerp.web.format_cell = function (row_data, column, value_if_empty, process_mo
|
||||||
return openerp.web.format_value(
|
return openerp.web.format_value(
|
||||||
row_data[column.id].value, column, value_if_empty);
|
row_data[column.id].value, column, value_if_empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue