From 68d1c2928fc1d0307726ed4d32555d68c4f330c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 23 Jul 2013 11:55:09 +0200 Subject: [PATCH] [CLEAN] Cleaning befor merging No need to use an image for edition -> use webtypo font instead Small code cleaning in js / python bzr revid: tde@openerp.com-20130723095509-knp45uvmlfmr27v9 --- addons/mail/mail_thread.py | 19 ++++---- addons/mail/static/src/css/mail.css | 12 ++--- addons/mail/static/src/img/icon-edit.gif | Bin 129 -> 0 bytes addons/mail/static/src/js/mail_followers.js | 43 ++++++++++++------ addons/mail/static/src/xml/mail_followers.xml | 12 ++--- 5 files changed, 46 insertions(+), 40 deletions(-) delete mode 100644 addons/mail/static/src/img/icon-edit.gif diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index b4e8ddee439..b61477ec7ca 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -157,18 +157,17 @@ class mail_thread(osv.AbstractModel): return res def read_followers_data(self, cr, uid, follower_ids, context=None): - datas = [] + result = [] technical_group = self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'group_no_one') for follower in self.pool.get('res.partner').browse(cr, uid, follower_ids, context=context): - is_editable = uid in map(lambda x:x.id, technical_group.users) - is_uid = uid in map(lambda x:x.id, follower.user_ids) - data = ( - follower.id, - follower.name, - {'is_editable': is_editable, 'is_uid': is_uid}, - ) - datas.append(data) - return datas + is_editable = uid in map(lambda x: x.id, technical_group.users) + is_uid = uid in map(lambda x: x.id, follower.user_ids) + data = (follower.id, + follower.name, + {'is_editable': is_editable, 'is_uid': is_uid}, + ) + result.append(data) + return result def _get_subscription_data(self, cr, uid, ids, name, args, user_pid=None, context=None): """ Computes: diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 2554538a104..c6f7c911f8a 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -632,14 +632,10 @@ } .openerp .oe_followers .oe_partner { height: 32px; - margin-right: 8px; + margin-right: 24px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - margin-right: 10px; -} -.openerp .oe_followers .oe_partner_name { - margin-right: 26px; } .openerp .oe_followers .oe_partner img{ width: 32px; @@ -656,11 +652,9 @@ cursor: pointer; position: absolute; right: 12px; - margin-top: 6px; - width: 10px !important; - height: 12px !important; + line-height: 20px; } -.openerp .oe_followers .oe_partner img.hidden{ +.openerp .oe_followers .oe_partner .oe_hidden{ display: none; } .openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title{ diff --git a/addons/mail/static/src/img/icon-edit.gif b/addons/mail/static/src/img/icon-edit.gif deleted file mode 100644 index 6e9aa5ef6599bb02e966d34994cc9f42a126ea5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 129 zcmZ?wbhEHb 1) { $list.show(); diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index 7628cdae7da..a936b8237d6 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -29,10 +29,10 @@ Template used to display a partner following the record -->
- - - - X + + + & + X