Loading js/dropdown.js +27 −17 Original line number Diff line number Diff line Loading @@ -16,6 +16,14 @@ $(document).on('click', '.custom-dropdown > button', function (event) { event.stopPropagation(); // If there is no caret class, and the button is clicked, // redirect the user to the child link. if (!$(this).find('span').hasClass('caret')) { if ($(this).find('a').length > 0) { window.location.href = $(this).find('a').attr('href'); } } $('.custom-dropdown .dropdown-menu').hide(); if ($(this).hasClass('open')) { $(this).next().hide(); Loading @@ -35,7 +43,9 @@ $(document).click(function (e) { var target = e.target; if (!$(target).is('.custom-dropdown > button') && !$(target).parents().is('.custom-dropdown > button')) { $('.custom-dropdown .dropdown-menu').hide(); } if (!$(target).is('.custom-dropdown > button') && !$(target).parents().is('.custom-dropdown > button')) { $('.custom-dropdown .dropdown-menu').hide(); } }); })(jQuery); templates/system/links--dropbutton--operations.html.twig +43 −41 Original line number Diff line number Diff line Loading @@ -59,9 +59,11 @@ <button class="dropdown-toggle links" type="button"> <span {{ item.attributes.addClass(key|clean_class) }}></span> <span{{ item.text_attributes }}></span> {# <span{{ item.text_attributes }}></span>#} {{ item.link|without(item.link.0) }} {% if links|length > 1 %} <span class="caret"></span> {% endif %} </button> {%- elseif item.text_attributes -%} Loading Loading
js/dropdown.js +27 −17 Original line number Diff line number Diff line Loading @@ -16,6 +16,14 @@ $(document).on('click', '.custom-dropdown > button', function (event) { event.stopPropagation(); // If there is no caret class, and the button is clicked, // redirect the user to the child link. if (!$(this).find('span').hasClass('caret')) { if ($(this).find('a').length > 0) { window.location.href = $(this).find('a').attr('href'); } } $('.custom-dropdown .dropdown-menu').hide(); if ($(this).hasClass('open')) { $(this).next().hide(); Loading @@ -35,7 +43,9 @@ $(document).click(function (e) { var target = e.target; if (!$(target).is('.custom-dropdown > button') && !$(target).parents().is('.custom-dropdown > button')) { $('.custom-dropdown .dropdown-menu').hide(); } if (!$(target).is('.custom-dropdown > button') && !$(target).parents().is('.custom-dropdown > button')) { $('.custom-dropdown .dropdown-menu').hide(); } }); })(jQuery);
templates/system/links--dropbutton--operations.html.twig +43 −41 Original line number Diff line number Diff line Loading @@ -59,9 +59,11 @@ <button class="dropdown-toggle links" type="button"> <span {{ item.attributes.addClass(key|clean_class) }}></span> <span{{ item.text_attributes }}></span> {# <span{{ item.text_attributes }}></span>#} {{ item.link|without(item.link.0) }} {% if links|length > 1 %} <span class="caret"></span> {% endif %} </button> {%- elseif item.text_attributes -%} Loading