summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorpka-odoo <pka@odoo.com>2020-05-04 13:03:06 +0000
committerAaron Bohy <aab@odoo.com>2020-05-04 18:15:28 +0000
commit56e63ebae349798d26a61a4c516c2abb66a33329 (patch)
tree01116ee98e87284cf1a31b230aa1f23aca3fd03f /addons/web/static/src/js
parent067e8c88fe12a29fe8d87ba35a892f1c36a01e2e (diff)
[IMP] web: ControlPanel: remove dropdown carets
Part of task 2234547 closes odoo/odoo#49793 Related: odoo/enterprise#10059 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Co-authored-by: Mohammed Shekha <msh@odoo.com> Co-authored-by: Aaron Bohy <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/components/dropdown_menu.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/addons/web/static/src/js/components/dropdown_menu.js b/addons/web/static/src/js/components/dropdown_menu.js
index df7172ae1d4..be1f29629ed 100644
--- a/addons/web/static/src/js/components/dropdown_menu.js
+++ b/addons/web/static/src/js/components/dropdown_menu.js
@@ -34,8 +34,6 @@ odoo.define('web.DropdownMenu', function (require) {
this.dropdownMenu = useRef('dropdown');
this.state = useState({ open: false });
- this.symbol = this.env.device.isMobile ? 'fa fa-chevron-right float-right mt4' : false;
-
useExternalListener(window, 'click', this._onWindowClick);
useExternalListener(window, 'keydown', this._onWindowKeydown);
}
@@ -45,11 +43,22 @@ odoo.define('web.DropdownMenu', function (require) {
//---------------------------------------------------------------------
/**
- * Overriden in case we want to keep the caret style on the button in mobile.
+ * In desktop, by default, we do not display a caret icon next to the
+ * dropdown.
* @returns {boolean}
*/
get displayCaret() {
- return !this.env.device.isMobile;
+ return false;
+ }
+
+ /**
+ * In mobile, by default, we display a chevron icon next to the dropdown
+ * button. Note that when 'displayCaret' is true, we display a caret
+ * instead of a chevron, no matter the value of 'displayChevron'.
+ * @returns {boolean}
+ */
+ get displayChevron() {
+ return this.env.device.isMobile;
}
/**