Merge lp:~openerp-dev/openerp-web/trunk-bug-878108-kbh into lp:openerp-web
Proposed by
Khushboo Bhatt(openerp)
Status: | Merged |
---|---|
Approved by: | Xavier (Open ERP) |
Approved revision: | 1336 |
Merged at revision: | 1356 |
Proposed branch: | lp:~openerp-dev/openerp-web/trunk-bug-878108-kbh |
Merge into: | lp:openerp-web |
Diff against target: |
47 lines (+9/-2) 2 files modified
addons/web/static/src/js/view_list.js (+7/-1) addons/web/static/src/xml/base.xml (+2/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openerp-web/trunk-bug-878108-kbh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xavier (Open ERP) | Pending | ||
Review via email: mp+80296@code.launchpad.net |
This proposal supersedes a proposal from 2011-10-25.
Description of the change
"The issue of checkbutton select all/none in tree view."
To post a comment you must log in.
* Don't use IDs, there's a risk it's going to break with multiple lists present on the screen (and in any case it's not semantically correct). element. find('. oe-record- selector :checkbox')`): there's only ever a single input (a checkbox) in `.oe-record- selector` , so `:checkbox` does not avoid selecting anything which should not be selected, it just makes the code slower.
* The code is short and not expected to be overridden (I'd think), so I'd suggest keeping it inline, not split as a separate method.
* Could you try using .prop() instead of .attr? I'm pretty sure it'd work just as well, and that's what it's for (technically, we're manipulating the "checked" attribute)
* Your setting of the check state looks very debatable, from what I understand it's going to set all checkboxes to the opposite of what the first one is, irrespective of what the checkbox which was just clicked is. So if you check the header checkbox, then uncheck the first row's checkbox, and uncheck the header checkbox… it's going to keep everything checked (and re-check the first row).
* I don't see the point of using `:checkbox` in your selector (in `this.$