Refresh button - implement refresh button on instance page, volume page, snapshot page, IP address page, template page, ISO page, account page, event page, alert page, virtual router page, system VM page, disk offering page, service offering page.

This commit is contained in:
Jessica Wang 2010-11-29 11:54:06 -08:00
parent 385054fccf
commit 28e338ff7e
2 changed files with 13 additions and 3 deletions

View File

@ -55,7 +55,7 @@ $(document).ready(function() {
});
$("#leftmenu_account").bind("click", function(event) {
if (selectLeftMenu($(this))) {
listMidMenuItems("listAccounts", "listaccountsresponse", "account", "jsp/account.jsp", afterLoadAccountJSP, accountToMidmenu, accountToRightPanel, getMidmenuId, false);
listMidMenuItems("listAccounts", "listaccountsresponse", "account", "jsp/account.jsp", afterLoadAccountJSP, accountToMidmenu, accountToRightPanel, getMidmenuId, false, "leftmenu_account");
}
return false;
});
@ -192,6 +192,14 @@ $(document).ready(function() {
return;
}
// refresh button
$("#refresh_link").bind("click", function(event) {
var leftmenuId = $("#right_panel").data("leftmenuId");
if(leftmenuId != null && leftmenuId.length > 0)
$("#"+leftmenuId).click();
return false;
});
// Initialize help drop down dialog
$("#help_link").bind("click", function(event) {
$("#help_dropdown_dialog").show();

View File

@ -975,12 +975,14 @@ function listMidMenuItems2(commandString, jsonResponse1, jsonResponse2, toMidmen
return count;
}
function listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu) {
function listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, leftmenuId) {
clearMiddleMenu();
showMiddleMenu();
$("#midmenu_container").hide();
$("#midmenu_spinning_wheel").show();
$("#right_panel").data("leftmenuId", leftmenuId);
$("#right_panel").load(rightPanelJSP, function(){
var $actionLink = $("#right_panel_content #tab_content_details #action_link");
$actionLink.bind("mouseover", function(event) {
@ -1001,7 +1003,7 @@ function listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPane
function bindAndListMidMenuItems($leftmenu, commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu) {
$leftmenu.bind("click", function(event) {
selectLeftSubMenu($(this));
listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu);
listMidMenuItems(commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn, isMultipleSelectionInMidMenu, $(this).attr("id"));
return false;
});
}