mirror of https://github.com/OCA/web.git
Merge pull request #1127 from tarteo/11-fix-range-select-internal
[11.0][FIX] web_listview_range_select: Internal selectionpull/1140/head
commit
1252f13294
|
@ -6,7 +6,7 @@
|
||||||
'summary': """
|
'summary': """
|
||||||
Enables selecting a range of records using the shift key
|
Enables selecting a range of records using the shift key
|
||||||
""",
|
""",
|
||||||
'version': '11.0.1.0.0',
|
'version': '11.0.1.0.1',
|
||||||
'category': 'Web',
|
'category': 'Web',
|
||||||
'author': 'Onestein,Odoo Community Association (OCA)',
|
'author': 'Onestein,Odoo Community Association (OCA)',
|
||||||
'website': 'https://github.com/oca/web',
|
'website': 'https://github.com/oca/web',
|
||||||
|
|
|
@ -38,7 +38,7 @@ odoo.define('web_listview_range_select', function (require) {
|
||||||
|
|
||||||
var new_range = this.get_range_selection(start, end);
|
var new_range = this.get_range_selection(start, end);
|
||||||
result.records = result.records.concat(new_range.records);
|
result.records = result.records.concat(new_range.records);
|
||||||
result.ids = result.ids.concat(new_range.ids);
|
result.ids = _.uniq(result.ids.concat(new_range.ids));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
@ -80,9 +80,13 @@ odoo.define('web_listview_range_select', function (require) {
|
||||||
if (selection.ids.indexOf(record_id) != -1)
|
if (selection.ids.indexOf(record_id) != -1)
|
||||||
$(this).find('td.o_list_record_selector input').prop('checked', true);
|
$(this).find('td.o_list_record_selector input').prop('checked', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
//Check input internal
|
//Check input internal
|
||||||
$(self).trigger(
|
this.trigger_up(
|
||||||
'selected', [selection.ids, selection.records, true]);
|
'selection_changed', {
|
||||||
|
'selection': selection.ids
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue