new UI - add Zone Pod Wizard - expand zone tree when wizard pops up.

This commit is contained in:
Jessica Wang 2010-11-11 18:01:09 -08:00
parent e79e432807
commit 57657b6103
3 changed files with 15 additions and 14 deletions

View File

@ -152,14 +152,7 @@ $(document).ready(function() {
disableMultipleSelectionInMidMenu();
clearMiddleMenu();
$arrowIcon = $(this).find("#physical_resource_arrow");
if($arrowIcon.hasClass("expanded_close") == true) {
$arrowIcon.removeClass("expanded_close").addClass("expanded_open");
buildZoneTree();
} else {
$arrowIcon.removeClass("expanded_open").addClass("expanded_close");
$("#leftmenu_zone_tree").find("#tree_container").empty();
}
expandOrCollapseZoneTree();
resourceLoadPage("jsp/resource.jsp", null);
return false;

View File

@ -1052,6 +1052,17 @@ function drawBarChart($capacity, percentused) { //percentused == "0.01%" (having
$capacity.find("#bar_chart").removeClass().addClass("db_barbox high").css("width", percentused);
}
function expandOrCollapseZoneTree() {
$arrowIcon = $("#leftmenu_physical_resource").find("#physical_resource_arrow");
if($arrowIcon.hasClass("expanded_close") == true) {
$arrowIcon.removeClass("expanded_close").addClass("expanded_open");
buildZoneTree();
} else {
$arrowIcon.removeClass("expanded_open").addClass("expanded_close");
$("#leftmenu_zone_tree").find("#tree_container").empty();
}
}

View File

@ -348,12 +348,9 @@ function initAddZoneShortcut() {
});
$("#add_zone_shortcut").unbind("click").bind("click", function(event) {
/*
if($("#leftmenu_physical_resource").find("#physical_resource_arrow").hasClass("expanded_close") == true)
$("#leftmenu_physical_resource").click(); //if Physical Resource arrow shows closed (i.e. zonetree is hidden), expand and show zonetree.
*/
expandOrCollapseZoneTree(); //if Physical Resource arrow shows closed (i.e. zonetree is hidden), expand and show zonetree.
//$addZoneWizard.find("#info_container").hide();
openAddZoneWizard();
return false;
});