From 74b464782e5b20f78fec20e7923cb32efd1069ad Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 17 Feb 2011 16:13:01 -0800 Subject: [PATCH] Make Add VM Wizard, Add Zone Wizard draggable. --- ui/scripts/cloud.core.instance.js | 3 ++- ui/scripts/cloud.core.resource.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/scripts/cloud.core.instance.js b/ui/scripts/cloud.core.instance.js index 15fb6da9816..ed68830b2fd 100644 --- a/ui/scripts/cloud.core.instance.js +++ b/ui/scripts/cloud.core.instance.js @@ -333,7 +333,8 @@ var vmPopupTemplatePageSize = 6; //max number of templates in VM wizard var currentStepInVmPopup = 1; function initVMWizard() { $vmPopup = $("#vm_popup"); - + $vmPopup.draggable(); + if (isAdmin() || (getUserPublicTemplateEnabled() == "true")) { $vmPopup.find("#wiz_community").show(); } diff --git a/ui/scripts/cloud.core.resource.js b/ui/scripts/cloud.core.resource.js index 8c4957a58c2..04f92c603ff 100644 --- a/ui/scripts/cloud.core.resource.js +++ b/ui/scripts/cloud.core.resource.js @@ -1079,7 +1079,9 @@ function closeAddZoneWizard() { } function initAddZoneWizard() { - var $addZoneWizard = $("#add_zone_wizard"); + var $addZoneWizard = $("#add_zone_wizard"); + $addZoneWizard.draggable(); + $addZoneWizard.find("#add_zone_public").unbind("change").bind("change", function(event) { if($(this).val() == "true") { //public zone $addZoneWizard.find("#domain_dropdown_container").hide();