mirror of
https://github.com/opnsense/core.git
synced 2026-10-12 02:20:36 +00:00
ui: keep sibling submenus expanded
Alternative to always closing sibling submenus which is what the current code is doing
This commit is contained in:
@@ -101,14 +101,16 @@
|
||||
$("#mainmenu").find('[href="#' + $(this).attr('id') + '"]').remove();
|
||||
}
|
||||
});
|
||||
// hide submenu items
|
||||
// hide submenu items when toggling main menu sections
|
||||
$('#mainmenu .list-group-item').click(function(){
|
||||
if($(this).attr('href').substring(0,1) == '#') {
|
||||
$('#mainmenu .list-group-item').each(function(){
|
||||
if ($(this).attr('aria-expanded') == 'true' && $(this).data('parent') != '#mainmenu') {
|
||||
$("#"+$(this).attr('href').substring(1,999)).collapse('hide');
|
||||
}
|
||||
});
|
||||
if ($(this).attr('href').substring(0,1) == '#') {
|
||||
if ($(this).data('parent') == '#mainmenu') {
|
||||
$('#mainmenu .list-group-item').each(function(){
|
||||
if ($(this).attr('aria-expanded') == 'true' && $(this).data('parent') != '#mainmenu') {
|
||||
$("#"+$(this).attr('href').substring(1,999)).collapse('hide');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user