@@ -504,8 +504,8 @@ ListRenderer.include({
|
||||
var $row = this._super.apply(this, arguments);
|
||||
if (this.addTrashIcon) {
|
||||
var $icon = this.isMany2Many ?
|
||||
$('<button>', {class: 'fa fa-times o_list_record_remove', name: 'unlink', 'aria-label': _t('Unlink row ') + (index+1)}) :
|
||||
$('<button>', {class: 'fa fa-trash-o o_list_record_remove', name: 'delete', 'aria-label': _t('Delete row ') + (index+1)});
|
||||
$('<button>', {class: 'fa fa-times', name: 'unlink', 'aria-label': _t('Unlink row ') + (index+1)}) :
|
||||
$('<button>', {class: 'fa fa-trash-o', name: 'delete', 'aria-label': _t('Delete row ') + (index+1)});
|
||||
var $td = $('<td>', {class: 'o_list_record_remove'}).append($icon);
|
||||
$row.append($td);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
width: 1px; // to prevent the column to expand
|
||||
}
|
||||
|
||||
.o_list_record_delete_btn {
|
||||
.o_list_record_remove button {
|
||||
padding: 0px;
|
||||
background-style: none;
|
||||
border-style: none;
|
||||
|
||||
@@ -3958,7 +3958,7 @@ QUnit.module('relational_fields', {
|
||||
|
||||
form.$('td.o_list_record_remove button').first().click();
|
||||
|
||||
assert.strictEqual(form.$('td.o_list_record_remove i').length, 1,
|
||||
assert.strictEqual(form.$('td.o_list_record_remove button').length, 1,
|
||||
"should have 1 remove button (a record is supposed to have been unlinked)");
|
||||
|
||||
// save and check that the correct command has been generated
|
||||
@@ -4004,7 +4004,7 @@ QUnit.module('relational_fields', {
|
||||
|
||||
form.$('td.o_list_record_remove button').first().click();
|
||||
|
||||
assert.strictEqual(form.$('td.o_list_record_remove i').length, 1,
|
||||
assert.strictEqual(form.$('td.o_list_record_remove button').length, 1,
|
||||
"should have 1 remove button (a record is supposed to have been deleted)");
|
||||
|
||||
// save and check that the correct command has been generated
|
||||
@@ -9056,7 +9056,7 @@ QUnit.module('relational_fields', {
|
||||
'display_name of first subrecord should be the one in DB');
|
||||
assert.ok(form.$('.o_list_record_remove').length,
|
||||
'delete icon should be visible in edit');
|
||||
assert.ok(form.$('td.o_list_record_remove i').first().hasClass('fa fa-times'),
|
||||
assert.ok(form.$('td.o_list_record_remove button').first().hasClass('fa fa-times'),
|
||||
"should have X icons to remove (unlink) records");
|
||||
assert.ok(form.$('.o_field_x2many_list_row_add').length,
|
||||
'"Add an item" should not visible in edit');
|
||||
|
||||
Reference in New Issue
Block a user