[MERGE] Merged web-side branch of feature allowing to use 'fonts=bold:expression...
authorThibault Delavallée <tde@openerp.com>
Thu, 19 Apr 2012 11:45:57 +0000 (13:45 +0200)
committerThibault Delavallée <tde@openerp.com>
Thu, 19 Apr 2012 11:45:57 +0000 (13:45 +0200)
bzr revid: tde@openerp.com-20120419114557-mv7uf9h5p2i5t3os

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

@@@ -140,14 -141,15 +141,15 @@@ instance.web.ListView = instance.web.Vi
          return this.reload_view(null, null, true);
      },
      /**
-      * Returns the color for the provided record in the current view (from the
-      * ``@colors`` attribute)
+      * Returns the style for the provided record in the current view (from the
 -     * ``@colors`` attribute and ``@fonts`` attribute)
++     * ``@colors`` and ``@fonts`` attributes)
       *
       * @param {Record} record record for the current row
-      * @returns {String} CSS color declaration
+      * @returns {String} CSS style declaration
       */
-     color_for: function (record) {
-         if (!this.colors) { return ''; }
+     style_for: function (record) {
+         var style= '';
          var context = _.extend({}, record.attributes, {
              uid: this.session.uid,
              current_date: new Date().toString('yyyy-MM-dd')