domain page - implement refresh button.

This commit is contained in:
Jessica Wang 2010-11-29 14:05:56 -08:00
parent 8b90fd51f8
commit 49d40df2fe
2 changed files with 11 additions and 16 deletions

View File

@ -21,14 +21,6 @@ var defaultRootLevel = 0;
var childParentMap = {}; //map childDomainId to parentDomainId
var domainIdNameMap = {}; //map domainId to domainName
function afterLoadDomainJSP() {
//***** switch between different tabs (begin) ********************************************************************
var tabArray = [$("#tab_details"), $("#tab_resource_limits"), $("#tab_admin_account")];
var tabContentArray = [$("#tab_content_details"), $("#tab_content_resource_limits"), $("#tab_content_admin_account")];
switchBetweenDifferentTabs(tabArray, tabContentArray);
//***** switch between different tabs (end) **********************************************************************
}
function refreshWholeTree(rootDomainId, rootLevel) {
drawRootNode(rootDomainId);
drawTree(rootDomainId, (rootLevel+1), $("#domain_children_container_"+rootDomainId)); //draw the whole tree (under root node)

View File

@ -43,14 +43,17 @@ $(document).ready(function() {
});
$("#leftmenu_domain").bind("click", function(event) {
if (selectLeftMenu($(this), true)) {
hideMiddleMenu();
disableMultipleSelectionInMidMenu();
clearMiddleMenu();
bindEventHandlerToDomainTreeNode();
refreshWholeTree(g_domainid, defaultRootLevel);
}
selectLeftMenu($(this), true);
hideMiddleMenu();
disableMultipleSelectionInMidMenu();
clearMiddleMenu();
$("#right_panel").data("leftmenuId", "leftmenu_domain");
bindEventHandlerToDomainTreeNode();
refreshWholeTree(g_domainid, defaultRootLevel);
return false;
});
$("#leftmenu_account").bind("click", function(event) {