diff options
| author | Sbh (Openerp) <sbh@tinyerp.com> | 2012-04-04 16:45:54 +0530 |
|---|---|---|
| committer | Sbh (Openerp) <sbh@tinyerp.com> | 2012-04-04 16:45:54 +0530 |
| commit | ff24ff66ef846afc45f00bec9751e2f7247606b7 (patch) | |
| tree | 42b059a22df80cf29a63471b7e4ee965ed3e1d54 /addons/web/static/src | |
| parent | 8cefe9a5e130048291818c40e5da679b3e7e2499 (diff) | |
| parent | b3c948adb0eda2f83ad62b86571d12839dbecb95 (diff) | |
remove the feture of bold record
bzr revid: sbh@tinyerp.com-20120404111554-w6b09tmqbtc8lgtz
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/view_list.js | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index e8fff450c6e..6d95e2fa1ce 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -82,8 +82,13 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# } self.compute_aggregates(); }); - this.no_leaf = false; + var domain = [['res_model','=', this.model], ['user_id' , '=', this.session.uid]]; + new openerp.web.DataSetSearch( + this, 'ir.needaction_users', this.dataset.get_context(), domain) + .read_slice().done(function(result) { + self.needaction_ids = _.pluck(result, 'res_id'); + }) }, /** * Retrieves the view's number of records per page (|| section) @@ -154,16 +159,21 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# current_date: new Date().toString('yyyy-MM-dd') // TODO: time, datetime, relativedelta }); + var style= ''; + if(this.needaction_ids.indexOf(record.attributes.id) >= 0) { + style = 'font-weight: bold;'; + } for(var i=0, len=this.colors.length; i<len; ++i) { var pair = this.colors[i], color = pair[0], expression = pair[1]; if (py.evaluate(expression, context).toJSON()) { - return 'color: ' + color + ';'; + style += 'color: ' + color + ';' + return style; } // TODO: handle evaluation errors } - return ''; + return style; }, /** * Called after loading the list view's description, sets up such things @@ -776,7 +786,7 @@ openerp.web.ListView.List = openerp.web.Class.extend( /** @lends openerp.web.Lis * * @constructs openerp.web.ListView.List * @extends openerp.web.Class - * + * * @param {Object} opts display options, identical to those of :js:class:`openerp.web.ListView` */ init: function (group, opts) { @@ -1514,7 +1524,7 @@ var Record = openerp.web.Class.extend(/** @lends Record# */{ /** * @constructs Record * @extends openerp.web.Class - * + * * @mixes Events * @param {Object} [data] */ @@ -1596,11 +1606,11 @@ var Collection = openerp.web.Class.extend(/** @lends Collection# */{ * Smarter collections, with events, very strongly inspired by Backbone's. * * Using a "dumb" array of records makes synchronization between the - * various serious + * various serious * * @constructs Collection * @extends openerp.web.Class - * + * * @mixes Events * @param {Array} [records] records to initialize the collection with * @param {Object} [options] |
