From 08592da39ed07e1335bbb5f0f40aa11fce4bc9c8 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 13 Sep 2011 16:27:03 -0700 Subject: [PATCH] cloudStack - VM Wizard - fix a bug that comes and goes: "$soTemplate is undefined" --- ui/scripts/cloud.core.instance.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/ui/scripts/cloud.core.instance.js b/ui/scripts/cloud.core.instance.js index 53b56f63346..c98d54fb444 100755 --- a/ui/scripts/cloud.core.instance.js +++ b/ui/scripts/cloud.core.instance.js @@ -103,21 +103,16 @@ function instanceBuildSubMenu2(label, commandString) { } var $doTemplateNo, $doTemplateCustom,$doTemplateExisting, $soTemplate; -var init = false; var $selectedVmWizardTemplate; var osTypeMap = {}; function afterLoadInstanceJSP() { $("#right_panel_content").data("clearRightPanelFn", vmClearRightPanel); - - if (!init) { - //initialize VM Wizard - $doTemplateNo = $("#vm_popup_disk_offering_template_no"); - $doTemplateCustom = $("#vm_popup_disk_offering_template_custom"); - $doTemplateExisting = $("#vm_popup_disk_offering_template_existing"); - $soTemplate = $("#vm_popup_service_offering_template"); - init = true; - } - + + $doTemplateNo = $("#vm_popup_disk_offering_template_no"); + $doTemplateCustom = $("#vm_popup_disk_offering_template_custom"); + $doTemplateExisting = $("#vm_popup_disk_offering_template_existing"); + $soTemplate = $("#vm_popup_service_offering_template"); + initVMWizard(); bindStartVMButton(); bindStopVMButton();