Merge lp:~openerp-dev/openerp-web/7.0-opw-598927-msh into lp:openerp-web/7.0

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-598927-msh
Merge into: lp:openerp-web/7.0
Diff against target: 36 lines (+6/-0)
1 file modified
addons/web/static/src/js/view_list.js (+6/-0)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-598927-msh
Reviewer Review Type Date Requested Status
Olivier Laurent (Acsone) (community) test Approve
Fabien Meghazi (OpenERP) Pending
Xavier (Open ERP) Pending
Review via email: mp+192690@code.launchpad.net

Description of the change

Hello,

Improved the prop of header row checkbox to select all record, it should disabled when there is group by with no data expanded or with no_groupby_leaf.

Demo: Go to Reporting -> Any analysis view with groupby_no_leaf, it shows checkbox in header, checkbox should be disabled until and unless there are row data avaialble in the list, this small usability but makes user confuse, it should also be disabled when group is collapsed(whenthere is no groupby_no_leaf), until group `is expanded there are no records in list so it should not be enabled.

Thanks.

To post a comment you must log in.
Revision history for this message
Olivier Laurent (Acsone) (olivier-laurent) wrote :

This branch clarifies the described situation.
Many thanks to merge it into the target branch...

review: Approve (test)

Unmerged revisions

4035. By Mohammed Shekha(OpenERP)<email address hidden>

[FIX]Improved the prop of header checkbox to select all record, it should disabled when there is group by with no data expanded or with no_groupby_leaf.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_list.js'
2--- addons/web/static/src/js/view_list.js 2013-10-14 15:57:09 +0000
3+++ addons/web/static/src/js/view_list.js 2013-10-25 12:39:04 +0000
4@@ -481,6 +481,9 @@
5 }
6 this._super();
7 },
8+ prop_record_selector: function(value) {
9+ this.$el.find('.oe_list_record_selector').prop('disabled', value);
10+ },
11 /**
12 * Reloads the list view based on the current settings (dataset & al)
13 *
14@@ -1304,6 +1307,7 @@
15 render_groups: function (datagroups) {
16 var self = this;
17 var placeholder = this.make_fragment();
18+ this.view.prop_record_selector(true);
19 _(datagroups).each(function (group) {
20 if (self.children[group.value]) {
21 self.records.proxy(group.value).reset();
22@@ -1321,12 +1325,14 @@
23 if (group.openable && group.length) {
24 $row.click(function (e) {
25 if (!$row.data('open')) {
26+ self.view.prop_record_selector(false);
27 $row.data('open', true)
28 .find('span.ui-icon')
29 .removeClass('ui-icon-triangle-1-e')
30 .addClass('ui-icon-triangle-1-s');
31 child.open(self.point_insertion(e.currentTarget));
32 } else {
33+ self.view.prop_record_selector(true);
34 $row.removeData('open')
35 .find('span.ui-icon')
36 .removeClass('ui-icon-triangle-1-s')