new UI - left menu - empty zonetree and vm group tree when expand other menu.

This commit is contained in:
Jessica Wang 2010-10-19 09:48:26 -07:00
parent 1e0f2fb436
commit 9e003170c6

View File

@ -482,17 +482,8 @@ function expandFirstLevelMenu($firstLevelMenu, $secondLevelMenu) {
function collapseFirstLevelMenu($firstLevelMenu, $secondLevelMenu) {
$firstLevelMenu.find("#expandable_first_level_arrow").removeClass("open").addClass("close");
$firstLevelMenu.removeClass("highlighted");
$secondLevelMenu.hide();
}
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);
}
$secondLevelMenu.hide();
$resourceArrowIcon = $("#leftmenu_resource").find("#resource_arrow");
if($resourceArrowIcon.hasClass("expanded_open") == true) {
$resourceArrowIcon.removeClass("expanded_open").addClass("expanded_close");
@ -505,6 +496,15 @@ function clearLeftMenu($currentMenu) {
$("#leftmenu_instance_group_container").empty();
}
}
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);
}
}
function clearMiddleMenu() {
$("#midmenu_container").empty();