new UI - localize vm change name dialog, vm change group dialog.

This commit is contained in:
Jessica Wang 2010-10-03 10:31:01 -07:00
parent 777efe9681
commit b40dc27cd7
3 changed files with 55 additions and 57 deletions

View File

@ -2,4 +2,8 @@ please.confirm.you.want.to.detach.an.iso.from.the.virtual.machine = Please confi
please.specify.the.iso.you.wish.to.attach.to.virtual.machine = Please specify the ISO you wish to attach to virtual instance
iso = ISO
no.available.iso = No Available ISO
please.specify.the.new.name.you.want.to.change.for.the.virtual.machine = Please specify the new name you want to change for the virtual instance
instance.name = Instance Name
please.specify.the.new.group.you.want.to.assign.the.virtual.machine.to = Please specify the new group you want to assign the virtual machine to
group.name = Group Name

View File

@ -684,25 +684,7 @@
</div>
</div>
<!-- VM Wizard - disk Offering template (end)-->
<!-- Change Name Dialog -->
<div id="dialog_change_name" title="Change Name" style="display: none">
<p>
Please specify the new name you want to change for virtual instance.
</p>
<div class="dialog_formcontent">
<form action="#" method="post" id="form_acquire">
<ol>
<li>
<label for="user_name">
Instance Name:</label>
<input class="text" type="text" name="change_instance_name" id="change_instance_name" />
<div id="change_instance_name_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
</div>
</li>
</ol>
</form>
</div>
</div>
<!-- Change Service Offering Dialog -->
<div id="dialog_change_service_offering" title="Change Service Offering" style="display: none">
<p>
@ -722,25 +704,7 @@
</form>
</div>
</div>
<!-- Change Group Dialog -->
<div id="dialog_change_group" title="Change Group" style="display: none">
<p>
Please specify the new group you want to assign to your Virtual Instance. If no
such group exists, a new one will be created for you.</p>
<div class="dialog_formcontent">
<form action="#" method="post" id="form_acquire">
<ol>
<li>
<label for="change_group_name">
Group Name:</label>
<input class="text" type="text" name="change_group_name" id="change_group_name" />
<div id="change_group_name_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
</div>
</li>
</ol>
</form>
</div>
</div>
<!-- volume tab template (begin) -->
<div class="grid_container" id="volume_tab_template" style="display: none">
<div class="grid_header">
@ -1043,4 +1007,44 @@
</form>
</div>
</div>
<!-- Change Name Dialog -->
<div id="dialog_change_name" title="Change Name" style="display: none">
<p>
<%=t.t("please.specify.the.new.name.you.want.to.change.for.the.virtual.machine")%>
</p>
<div class="dialog_formcontent">
<form action="#" method="post" id="form_acquire">
<ol>
<li>
<label for="user_name">
<%=t.t("instance.name")%>:</label>
<input class="text" type="text" name="change_instance_name" id="change_instance_name" />
<div id="change_instance_name_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
</div>
</li>
</ol>
</form>
</div>
</div>
<!-- Change Group Dialog -->
<div id="dialog_change_group" title="Change Group" style="display: none">
<p>
<%=t.t("please.specify.the.new.group.you.want.to.assign.the.virtual.machine.to")%>
</p>
<div class="dialog_formcontent">
<form action="#" method="post" id="form_acquire">
<ol>
<li>
<label for="change_group_name">
<%=t.t("group.name")%>:</label>
<input class="text" type="text" name="change_group_name" id="change_group_name" />
<div id="change_group_name_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
</div>
</li>
</ol>
</form>
</div>
</div>
<!-- ***** Dialogs (end) ***** -->

View File

@ -66,13 +66,9 @@ function clickInstanceGroupHeader($arrowIcon) {
var $existingDiskOfferingTemplate = $("#vm_popup_disk_offering_template_existing");
initDialog("dialog_detach_iso_from_vm");
initDialog("dialog_attach_iso");
activateDialog($("#dialog_change_name").dialog({
autoOpen: false,
modal: true,
zIndex: 2000
}));
initDialog("dialog_attach_iso");
initDialog("dialog_change_name");
initDialog("dialog_change_group");
activateDialog($("#dialog_change_service_offering").dialog({
width: 600,
@ -80,13 +76,7 @@ function clickInstanceGroupHeader($arrowIcon) {
modal: true,
zIndex: 2000
}));
activateDialog($("#dialog_change_group").dialog({
autoOpen: false,
modal: true,
zIndex: 2000
}));
activateDialog($("#dialog_create_template").dialog({
width: 400,
autoOpen: false,
@ -815,7 +805,7 @@ function doAttachISO($t, selectedItemsInMidMenu, vmListAPIMap) {
$("#dialog_attach_iso")
.dialog('option', 'buttons', {
"Confirm": function() {
"OK": function() {
$(this).dialog("close");
var isoId = $("#dialog_attach_iso #attach_iso_select").val();
if (isoId == "none") {
@ -837,14 +827,14 @@ function doAttachISO($t, selectedItemsInMidMenu, vmListAPIMap) {
function doDetachISO($t, selectedItemsInMidMenu, vmListAPIMap) {
$("#dialog_detach_iso_from_vm")
.dialog('option', 'buttons', {
"Yes": function() {
"OK": function() {
$(this).dialog("close");
for(var id in selectedItemsInMidMenu) {
var apiCommand = "command=detachIso&virtualmachineid="+id;
doActionForMidMenu(id, $t, apiCommand, vmListAPIMap);
}
},
"No": function() {
"Cancel": function() {
$(this).dialog("close");
}
}).dialog("open");
@ -882,7 +872,7 @@ function doResetPassword($t, selectedItemsInMidMenu, vmListAPIMap) {
function doChangeName($t, selectedItemsInMidMenu, vmListAPIMap) {
$("#dialog_change_name")
.dialog('option', 'buttons', {
"Confirm": function() {
"OK": function() {
var thisDialog = $(this);
thisDialog.dialog("close");
@ -949,7 +939,7 @@ function doChangeService($t, selectedItemsInMidMenu, vmListAPIMap) {
function doChangeGroup($t, selectedItemsInMidMenu, vmListAPIMap) {
$("#dialog_change_group")
.dialog('option', 'buttons', {
"Confirm": function() {
"OK": function() {
var thisDialog = $(this);
thisDialog.dialog("close");