From 222c865975235ef0220098d0e866ba71f0504ce4 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 2 Feb 2011 13:10:33 -0800 Subject: [PATCH] bug 8244: Pod page - all dialogs - hide info_container when clicking Submit button. --- ui/scripts/cloud.core.pod.js | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js index 44b2b88350f..b3028bafd91 100644 --- a/ui/scripts/cloud.core.pod.js +++ b/ui/scripts/cloud.core.pod.js @@ -344,7 +344,8 @@ function bindAddClusterButton($leftmenuItem1) { dialogAddCluster.dialog('option', 'buttons', { "Add": function() { var $thisDialog = $(this); - + $thisDialog.find("#info_container").hide(); + var hypervisor = $thisDialog.find("#cluster_hypervisor").val(); var clusterType="CloudManaged"; if(hypervisor == "VMware") @@ -486,20 +487,6 @@ function bindAddHostButton($leftmenuItem1) { dialogAddHost.find("#zone_name").text(fromdb(clusterObj.zonename)); dialogAddHost.find("#pod_name").text(fromdb(clusterObj.podname)); } - - /* - dialogAddHost.find("#host_hypervisor").change(function() { - if($(this).val() == "VMware") { - $('li[input_group="vmware"]', dialogAddHost).show(); - $('li[input_group="general"]', dialogAddHost).hide(); - } else { - $('li[input_group="vmware"]', dialogAddHost).hide(); - $('li[input_group="general"]', dialogAddHost).show(); - } - - refreshClsuterFieldInAddHostDialog(dialogAddHost, podId, clusterId, $(this).val()); - }).change(); - */ refreshClsuterFieldInAddHostDialog(dialogAddHost, podId, clusterId); @@ -509,9 +496,8 @@ function bindAddHostButton($leftmenuItem1) { .dialog('option', 'buttons', { "Add": function() { var $thisDialog = $(this); - - //var hypervisor = $thisDialog.find("#host_hypervisor").val(); - + $thisDialog.find("#info_container").hide(); + // validate values var isValid = true; isValid &= validateDropDownBox("Cluster", $thisDialog.find("#cluster_select"), $thisDialog.find("#cluster_select_errormsg"), false); //required, reset error text @@ -701,6 +687,7 @@ function bindAddPrimaryStorageButton($leftmenuItem1) { .dialog('option', 'buttons', { "Add": function() { var $thisDialog = $(this); + $thisDialog.find("#info_container").hide(); // validate values var protocol = $thisDialog.find("#add_pool_protocol").val();