Hi Community,
There is a js file called list_view.js in server/addons/web/static/src/js/views.
Inside of it, we have:
ListView.List = Class.extend({
init: function (group, opts) {
this.$current = $('<tbody>')
.delegate('input[readonly=readonly]', 'click', function (e) {
e.preventDefault();
})
.delegate('td.o_list_record_delete', 'click', function (e) {
e.stopPropagation();
var $row = $(e.target).closest('tr');
$(self).trigger('deleted', [[self.row_id($row)]]);
// IE Edge go crazy when we use confirm dialog and remove the focused element
if(document.hasFocus && !document.hasFocus()) {
$('<input />').appendTo('body').focus().remove();
}
})
},
Can you tell me how can i inherit the listView.List and add extra code to the .delegate('td.o_list_record_delete', 'click', function (e) {..} section ?
Thank you.