From f4fbaf1efae11e8bd3b1a2938ab765d391764a1b Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 24 May 2018 16:56:42 +0200 Subject: [PATCH] [REF] web, *: BS4, use custom BS4 checkbox everywhere Before this commit, Odoo used checkboxes in three different ways: - A simple , mainly in the frontend. The style is browser dependant. - Same as above but with the BS3, checkbox structure. The style is still the same, but the alignement is supposed to be better (which is not always the case). - The Odoo official structure: ```
``` which allows to have a cross-browser checkbox style and correct alignements. The goal after this commit is to only use the BS4 *custom* checkbox structure to achieve the same goal as our official structure (and remove that one): ```
``` /!\ Labels are now required (use a zero-width space if necessary) --- addons/hr_expense/static/src/js/tour.js | 2 +- addons/mail/static/src/xml/chatter.xml | 11 ++- addons/mail/static/src/xml/followers.xml | 19 +++-- addons/mail/static/tests/chatter_tests.js | 2 +- addons/web/static/src/js/core/dom.js | 40 ++++++---- .../static/src/js/fields/abstract_field.js | 12 ++- .../web/static/src/js/fields/basic_fields.js | 13 +++- .../static/src/js/fields/relational_fields.js | 4 +- .../js/views/calendar/calendar_renderer.js | 2 +- .../static/src/js/views/form/form_renderer.js | 4 +- addons/web/static/src/scss/list_view.scss | 2 +- addons/web/static/src/scss/ui_extra.scss | 10 --- addons/web/static/src/xml/base.xml | 25 ++++--- addons/web/static/src/xml/web_calendar.xml | 33 +++++---- .../static/tests/fields/basic_fields_tests.js | 44 +++++------ .../tests/fields/relational_fields_tests.js | 74 +++++++++---------- .../web/static/tests/views/calendar_tests.js | 6 +- addons/web/static/tests/views/form_tests.js | 14 ++-- addons/web/static/tests/views/list_tests.js | 2 +- .../static/src/scss/web_editor.ui.scss | 2 +- addons/web_editor/static/src/xml/ace.xml | 18 +++-- .../test_main_flows/static/src/js/tour.js | 8 +- 22 files changed, 192 insertions(+), 155 deletions(-) diff --git a/addons/hr_expense/static/src/js/tour.js b/addons/hr_expense/static/src/js/tour.js index b5c63c5186a..fdb149f837d 100644 --- a/addons/hr_expense/static/src/js/tour.js +++ b/addons/hr_expense/static/src/js/tour.js @@ -29,7 +29,7 @@ tour.register('hr_expense_tour' , content: _t('

Click on Create Report to create the report.

'), position: 'right', }, { - trigger: '.o_expense_tree .o_checkbox > input[type=checkbox]', + trigger: '.o_expense_tree input[type=checkbox]', content: _t('

Select expenses to submit them to your manager

'), position: 'bottom' }, { diff --git a/addons/mail/static/src/xml/chatter.xml b/addons/mail/static/src/xml/chatter.xml index 86cde67f230..f78f60791e0 100644 --- a/addons/mail/static/src/xml/chatter.xml +++ b/addons/mail/static/src/xml/chatter.xml @@ -28,14 +28,17 @@
-
+
- +
- - ()
diff --git a/addons/mail/static/src/xml/followers.xml b/addons/mail/static/src/xml/followers.xml index bbf51ca5c68..6ae0c6cacb9 100644 --- a/addons/mail/static/src/xml/followers.xml +++ b/addons/mail/static/src/xml/followers.xml @@ -70,15 +70,18 @@ -->