[FIX] web, *: drop o_dropdown_toggler_btnclasses

Drop `o_dropdown_toggler_btn` class in favor of `o_dropdown_toggler`.
o_dropdown_toggler_btn was initially introduced in ~13.3, but it's now
obsolete.
This commit is contained in:
stefanorigano (SRI)
2021-06-18 21:31:32 +02:00
committed by Aaron Bohy
parent bc25afa538
commit 1fb2cd9af7
11 changed files with 17 additions and 13 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ tour.register('totp_admin_disables', {
}
}, {
content: "Open Actions menu",
trigger: 'button.o_dropdown_toggler_btn:contains("Action")'
trigger: 'button.o_dropdown_toggler:contains("Action")'
}, {
content: "Select totp remover",
trigger: 'a.dropdown-item:contains(Disable TOTP on users)'
@@ -36,7 +36,7 @@ tour.register('hr_expense_tour' , {
content: _t('<p>Select expenses to submit them to your manager</p>'),
position: 'bottom'
}, {
trigger: '.o_dropdown_toggler_btn',
trigger: '.o_dropdown_toggler',
extra_trigger: ".o_expense_tree",
content: _t('<p>Click on <b> Action Create Report </b> to submit selected expenses to your manager</p>'),
position: 'right',
@@ -16,7 +16,7 @@
<t t-name="warehouseFilter">
<div id="warehouse_filter" class="btn-group o_dropdown o_stock_report_warehouse_filter"
t-if="displayWarehouseFilter">
<button type="button" class="o_dropdown_toggler_btn btn btn-secondary dropdown-toggle"
<button type="button" class="o_dropdown_toggler btn btn-secondary dropdown-toggle"
data-toggle="dropdown">
<span class="fa fa-home"/> Warehouse: <t t-esc="active_warehouse['name']"/>
</button>
@@ -65,6 +65,10 @@
.o_dropdown {
@extend .dropdown;
&_toggler {
@extend .dropdown-toggle;
}
&_menu {
@extend .dropdown-menu;
@@ -94,7 +98,7 @@
cursor: pointer;
}
button.o_dropdown_toggler, button.o_dropdown_toggler_btn {
button.o_dropdown_toggler {
> span {
min-width: max-content;
}
@@ -193,7 +193,7 @@ var GraphController = AbstractController.extend({
this.groupByMenu.el.classList.add('o_group_by_menu');
}
// Update button classes accordingly to the current mode
const buttons = actionsContainer.querySelectorAll('.o_dropdown_toggler_btn');
const buttons = actionsContainer.querySelectorAll('.o_dropdown_toggler');
for (const button of buttons) {
button.classList.remove('btn-secondary');
if (this.isEmbedded) {
@@ -59,7 +59,7 @@
top: 5px;
right: 10px;
}
.o_dropdown_toggler_btn {
.o_dropdown_toggler {
margin-right: 15px;
}
}
+1 -1
View File
@@ -153,7 +153,7 @@
<t t-name="web.DropdownMenu" owl="1">
<div class="btn-group o_dropdown" t-att-class="{ show: state.open }">
<button type="button"
class="o_dropdown_toggler_btn btn btn-secondary"
class="o_dropdown_toggler btn btn-secondary"
t-attf-class="{{ icon || displayCaret || displayChevron ? 'd-flex align-items-center ' : ''}} {{ displayCaret || displayChevron ? 'pr-1 ' : ''}}"
t-att-aria-expanded="state.open ? 'true' : 'false'"
tabindex="-1"
@@ -3123,7 +3123,7 @@ QUnit.module('fields', {}, function () {
let filterMenuCss = '.o_search_options > .o_filter_menu';
let groupByMenuCss = '.o_search_options > .o_group_by_menu';
await testUtils.dom.click(document.querySelector(`${filterMenuCss} > .o_dropdown_toggler_btn`));
await testUtils.dom.click(document.querySelector(`${filterMenuCss} > .o_dropdown_toggler`));
assert.hasClass(document.querySelector(filterMenuCss), 'show');
assert.isVisible(document.querySelector(`${filterMenuCss} > .dropdown-menu`),
@@ -3132,7 +3132,7 @@ QUnit.module('fields', {}, function () {
assert.isNotVisible(document.querySelector(`${groupByMenuCss} > .dropdown-menu`),
"the Group by dropdown menu should be not visible");
await testUtils.dom.click(document.querySelector(`${groupByMenuCss} > .o_dropdown_toggler_btn`));
await testUtils.dom.click(document.querySelector(`${groupByMenuCss} > .o_dropdown_toggler`));
assert.hasClass(document.querySelector(groupByMenuCss), 'show');
assert.isVisible(document.querySelector(`${groupByMenuCss} > .dropdown-menu`),
"the group by dropdown menu should be visible");
@@ -1800,7 +1800,7 @@ QUnit.module('Views', {
"create button should be invisible");
assert.isVisible($(webClient.el).find('.o_list_button_save'), "save button should be visible");
await testUtils.dom.click($(webClient.el).find('.o_dropdown_toggler_btn:contains("Group By")'));
await testUtils.dom.click($(webClient.el).find('.o_dropdown_toggler:contains("Group By")'));
await testUtils.dom.click($(webClient.el).find('.o_group_by_menu .o_menu_item a:contains("candle")'));
assert.isNotVisible($(webClient.el).find('.o_list_button_add'), "create button should be invisible");
@@ -72,12 +72,12 @@ QUnit.module("ActionManager", (hooks) => {
await testUtils.dom.clickFirst($(webClient.el).find("input.custom-control-input"));
assert.isVisible(
$(webClient.el).find(
'.o_cp_action_menus button.o_dropdown_toggler_btn:contains("Print")'
'.o_cp_action_menus button.o_dropdown_toggler:contains("Print")'
)[0]
);
assert.isVisible(
$(webClient.el).find(
'.o_cp_action_menus button.o_dropdown_toggler_btn:contains("Action")'
'.o_cp_action_menus button.o_dropdown_toggler:contains("Action")'
)[0]
);
});
@@ -48,7 +48,7 @@ tour.register('shop_cart_recovery', {
},
{
content: "click action",
trigger: '.o_dropdown_toggler_btn:contains("Action")',
trigger: '.o_dropdown_toggler:contains("Action")',
},
{
content: "click Send a Cart Recovery Email",