[FIX] web: fix more menu

Issue

	- Install Accounting
	- Resize your window to have the more menu
	- Refresh the page to make the JS working correctly
	- Click on the item on the left of the more menu
	- Do not close the menu just hover the more menu
	=> It doesn't appears (the .show class is on the last <li> child instead of the parent)
	Click on the more menu
	=> It appears but small & with items broken

Cause

	Without the :first, all the more menu dropdown where toggled

Issue

	Add :first to the target to toggle

OPW-2178843

closes odoo/odoo#46553

X-original-commit: 55a4a834461446a070ad06d1b24d67fbc27799a1
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Co-authored-by: aab-odoo <aab@odoo.com>
This commit is contained in:
jvm-odoo
2020-02-28 12:22:43 +00:00
co-authored by aab-odoo
parent e29e2e31f6
commit b8b0a2ac7f
+2 -2
View File
@@ -226,9 +226,9 @@ var Menu = Widget.extend({
var $target = $(ev.currentTarget);
var $opened = $target.siblings('.show');
if ($opened.length) {
$opened.find('[data-toggle="dropdown"]').dropdown('toggle');
$opened.find('[data-toggle="dropdown"]:first').dropdown('toggle');
$opened.removeClass('show');
$target.find('[data-toggle="dropdown"]').dropdown('toggle');
$target.find('[data-toggle="dropdown"]:first').dropdown('toggle');
$target.addClass('show');
}
},