mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
new UI - fix a bug that clicking a submenu will collapse parent menu.
This commit is contained in:
parent
6145ef5593
commit
3c27d0506b
@ -485,9 +485,13 @@ function collapseFirstLevelMenu($firstLevelMenu, $secondLevelMenu) {
|
||||
$secondLevelMenu.hide();
|
||||
}
|
||||
|
||||
function clearLeftMenu() {
|
||||
if($expandedFirstLevelMenu != null && $expandedSecondLevelMenu != null) //collapse other expanded menu if there is.
|
||||
function clearLeftMenu($currentMenu) {
|
||||
//collapse other expanded menu if there is.
|
||||
if($expandedFirstLevelMenu != null && $expandedSecondLevelMenu != null) {
|
||||
//check if the expanded menu is parent/ancestor of $currentMenu. If not, collapse $expandedFirstLevelMenu.
|
||||
if($expandedSecondLevelMenu.find("#"+$currentMenu.attr("id")).length == 0)
|
||||
collapseFirstLevelMenu($expandedFirstLevelMenu, $expandedSecondLevelMenu);
|
||||
}
|
||||
|
||||
$resourceArrowIcon = $("#leftmenu_resource").find("#resource_arrow");
|
||||
if($resourceArrowIcon.hasClass("expanded_open") == true) {
|
||||
@ -799,7 +803,7 @@ function listMidMenuItems(leftmenuId, commandString, jsonResponse1, jsonResponse
|
||||
showMiddleMenu();
|
||||
disableMultipleSelectionInMidMenu();
|
||||
|
||||
clearLeftMenu();
|
||||
clearLeftMenu($(this));
|
||||
clearMiddleMenu();
|
||||
|
||||
$("#right_panel").load(rightPanelJSP, function(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user