From cd367de19fe3199d3fcf1482473b9ec4f76aabd2 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Sat, 16 Oct 2010 11:36:18 -0700 Subject: [PATCH] new UI - zonetree in left menu - clicking cluster node will populate hosts to middle menu. --- ui/new/scripts/cloud.core2.init.js | 55 +------------------------- ui/new/scripts/cloud.core2.js | 49 +++++++++++++++++++++++ ui/new/scripts/cloud.core2.resource.js | 19 ++++++++- 3 files changed, 68 insertions(+), 55 deletions(-) diff --git a/ui/new/scripts/cloud.core2.init.js b/ui/new/scripts/cloud.core2.init.js index 68c8745312f..b61fd52be30 100644 --- a/ui/new/scripts/cloud.core2.init.js +++ b/ui/new/scripts/cloud.core2.init.js @@ -27,60 +27,7 @@ $(document).ready(function() { return false; }); $("#leftmenu_container").show(); - - var $midmenuItem = $("#midmenu_item"); - function listMidMenuItems(leftmenuId, commandString, jsonResponse1, jsonResponse2, rightPanelJSP, afterLoadRightPanelJSPFn, toMidmenuFn, toRightPanelFn, getMidmenuIdFn) { - $("#"+leftmenuId).bind("click", function(event) { - selectLeftMenu($(this)); - - showMiddleMenu(); - disableMultipleSelectionInMidMenu(); - - clearLeftMenu(); - clearMiddleMenu(); - - $("#right_panel").load(rightPanelJSP, function(){ - $("#right_panel_content #tab_content_details #action_message_box #close_button").bind("click", function(event){ - $(this).parent().hide(); - return false; - }); - - var $actionLink = $("#right_panel_content #tab_content_details #action_link"); - $actionLink.bind("mouseover", function(event) { - $(this).find("#action_menu").show(); - return false; - }); - $actionLink.bind("mouseout", function(event) { - $(this).find("#action_menu").hide(); - return false; - }); - - afterLoadRightPanelJSPFn(); - - $.ajax({ - cache: false, - data: createURL("command="+commandString+"&pagesize="+midmenuItemCount), - dataType: "json", - success: function(json) { - selectedItemsInMidMenu = {}; - var items = json[jsonResponse1][jsonResponse2]; - if(items != null && items.length > 0) { - for(var i=0; i 0) { + for(var i=0; i