From d2fea52c56797ec2c4f07651d33b57cb0ca596b4 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 3 Jan 2011 16:38:13 -0800 Subject: [PATCH] bug 7823: pass null to listMidMenuItems() when a page doesn't have refresh data binding function. --- ui/scripts/cloud.core.js | 2 +- ui/scripts/cloud.core.resource.js | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ui/scripts/cloud.core.js b/ui/scripts/cloud.core.js index a99a2e72daa..45607b6c859 100644 --- a/ui/scripts/cloud.core.js +++ b/ui/scripts/cloud.core.js @@ -1054,7 +1054,7 @@ function listMidMenuItems(commandString, getSearchParamsFn, jsonResponse1, jsonR function bindAndListMidMenuItems($leftmenu, commandString, getSearchParamsFn, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu) { $leftmenu.bind("click", function(event) { selectLeftSubMenu($(this)); - listMidMenuItems(commandString, getSearchParamsFn, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, $(this).attr("id")); + listMidMenuItems(commandString, getSearchParamsFn, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, $(this).attr("id"), null); return false; }); } diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js index 9abe8cabbb3..d725138c52b 100644 --- a/ui/scripts/cloud.core.resource.js +++ b/ui/scripts/cloud.core.resource.js @@ -213,25 +213,13 @@ function buildZoneTree() { } return false; }); - - /* - $("#leftmenu_cluster_node_template").unbind("click").bind("click", function(event) { - selectRowInZoneTree($(this).find("#cluster_header")); - - hostClearRightPanel(); - var objCluster = $(this).data("jsonObj"); - listMidMenuItems(("listHosts&type=Routing&clusterid="+objCluster.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+objCluster.id)); - - return false; - }); - */ - + $("#leftmenu_host_node_template").unbind("click").bind("click", function(event) { selectRowInZoneTree($(this).find("#host_header")); hostClearRightPanel(); var clusterObj = $(this).data("clusterObj"); - listMidMenuItems(("listHosts&type=Routing&clusterid="+clusterObj.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+clusterObj.id+"_host")); + listMidMenuItems(("listHosts&type=Routing&clusterid="+clusterObj.id), hostGetSearchParams, "listhostsresponse", "host", "jsp/host.jsp", afterLoadHostJSP, hostToMidmenu, hostToRightPanel, getMidmenuId, false, ("cluster_"+clusterObj.id+"_host"), null); return false; });