[IMP]convert subtypes list into selection.
bzr revid: dka@tinyerp.com-20140220102958-l2uwymwtnzcxnetw
This commit is contained in:
@@ -576,7 +576,7 @@
|
||||
.openerp .oe_followers button.oe_follower{
|
||||
display: block;
|
||||
text-align: center;
|
||||
width:100%;
|
||||
width:135px;
|
||||
}
|
||||
.openerp .oe_followers button.oe_follower.oe_following{
|
||||
color: white;
|
||||
|
||||
@@ -246,7 +246,7 @@ openerp_mail_followers = function(session, mail) {
|
||||
if (user_pid) {
|
||||
dialog = true;
|
||||
} else {
|
||||
var subtype_list_ul = this.$('.oe_subtype_list').empty();
|
||||
var subtype_list_ul = this.$('.oe_subtype_list ul').empty();
|
||||
if (! this.message_is_follower) return;
|
||||
}
|
||||
var id = this.view.datarecord.id;
|
||||
@@ -261,9 +261,8 @@ openerp_mail_followers = function(session, mail) {
|
||||
var $list = self.$dialog;
|
||||
}
|
||||
else {
|
||||
var $list = this.$('.oe_subtype_list');
|
||||
var $list = this.$('.oe_subtype_list ul');
|
||||
}
|
||||
$list.empty().hide();
|
||||
var records = data[id].message_subtype_data;
|
||||
this.records_length = $.map(records, function(value, index) { return index; }).length;
|
||||
if (this.records_length > 1) { self.display_followers(); }
|
||||
@@ -272,9 +271,6 @@ openerp_mail_followers = function(session, mail) {
|
||||
record.followed = record.followed || undefined;
|
||||
$(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo($list);
|
||||
});
|
||||
if (_.size(records) > 1) {
|
||||
$list.show();
|
||||
}
|
||||
},
|
||||
|
||||
do_follow: function () {
|
||||
|
||||
@@ -5,17 +5,23 @@
|
||||
followers main template
|
||||
Template used to display the followers, the actions and the subtypes in a record.
|
||||
-->
|
||||
<div t-name="mail.followers" class="oe_followers">
|
||||
<div t-name="mail.followers" class="oe_followers">
|
||||
<div class="oe_actions">
|
||||
<button type="button" class="oe_follower oe_notfollow">
|
||||
<span class="oe_follow">Follow</span>
|
||||
<span class="oe_unfollow">Unfollow</span>
|
||||
<span class="oe_following">Following</span>
|
||||
</button>
|
||||
<div t-attf-class="btn-group oe_subtype_list">
|
||||
<button class="btn oe_follower oe_notfollow">
|
||||
<span class="oe_follow">Follow</span>
|
||||
<span class="oe_unfollow">Unfollow</span>
|
||||
<span class="oe_following">Following</span>
|
||||
</button>
|
||||
<button type="button" t-attf-class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu"></ul>
|
||||
</div>
|
||||
|
||||
<t t-if="widget.comment">
|
||||
<h5 class="oe_comment"><t t-raw="widget.comment"/></h5>
|
||||
</t>
|
||||
<div class="oe_subtype_list"></div>
|
||||
</div>
|
||||
<div class='oe_follower_title_box'>
|
||||
<h4 class='oe_follower_title'>Followers</h4>
|
||||
@@ -40,12 +46,14 @@
|
||||
Template used to display message subtypes of a follower subscription
|
||||
-->
|
||||
<t t-name="mail.followers.subtype">
|
||||
<table class='oe_subtype'>
|
||||
<tr>
|
||||
<td width="10%"><input type="checkbox" t-att-checked="record.followed" t-att-id="'input_mail_followers_subtype_'+record.id" t-att-data-id="record.id" t-att-name="record.name" class="oe_msg_subtype_check"/></td>
|
||||
<td><label t-att-for="'input_mail_followers_subtype_'+record.id"><t t-raw="record.name"/></label></td>
|
||||
</tr>
|
||||
</table>
|
||||
<li class='oe_subtype'>
|
||||
<table>
|
||||
<tr>
|
||||
<td width ="10%"><input type="checkbox" t-att-checked="record.followed" t-att-id="'input_mail_followers_subtype_'+record.id" t-att-data-id="record.id" t-att-name="record.name" class="oe_msg_subtype_check"/></td>
|
||||
<td><label t-att-for="'input_mail_followers_subtype_'+record.id"><t t-raw="record.name"/></label></td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
<t t-name="mail.followers.show_more">
|
||||
|
||||
Reference in New Issue
Block a user