[IMP] Now the edit_subtype pencil will be visible when the cursor goes on to the...
authorParamjit Singh Sahota <psa@tinyerp.com>
Wed, 19 Jun 2013 13:48:17 +0000 (19:18 +0530)
committerParamjit Singh Sahota <psa@tinyerp.com>
Wed, 19 Jun 2013 13:48:17 +0000 (19:18 +0530)
And made the edit_subtype icon visible without debug mode.

bzr revid: psa@tinyerp.com-20130619134817-n390r4dsgmpo33nb

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

index d976ce0..d5c1ffe 100644 (file)
     text-overflow: ellipsis;
     margin-right: 10px;
 }
+.openerp .oe_followers .oe_partner_name {
+    margin-right: 26px;
+}
 .openerp .oe_followers .oe_partner img{
     width: 32px;
     margin-right:4px;
     width: 10px !important;
     height: 12px !important;
 }
+img.hidden {
+    display: none;
+}
 .openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title{
     padding-right: 20px;
 }
index 6bcc0bb..24dadec 100644 (file)
@@ -195,6 +195,15 @@ openerp_mail_followers = function(session, mail) {
             // clean and display title
             var node_user_list = this.$('.oe_follower_list').empty();
             this.$('.oe_follower_title').html(this._format_followers(this.followers.length));
+            // On mouseenter it will show the edit_subtype penil
+            this.$el.on('mouseenter', 'div.oe_follower_list', function() {
+                $("img.oe_edit_subtype").removeClass("hidden");
+                $('div.oe_follower_list').find('.oe_partner').addClass('oe_partner_name');
+            }).on('mouseleave', 'div.oe_follower_list', function(){
+                $("img.oe_edit_subtype").addClass("hidden");
+                $('div.oe_follower_list').find('.oe_partner').removeClass('oe_partner_name');
+            });
+
             // truncate number of displayed followers
             var truncated = this.followers.slice(0, this.displayed_nb);
             _(truncated).each(function (record) {
index 0693b7c..db58abb 100644 (file)
@@ -31,7 +31,7 @@
     <div t-name="mail.followers.partner" class='oe_partner'>
         <img class="oe_mail_thumbnail oe_mail_frame" t-attf-src="{record.avatar_url}"/>
         <a t-attf-href="#model=res.partner&amp;id=#{record.id}" t-att-title="record.name"><t t-esc="record.name"/></a>
-        <img t-if="widget.session.debug and widget.check_access and (widget.records_length &gt; 1)" class="oe_edit_subtype" t-att-src='_s + "/mail/static/src/img/icon-edit.gif"' title="Edit Subtype" t-att-data-id="record.id"/>
+        <img t-if="widget.check_access and (widget.records_length &gt; 1)" class="oe_edit_subtype hidden" t-att-src='_s + "/mail/static/src/img/icon-edit.gif"' title="Edit Subtype" t-att-data-id="record.id"/>
         <span t-if="widget.view_is_editable" class="oe_remove_follower oe_e" title="Remove this follower" t-att-data-id="record.id">X</span>
     </div>