Khushboo Bhatt(openerp) has proposed merging
lp:~openerp-dev/openerp-web/trunk-bug-878108-kbh into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
Bug #878108 in OpenERP Web: "In tree view, wish to have a checkbutton to
select all/none"
https://bugs.launchpad.net/openerp-web/+bug/878108
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-878108-kbh/+merge/80188
"The issue of checkbutton select all/none in tree view."
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-878108-kbh/+merge/80188
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-bug-878108-kbh.
=== modified file 'addons/web/static/src/js/view_list.js'
--- addons/web/static/src/js/view_list.js 2011-10-20 16:22:55 +0000
+++ addons/web/static/src/js/view_list.js 2011-10-24 09:28:24 +0000
@@ -201,8 +201,8 @@
this.setup_columns(this.fields_view.fields, grouped);
this.$element.html(QWeb.render("ListView", this));
-
// Head hook
+ this.$element.find('#all_checked').click(this.do_all_checked);
this.$element.find('.oe-list-add')
.click(this.do_add_record)
.attr('disabled', grouped && this.options.editable);
@@ -269,6 +269,11 @@
this.set_common_sidebar_sections(this.sidebar);
}
},
+
+ do_all_checked:function (ev) {
+ var all_checkbox = this.$element.find('.oe-record-selector :checkbox')
+ all_checkbox.attr('checked', !all_checkbox.attr('checked'));
+ },
/**
* Configures the ListView pager based on the provided dataset's information
*
@@ -650,6 +655,7 @@
$first_header.attr('colspan', parseInt(colspan, 10) + count);
}
// Padding for column titles, footer and data rows
+
var $rows = this.$element
.find('.oe-listview-header-columns, tr:not(thead tr)')
.not(options['except']);
=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml 2011-10-24 08:48:53 +0000
+++ addons/web/static/src/xml/base.xml 2011-10-24 09:28:24 +0000
@@ -579,7 +579,8 @@
<t t-esc="column.string"/>
</th>
</t>
- <th t-if="options.selectable" width="1"/>
+ <th t-if="options.selectable" width="1" >
+ <input type="checkbox" id ="all_checked"/> </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)">
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp