[IMP] mail_followers: hide hr when there are no subtype
authorChristophe Matthieu <chm@openerp.com>
Tue, 8 Jan 2013 16:21:30 +0000 (17:21 +0100)
committerChristophe Matthieu <chm@openerp.com>
Tue, 8 Jan 2013 16:21:30 +0000 (17:21 +0100)
bzr revid: chm@openerp.com-20130108162130-e390u7s1duf3yj3r

addons/mail/static/src/js/mail_followers.js

index 1fc9378..9f88116 100644 (file)
@@ -221,11 +221,14 @@ openerp_mail_followers = function(session, mail) {
             var nb_subtype = 0;
             _(records).each(function (record) {nb_subtype++;});
             if (nb_subtype > 1) {
+                this.$('hr').show();
                 _(records).each(function (record, record_name) {
                     record.name = record_name;
                     record.followed = record.followed || undefined;
                     $(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo( self.$('.oe_subtype_list') );
                 });
+            } else {
+                this.$('hr').hide();
             }
         },