new UI - ISO page - localize Add ISO dialog, Copy ISO dialog, Create VM from ISO dialog.

This commit is contained in:
Jessica Wang 2010-10-03 20:47:52 -07:00
parent 12db8ca613
commit 23e9508b52
3 changed files with 36 additions and 63 deletions

View File

@ -33,5 +33,11 @@ template.limit = Template Limit
please.confirm.you.want.to.disable.account.that.will.prevent.account.access.to.the.cloud.and.shut.down.all.existing.virtual.machines = Please confirm you want to disable account that will prevent account access to the cloud and shut down all existing virtual machines.
please.confirm.you.want.to.lock.account.that.will.prevent.account.access.to.the.cloud = Please confirm you want to lock account that will prevent account access to the cloud.
please.confirm.you.want.to.enable.account = Please confirm you want to enable account.
URL = URL
zone = Zone
bootable = Bootable
group = Group
disk.offering = Disk Offering
copy.ISO.to = Copy ISO to

View File

@ -160,49 +160,39 @@
<!-- ISO detail panel (end) -->
<!-- Add ISO Dialog (begin) -->
<div id="dialog_add_iso" title="Add ISO" style="display:none">
<p>Please enter the following data to create your new ISO</p>
<div id="dialog_add_iso" title="Add ISO" style="display:none">
<div class="dialog_formcontent">
<form action="#" method="post" id="form2">
<ol>
<li>
<label for="user_name">Name:</label>
<label><%=t.t("name")%>:</label>
<input class="text" type="text" name="add_iso_name" id="add_iso_name" style="width:250px"/>
<div id="add_iso_name_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
</li>
<li>
<label for="user_name">Display Text:</label>
<label><%=t.t("display.text")%>:</label>
<input class="text" type="text" name="add_iso_display_text" id="add_iso_display_text" style="width:250px"/>
<div id="add_iso_display_text_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
</li>
<li>
<label for="user_name">URL:</label>
<label><%=t.t("URL")%>:</label>
<input class="text" type="text" name="add_iso_url" id="add_iso_url" style="width:250px"/>
<div id="add_iso_url_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
</li>
<li>
<label>Zone:</label>
<label><%=t.t("zone")%>:</label>
<select class="select" id="add_iso_zone">
</select>
</li>
<!--
</li>
<li>
<label>Public?:</label>
<select class="select" id="add_iso_public">
<option value="false">No</option>
<option value="true">Yes</option>
</select>
</li>
-->
<li>
<label for="add_iso_public">Bootable:</label>
<label for="add_iso_public"><%=t.t("bootable")%>:</label>
<select class="select" name="add_iso_bootable" id="add_iso_bootable">
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</li>
<li>
<label for="add_iso_os_type">OS Type:</label>
<label for="add_iso_os_type"><%=t.t("os.type")%>:</label>
<select class="select" name="add_iso_os_type" id="add_iso_os_type">
</select>
</li>
@ -213,13 +203,15 @@
<!-- Add ISO Dialog (end) -->
<!-- Copy ISO Dialog (begin) -->
<div id="dialog_copy_iso" title="Copy ISO" style="display:none">
<p>Copy ISO <b id="copy_iso_name_text">XXX</b> from zone <b id="copy_iso_source_zone_text">XXX</b> to</p>
<div id="dialog_copy_iso" title="Copy ISO" style="display:none">
<p>
<%=t.t("copy.ISO.to")%>:
</p>
<div class="dialog_formcontent">
<form action="#" method="post" id="form4">
<ol>
<li>
<label>Zone:</label>
<label><%=t.t("zone")%>:</label>
<select class="select" id="copy_iso_zone">
<option value=""></option>
</select>
@ -232,28 +224,27 @@
<!-- Copy ISO Dialog (end) -->
<!-- Create VM from ISO (begin) -->
<div id="dialog_create_vm_from_iso" title="Create VM from ISO" style="display:none">
<p>Create VM from ISO <b id="p_name">xxx</b></p>
<div id="dialog_create_vm_from_iso" title="Create VM from ISO" style="display:none">
<div class="dialog_formcontent">
<form action="#" method="post" id="form5">
<ol>
<li>
<label>Name:</label>
<label><%=t.t("name")%>:</label>
<input class="text" type="text" id="name"/>
<div id="name_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
</li>
<li>
<label>Group:</label>
<label><%=t.t("group")%>:</label>
<input class="text" type="text" id="group"/>
<div id="group_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
</li>
<li>
<label>Service Offering:</label>
<label><%=t.t("service.offering")%>:</label>
<select class="select" id="service_offering">
</select>
</li>
<li>
<label>Disk Offering:</label>
<label><%=t.t("disk.offering")%>:</label>
<select class="select" id="disk_offering">
</select>
</li>

