[IMP] Improved list view boolean formatting
authorFabien Meghazi <fme@openerp.com>
Mon, 9 Jan 2012 13:47:57 +0000 (14:47 +0100)
committerFabien Meghazi <fme@openerp.com>
Mon, 9 Jan 2012 13:47:57 +0000 (14:47 +0100)
lp bug: https://launchpad.net/bugs/910767 fixed

bzr revid: fme@openerp.com-20120109134757-wbuy45h1pca9lpgo

1  2 
addons/web/static/src/js/formats.js

@@@ -254,6 -254,11 +254,12 @@@ openerp.web.format_cell = function (row
          attrs = column.modifiers_for(row_data);
      }
      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.type === "boolean") {
++        return _.str.sprintf('<input type="checkbox" %s disabled="disabled"/>',
++                 row_data[column.id].value ? 'checked="checked"' : '');
++    }
      if (column.tag === 'button') {
          return _.template('<button type="button" title="<%-title%>" <%=additional_attributes%> >' +
              '<img src="<%-prefix%>/web/static/src/img/icons/<%-icon%>.png" alt="<%-alt%>"/>' +
      return openerp.web.format_value(
              row_data[column.id].value, column, value_if_empty);
  }
--    
++
  };