Khushboo Bhatt(openerp) has proposed merging
lp:~openerp-dev/openerp-web/trunk-bug-856376-kbh into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
Bug #856376 in OpenERP Web: "right pannel should dbe defoldeld if i select a
record in list"
https://bugs.launchpad.net/openerp-web/+bug/856376
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-856376-kbh/+merge/77681
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-856376-kbh/+merge/77681
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-bug-856376-kbh.
=== modified file 'addons/web/static/src/js/view_list.js'
--- addons/web/static/src/js/view_list.js 2011-09-29 14:50:31 +0000
+++ addons/web/static/src/js/view_list.js 2011-09-30 10:31:33 +0000
@@ -843,17 +843,23 @@
* @returns {Object} object with the keys ``ids`` and ``records``, holding respectively the ids of all selected records and the records themselves.
*/
get_selection: function () {
+ var self = this;
if (!this.options.selectable) {
return [];
}
var records = this.records;
var result = {ids: [], records: []};
- this.$current.find('th.oe-record-selector input:checked')
- .closest('tr').each(function () {
+ var checked_records = this.$current.find('th.oe-record-selector input:checked');
+ checked_records.closest('tr').each(function () {
var record = records.get($(this).data('id'));
result.ids.push(record.get('id'));
result.records.push(record.attributes);
});
+ if (checked_records.length > 0) {
+ this.view.sidebar.do_unfold();
+ }else {
+ this.view.sidebar.do_fold();
+ }
return result;
},
/**
_______________________________________________
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