domain tree - clicking between domain treenode won't reload domain.jsp.

This commit is contained in:
Jessica Wang 2010-12-16 19:58:22 -08:00
parent cde8a0a8d4
commit ce4ad3993a
4 changed files with 12 additions and 19 deletions

View File

@ -39,8 +39,7 @@
<p>Loading &hellip;</p>
</div>
</div>
<div class="grid_container" id="domain_grid_container">
<div class="grid_container">
<div class="grid_header">
<div id="grid_header_title" class="grid_header_title">(title)</div>
<div id="action_link" class="grid_actionbox">

View File

@ -210,15 +210,10 @@ function initAddDomainDialog() {
}
function domainToRightPanel($leftmenuItem1) {
if($("#domain_grid_container").length == 0) { //domain.jsp is not loaded in right panel
if(currentRightPanelJSP != "jsp/domain.jsp") {
$("#right_panel").load("jsp/domain.jsp", function(){
currentRightPanelJSP = "jsp/domain.jsp";
afterLoadDomainJSP();
//switch between different tabs
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);
domainToRightPanel2($leftmenuItem1);
});
}

View File

@ -140,8 +140,9 @@ $(document).ready(function() {
$("#right_panel").data("onRefreshFn", function() {
$("#leftmenu_global_setting").click();
});
if ("jsp/globalsetting.jsp" != currentContext) {
$("#right_panel").load("jsp/globalsetting.jsp", function(){
if (currentRightPanelJSP != "jsp/globalsetting.jsp") {
$("#right_panel").load("jsp/globalsetting.jsp", function(){
currentRightPanelJSP = "jsp/globalsetting.jsp";
var $actionLink = $("#right_panel_content #tab_content_details #action_link");
$actionLink.bind("mouseover", function(event) {
$(this).find("#action_menu").show();
@ -150,10 +151,8 @@ $(document).ready(function() {
$actionLink.bind("mouseout", function(event) {
$(this).find("#action_menu").hide();
return false;
});
afterLoadGlobalSettingJSP();
currentContext = "jsp/globalsetting.jsp";
});
afterLoadGlobalSettingJSP();
});
} else {
populateGlobalSettingGrid();

View File

@ -997,7 +997,7 @@ function listMidMenuItems2(commandString, getSearchParamsFn, jsonResponse1, json
}
var currentLeftMenuId;
var currentContext = null;
var currentRightPanelJSP = null;
function listMidMenuItems(commandString, getSearchParamsFn, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, leftmenuId) {
clearMiddleMenu();
showMiddleMenu();
@ -1009,8 +1009,9 @@ function listMidMenuItems(commandString, getSearchParamsFn, jsonResponse1, jsonR
$("#"+leftmenuId).click();
});
if (rightPanelJSP != currentContext) {
if (currentRightPanelJSP != rightPanelJSP) {
$("#right_panel").load(rightPanelJSP, function(){
currentRightPanelJSP = rightPanelJSP;
var $actionLink = $("#right_panel_content #tab_content_details #action_link");
$actionLink.bind("mouseover", function(event) {
$(this).find("#action_menu").show();
@ -1023,8 +1024,7 @@ function listMidMenuItems(commandString, getSearchParamsFn, jsonResponse1, jsonR
removeDialogs();
clearAddButtonsOnTop();
afterLoadRightPanelJSPFn();
listMidMenuItems2(commandString, getSearchParamsFn, jsonResponse1, jsonResponse2, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, 1);
currentContext = rightPanelJSP;
listMidMenuItems2(commandString, getSearchParamsFn, jsonResponse1, jsonResponse2, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, 1);
});
} else {
listMidMenuItems2(commandString, getSearchParamsFn, jsonResponse1, jsonResponse2, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, 1);