diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-03-23 09:42:06 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-03-23 09:46:46 +0100 |
| commit | 8a7b845353155d12c7717be476583fdf61e3e22c (patch) | |
| tree | 8e63b8291872f0ba621a3b687f1cbf341a0f4433 | |
| parent | cdbee48888a9028ed54abc2c764d2b560e0af099 (diff) | |
[FIX] web: correct forward-port of ef540eb006abac0d318f2a708384d125f6203662
Adapt tests and classes
| -rw-r--r-- | addons/web/static/src/js/views/list/list_editable_renderer.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/less/list_view.less | 2 | ||||
| -rw-r--r-- | addons/web/static/tests/fields/relational_fields_tests.js | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/addons/web/static/src/js/views/list/list_editable_renderer.js b/addons/web/static/src/js/views/list/list_editable_renderer.js index 2d9c02b8ebc..9d7555cad19 100644 --- a/addons/web/static/src/js/views/list/list_editable_renderer.js +++ b/addons/web/static/src/js/views/list/list_editable_renderer.js @@ -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); } diff --git a/addons/web/static/src/less/list_view.less b/addons/web/static/src/less/list_view.less index 22e046bf923..c6d81293fbf 100644 --- a/addons/web/static/src/less/list_view.less +++ b/addons/web/static/src/less/list_view.less @@ -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; diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index 6528969bbb7..58be902b217 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -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'); |
