From b732327fce35bdcf1b247a42db64815eba40dcbf Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Sun, 3 Oct 2010 18:03:00 -0700 Subject: [PATCH] new UI - ISO page - add cross zones field. localize delete ISO dialog. --- .../classes/resources/resource.properties | 2 ++ ui/new/jsp/iso.jsp | 23 +++++++++++++++++++ ui/new/scripts/cloud.core2.iso.js | 21 +++++++++-------- 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a/client/WEB-INF/classes/resources/resource.properties b/client/WEB-INF/classes/resources/resource.properties index 24e94a0a1a6..27da32e667e 100644 --- a/client/WEB-INF/classes/resources/resource.properties +++ b/client/WEB-INF/classes/resources/resource.properties @@ -20,4 +20,6 @@ password.enabled = Password Enabled please.confirm.you.want.to.change.the.root.password.for.the.virtual.machine = Please confirm you want to change the ROOT password for the virtual machine please.confirm.you.want.to.enable.HA.for.your.virtual.machine.once.HA.is.enabled.your.virtual.machine.will.be.automatically.restarted.in.the.event.it.is.detected.to.have.failed = Please confirm you want to enable HA for your virtual machine. Once HA is enabled, your virtual machine will be automatically restarted in the event it is detected to have failed. please.confirm.you.want.to.disable.HA.for.the.virtual.machine.once.HA.is.disabled.the.virtual.machine.will.no.longer.be.automatically.restarted.in.the.event.of.a.failure = Please confirm you want to disable HA for the virtual machine. Once HA is disabled, the virtual machine will no longer be be automatically restarted in the event of a failure. +the.ISO.is.used.by.all.zones.please.confirm.you.want.to.delete.it.from.all.zones = The ISO is used by all zones. Please confirm you want to delete it from all zones. +please.confirm.you.want.to.delete.the.ISO = Please confirm you want to delete the ISO diff --git a/ui/new/jsp/iso.jsp b/ui/new/jsp/iso.jsp index b0105e68256..11cdc4ef031 100644 --- a/ui/new/jsp/iso.jsp +++ b/ui/new/jsp/iso.jsp @@ -140,6 +140,16 @@ +
+
+
+ <%=t.t("crossZones")%>:
+
+
+
+
+
+
@@ -252,3 +262,16 @@
+ + + + + diff --git a/ui/new/scripts/cloud.core2.iso.js b/ui/new/scripts/cloud.core2.iso.js index 65fddf021a9..f985fefa956 100644 --- a/ui/new/scripts/cloud.core2.iso.js +++ b/ui/new/scripts/cloud.core2.iso.js @@ -151,6 +151,9 @@ function afterLoadIsoJSP() { }); //initialize dialog box *** + initDialog("dialog_confirmation_delete_iso_all_zones"); + initDialog("dialog_confirmation_delete_iso"); + activateDialog($("#dialog_copy_iso").dialog({ width:300, autoOpen: false, @@ -213,13 +216,14 @@ function isoJsonToDetailsTab(jsonObj) { if(jsonObj.size != null) $detailsTab.find("#size").text(convertBytes(parseInt(jsonObj.size))); - + var status = "Ready"; if (jsonObj.isready == "false") status = jsonObj.isostatus; $detailsTab.find("#status").text(status); - - setBooleanField(jsonObj.bootable, $detailsTab.find("#bootable")); + + setBooleanField(jsonObj.bootable, $detailsTab.find("#bootable")); + setBooleanField(jsonObj.crossZones, $detailsTab.find("#crossZones")); setDateField(jsonObj.created, $detailsTab.find("#created")); @@ -348,14 +352,13 @@ function doDeleteIso($actionLink, listAPIMap, $detailsTab) { if (zoneId != null) moreCriteria.push("&zoneid="+zoneId); - var htmlMsg; + var $dialog1; if(jsonObj.crossZones == "true") - htmlMsg = "

ISO "+name+" is used by all zones. Please confirm you want to delete it from all zones.

"; + $dialog1 = $("#dialog_confirmation_delete_iso_all_zones"); else - htmlMsg = "

Please confirm you want to delete ISO "+name+".

"; - - $("#dialog_confirmation") - .html(htmlMsg) + $dialog1 = $("#dialog_confirmation_delete_iso"); + + $dialog1 .dialog('option', 'buttons', { "Confirm": function() { $(this).dialog("close");