[IMP] Fixed the issue of checkbutton select all/none in tree view.

bzr revid: kbh@bde-desktop-20111024132959-y9b3scfye91nut1c
This commit is contained in:
kbh 2011-10-24 18:59:59 +05:30
parent 2ce07c97c6
commit 3e20652e55
2 changed files with 6 additions and 1 deletions

View File

@ -202,6 +202,11 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
this.$element.html(QWeb.render("ListView", this));
// Head hook
this.$element.find('.all-record-selector').click(function(){
self.$element.find(':checkbox').prop('checked',
self.$element.find('.all-record-selector').prop('checked') || false);
});
this.$element.find('#all_checked').click(this.do_all_checked);
this.$element.find('.oe-list-add')
.click(this.do_add_record)

View File

@ -594,7 +594,7 @@
</th>
</t>
<th t-if="options.selectable" width="1" >
<input type="checkbox" id ="all_checked"/> </th>
<input type="checkbox" class="all-record-selector"/> </th>
<t t-foreach="columns" t-as="column">
<th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)">