mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-26 06:50:09 +03:00
Feature #2746: Fix Image & Files selectors for languages other than english
This commit is contained in:
parent
13af872dce
commit
82f67e032b
@ -573,18 +573,18 @@ function updateFileInfo(request,file){
|
||||
|
||||
// Listener for edit link for type change
|
||||
$("#div_edit_chg_type_files_link").live("click", function() {
|
||||
var value_str = $(".value_td_type").text();
|
||||
$(".value_td_type").html(
|
||||
'<select id="chg_type_select_files">\
|
||||
<option value="KERNEL">'+tr("Kernel")+'</option>\
|
||||
<option value="RAMDISK">'+tr("Ramdisk")+'</option>\
|
||||
<option value="CONTEXT">'+tr("Context")+'</option>\
|
||||
<option value="KERNEL">KERNEL</option>\
|
||||
<option value="RAMDISK">RAMDISK</option>\
|
||||
<option value="CONTEXT">CONTEXT</option>\
|
||||
</select>');
|
||||
$('option[value="'+value_str+'"]').replaceWith('<option value="'+value_str+'" selected="selected">'+tr(value_str)+'</option>');
|
||||
|
||||
$('#chg_type_select_files').val(OpenNebula.Helper.image_type(file_info.TYPE));
|
||||
});
|
||||
|
||||
$("#chg_type_select_files").live("change", function() {
|
||||
var new_value=$("option:selected", this).text();
|
||||
var new_value = $(this).val();
|
||||
Sunstone.runAction("File.chtype", file_info.ID, new_value);
|
||||
Sunstone.runAction("File.showinfo", file_info.ID);
|
||||
});
|
||||
|
@ -740,35 +740,35 @@ function updateImageInfo(request,img){
|
||||
|
||||
// Listener for edit link for type change
|
||||
$("#div_edit_chg_type_link").live("click", function() {
|
||||
var value_str = $(".value_td_type").text();
|
||||
$(".value_td_type").html(
|
||||
'<select id="chg_type_select">\
|
||||
<option value="OS">'+tr("OS")+'</option>\
|
||||
<option value="CDROM">'+tr("CDROM")+'</option>\
|
||||
<option value="DATABLOCK">'+tr("Datablock")+'</option>\
|
||||
<option value="OS">OS</option>\
|
||||
<option value="CDROM">CDROM</option>\
|
||||
<option value="DATABLOCK">DATABLOCK</option>\
|
||||
</select>');
|
||||
$('option[value="'+value_str+'"]').replaceWith('<option value="'+value_str+'" selected="selected">'+tr(value_str)+'</option>');
|
||||
|
||||
$('#chg_type_select').val(OpenNebula.Helper.image_type(img_info.TYPE));
|
||||
});
|
||||
|
||||
$("#chg_type_select").live("change", function() {
|
||||
var new_value=$("option:selected", this).text();
|
||||
var new_value = $(this).val();
|
||||
|
||||
Sunstone.runAction("Image.chtype", img_info.ID, new_value);
|
||||
Sunstone.runAction("Image.show", img_info.ID);
|
||||
});
|
||||
|
||||
// Listener for edit link for persistency change
|
||||
$("#div_edit_persistency").live("click", function() {
|
||||
var value_str = $(".value_td_persistency").text();
|
||||
$(".value_td_persistency").html(
|
||||
'<select id="persistency_select">\
|
||||
<option value="yes">'+tr("yes")+'</option>\
|
||||
<option value="no">'+tr("no")+'</option>\
|
||||
</select>');
|
||||
$('option[value="'+value_str+'"]').replaceWith('<option value="'+value_str+'" selected="selected">'+tr(value_str)+'</option>');
|
||||
|
||||
$('#persistency_select').val(parseInt(img_info.PERSISTENT) ? "yes" : "no");
|
||||
});
|
||||
|
||||
$("#persistency_select").live("change", function() {
|
||||
var new_value=$("option:selected", this).text();
|
||||
var new_value = $(this).val();
|
||||
|
||||
if (new_value=="yes")
|
||||
Sunstone.runAction("Image.persistent",[img_info.ID]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user