mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
SelfService: small fixes
Add checkboxes to compute creation resource selects. Add ids next to the checkboxes names. Hitting return now submits instead of closing the creation dialogs. Treat the case when description is undefined. (cherry picked from commit 8d18227865885970ffc305a442b46f1eab14f3b9)
This commit is contained in:
parent
75470c6659
commit
516121374a
@ -93,8 +93,8 @@ var create_vm_tmpl ='<form id="create_vm_form" action="">\
|
||||
<input type="text" name="vm_n_times" id="vm_n_times" value="1">\
|
||||
</fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="vm_close_dialog_link">'+tr("Close")+'</button>\
|
||||
<button class="button" id="create_vm" value="VM.create">'+tr("Create")+'</button>\
|
||||
<button type="button" class="vm_close_dialog_link">'+tr("Close")+'</button>\
|
||||
<button type="submit" class="button" id="create_vm" value="VM.create">'+tr("Create")+'</button>\
|
||||
<!--<button class="button" type="reset" id="reset_vm" value="reset">Reset</button>-->\
|
||||
</div>\
|
||||
</div>\
|
||||
@ -695,6 +695,10 @@ function popUpCreateVMDialog(){
|
||||
);
|
||||
|
||||
$('#network_box',dialog).html(net_select);
|
||||
$('#network_box option',dialog).each(function(){
|
||||
$(this).text('☐ '+$(this).text()+' (id:'+$(this).val()+')');
|
||||
});
|
||||
|
||||
|
||||
var image_select = makeSelectOptions(dataTable_images,
|
||||
1,//id_col
|
||||
@ -704,6 +708,10 @@ function popUpCreateVMDialog(){
|
||||
true);
|
||||
|
||||
$('#disk_box',dialog).html(image_select);
|
||||
$('#disk_box option',dialog).each(function(){
|
||||
$(this).text('☐ '+$(this).text()+' (id:'+$(this).val()+')');
|
||||
});
|
||||
|
||||
|
||||
$('#network_box,#disk_box',dialog).change(function(){
|
||||
$(this).val("");
|
||||
@ -713,11 +721,11 @@ function popUpCreateVMDialog(){
|
||||
$('#network_box option,#disk_box option',dialog).click(function(){
|
||||
var clicked = $(this).attr('clicked');
|
||||
if (clicked){//unbold, unmark
|
||||
$(this).text($(this).text().replace(/✓/g,''));
|
||||
$(this).text($(this).text().replace(/☒/g,'☐'));
|
||||
$(this).removeAttr('clicked');
|
||||
}
|
||||
else {//bold,mark
|
||||
$(this).text("✓"+$(this).text());
|
||||
$(this).text($(this).text().replace(/☐/g,'☒'));
|
||||
$(this).attr('clicked','clicked');
|
||||
}
|
||||
return false;
|
||||
|
@ -53,8 +53,8 @@ var create_vn_tmpl =
|
||||
<div class="clear"></div>\
|
||||
</fieldset>\
|
||||
<div class="form_buttons">\
|
||||
<button class="vnet_close_dialog_link">'+tr("Close")+'</button>\
|
||||
<button class="button" id="create_vn" value="Network.create">'+tr("Create")+'</button>\
|
||||
<button type="button" class="vnet_close_dialog_link">'+tr("Close")+'</button>\
|
||||
<button type="submit" class="button" id="create_vn" value="Network.create">'+tr("Create")+'</button>\
|
||||
<!--<button class="button" type="reset" id="reset_vn" value="reset" />-->\
|
||||
</div>\
|
||||
</form>\
|
||||
|
@ -92,8 +92,8 @@ var create_image_tmpl =
|
||||
<div class="img_param">\
|
||||
-->\
|
||||
<div class="form_buttons">\
|
||||
<button class="image_close_dialog_link">'+tr("Close")+'</button>\
|
||||
<button class="button" id="create_image" value="Image.create">'+tr("Create")+'</button>\
|
||||
<button type="button" class="image_close_dialog_link">'+tr("Close")+'</button>\
|
||||
<button type="submit" class="button" id="create_image" value="Image.create">'+tr("Create")+'</button>\
|
||||
<!--<button class="button" type="reset" id="reset_image" value="reset"-->\
|
||||
</div>\
|
||||
</form>\
|
||||
@ -369,7 +369,7 @@ function updateImageInfo(request,img){
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">'+tr("Description")+'</td>\
|
||||
<td class="value_td">'+img_info.DESCRIPTION+'</td>\
|
||||
<td class="value_td">'+(img_info.DESCRIPTION ? img_info.DESCRIPTION : "--")+'</td>\
|
||||
</tr>\
|
||||
<tr>\
|
||||
<td class="key_td">'+tr("Type")+'</td>\
|
||||
|
Loading…
x
Reference in New Issue
Block a user