new UI - clear midmenu icons (add icon, action icon) when clicking on a different page.

This commit is contained in:
Jessica Wang 2010-09-13 11:05:42 -07:00
parent 1af28db9cd
commit ab05973b18
3 changed files with 11 additions and 4 deletions

View File

@ -105,7 +105,7 @@ long milliseconds = new Date().getTime();
</ul>
</div>
</div>
<div class="actionpanel_button_wrapper" id="add_link" style="display: none">
<div class="actionpanel_button_wrapper" id="midmenu_add_link" style="display: none">
<div class="actionpanel_button">
<div class="actionpanel_button_icons">
<img src="images/addvm_actionicon.png" alt="Add" /></div>

View File

@ -50,9 +50,15 @@ $(document).ready(function() {
$midmenuItem1.data("toRightPanelFn", toRightPanelFn);
}
function clearMidMenu() {
$("#midmenu_action_link").hide();
$("#midmenu_add_link").hide();
}
var $midmenuItem = $("#midmenu_item");
function listMidMenuItems(leftmenuId, apiName, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSP, toMidmenu, toRightPanel) {
$("#"+leftmenuId).bind("click", function(event) {
clearMidMenu();
$("#right_panel").load(rightPanelJSP, function(){
afterLoadRightPanelJSP();
$.ajax({
@ -85,6 +91,7 @@ $(document).ready(function() {
listMidMenuItems("leftmenu_ip", "listPublicIpAddresses", "listpublicipaddressesresponse", "publicipaddress", "jsp/ip_address.jsp", afterLoadIpJSP, ipToMidmenu, ipToRigntPanel);
$("#leftmenu_instance_group_header").bind("click", function(event) {
clearMidMenu();
var $arrowIcon = $(this).find("#arrow_icon");
clickInstanceGroupHeader($arrowIcon);
return false;

View File

@ -484,7 +484,7 @@ function clickInstanceGroupHeader($arrowIcon) {
//***** declaration for volume tab (end) *********************************************************
$("#add_link").show();
$("#midmenu_add_link").show();
if($arrowIcon.hasClass("close") == true) {
$arrowIcon.removeClass("close").addClass("open");
$.ajax({
@ -629,7 +629,7 @@ function clickInstanceGroupHeader($arrowIcon) {
var currentPageInTemplateGridInVmPopup =1;
var selectedTemplateTypeInVmPopup; //selectedTemplateTypeInVmPopup will be set to "featured" when new VM dialog box opens
$("#add_link").unbind("click").bind("click", function(event) {
$("#midmenu_add_link").unbind("click").bind("click", function(event) {
vmWizardOpen();
$.ajax({
data: createURL("command=listZones&available=true"),