new UI - localize detach iso from vm dialog.

This commit is contained in:
Jessica Wang 2010-10-03 09:53:43 -07:00
parent ac82ee7dc2
commit 6baf6d99a3
4 changed files with 21 additions and 6 deletions

View File

@ -1 +1,2 @@
Details = Details please.confirm.you.want.to.detach.an.iso.from.the.virtual.machine = Please confirm you want to detach an ISO from the virtual machine

View File

@ -1036,3 +1036,9 @@
</div> </div>
</div> </div>
<!-- router tab template (end) --> <!-- router tab template (end) -->
<!-- dialogs (begin) -->
<div id="dialog_detach_iso_from_vm" title="Confirmation" style="display:none">
<p><%=t.t("please.confirm.you.want.to.detach.an.iso.from.the.virtual.machine")%></p>
</div>
<!-- dialogs (end) -->

View File

@ -65,6 +65,8 @@ function clickInstanceGroupHeader($arrowIcon) {
var $customDiskOfferingTemplate = $("#vm_popup_disk_offering_template_custom"); var $customDiskOfferingTemplate = $("#vm_popup_disk_offering_template_custom");
var $existingDiskOfferingTemplate = $("#vm_popup_disk_offering_template_existing"); var $existingDiskOfferingTemplate = $("#vm_popup_disk_offering_template_existing");
initDialog("dialog_detach_iso_from_vm");
activateDialog($("#dialog_attach_iso").dialog({ activateDialog($("#dialog_attach_iso").dialog({
width: 600, width: 600,
autoOpen: false, autoOpen: false,
@ -839,17 +841,16 @@ function doAttachISO($t, selectedItemsInMidMenu, vmListAPIMap) {
} }
function doDetachISO($t, selectedItemsInMidMenu, vmListAPIMap) { function doDetachISO($t, selectedItemsInMidMenu, vmListAPIMap) {
$("#dialog_confirmation") $("#dialog_detach_iso_from_vm")
.html("<p>Please confirm you want to detach an ISO from the virtual machine(s)</p>")
.dialog('option', 'buttons', { .dialog('option', 'buttons', {
"Confirm": function() { "Yes": function() {
$(this).dialog("close"); $(this).dialog("close");
for(var id in selectedItemsInMidMenu) { for(var id in selectedItemsInMidMenu) {
var apiCommand = "command=detachIso&virtualmachineid="+id; var apiCommand = "command=detachIso&virtualmachineid="+id;
doActionForMidMenu(id, $t, apiCommand, vmListAPIMap); doActionForMidMenu(id, $t, apiCommand, vmListAPIMap);
} }
}, },
"Cancel": function() { "No": function() {
$(this).dialog("close"); $(this).dialog("close");
} }
}).dialog("open"); }).dialog("open");

View File

@ -743,7 +743,14 @@ function setVmStateInRightPanel(stateValue, $stateField) {
$stateField.text(stateValue).removeClass("green red").addClass("gray"); $stateField.text(stateValue).removeClass("green red").addClass("gray");
} }
function initDialog(elementId) {
$("#"+elementId).dialog({
width: 600,
autoOpen: false,
modal: true,
zIndex: 2000
});
}