View File

@ -98,7 +98,7 @@ function afterLoadIsoJSP() {
var zones = json.listzonesresponse.zone;
if (zones != null && zones.length > 0) {
for (var i = 0; i < zones.length; i++) {
addIsoZoneField.append("<option value='" + zones[i].id + "'>" + sanitizeXSS(zones[i].name) + "</option>");
addIsoZoneField.append("<option value='" + zones[i].id + "'>" + fromdb(zones[i].name) + "</option>");
g_zoneIds.push(zones[i].id);
g_zoneNames.push(zones[i].name);
}
@ -115,7 +115,7 @@ function afterLoadIsoJSP() {
var osTypeDropDownAdd = $("#dialog_add_iso #add_iso_os_type").empty();
var osTypeDropdownEdit = $detailsTab.find("#ostypename_edit").empty();
for (var i = 0; i < types.length; i++) {
var html = "<option value='" + types[i].id + "'>" + types[i].description + "</option>";
var html = "<option value='" + types[i].id + "'>" + fromdb(types[i].description) + "</option>";
osTypeDropDownAdd.append(html);
osTypeDropdownEdit.append(html);
}
@ -131,7 +131,7 @@ function afterLoadIsoJSP() {
if(items != null && items.length > 0 ) {
var serviceOfferingField = $("#dialog_create_vm_from_iso #service_offering").empty();
for(var i = 0; i < items.length; i++)
serviceOfferingField.append("<option value='" + items[i].id + "'>" + sanitizeXSS(items[i].name) + "</option>");
serviceOfferingField.append("<option value='" + items[i].id + "'>" + fromdb(items[i].name) + "</option>");
}
}
});
@ -144,7 +144,7 @@ function afterLoadIsoJSP() {
if(items != null && items.length > 0 ) {
var diskOfferingField = $("#dialog_create_vm_from_iso #disk_offering").empty();
for(var i = 0; i < items.length; i++)
diskOfferingField.append("<option value='" + items[i].id + "'>" + sanitizeXSS(items[i].name) + "</option>");
diskOfferingField.append("<option value='" + items[i].id + "'>" + fromdb(items[i].name) + "</option>");
}
}
@ -153,25 +153,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,
modal: true,
zIndex: 2000
}));
activateDialog($("#dialog_create_vm_from_iso").dialog({
width:300,
autoOpen: false,
modal: true,
zIndex: 2000
}));
activateDialog($("#dialog_add_iso").dialog({
width:450,
autoOpen: false,
modal: true,
zIndex: 2000
}));
initDialog("dialog_copy_iso", 300);
initDialog("dialog_create_vm_from_iso", 450);
initDialog("dialog_add_iso", 450);
}
function isoGetMidmenuId(jsonObj) {
@ -385,15 +369,9 @@ function doCopyIso($actionLink, listAPIMap, $detailsTab) {
var jsonObj = $detailsTab.data("jsonObj");
var id = jsonObj.id;
var name = jsonObj.name;
var sourceZoneId = jsonObj.zoneid;
populateZoneFieldExcludeSourceZone($("#dialog_copy_iso #copy_iso_zone"), sourceZoneId);
$("#dialog_copy_iso #copy_iso_name_text").text(name); //ISO name
var sourceZoneName = jsonObj.zonename;
$("#dialog_copy_iso #copy_iso_source_zone_text").text(sourceZoneName); // source zone
var sourceZoneId = jsonObj.zoneid;
populateZoneFieldExcludeSourceZone($("#dialog_copy_iso #copy_iso_zone"), sourceZoneId);
$("#dialog_copy_iso")
.dialog('option', 'buttons', {
"OK": function() {
@ -419,11 +397,9 @@ function doCreateVMFromIso($actionLink, listAPIMap, $detailsTab) {
var jsonObj = $detailsTab.data("jsonObj");
var id = jsonObj.id;
var name = jsonObj.name;
var zoneId = jsonObj.zoneid;
var zoneId = jsonObj.zoneid;
var createVmDialog = $("#dialog_create_vm_from_iso");
createVmDialog.find("#p_name").text(name);
createVmDialog
.dialog('option', 'buttons', {
"Create": function() {