1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #3273: Do not close host dialog after reset

This commit is contained in:
Daniel Molina 2015-01-16 17:52:02 +01:00
parent ae78f39598
commit c1f4046e56

View File

@ -1331,9 +1331,7 @@ function setupCreateHostDialog(){
$create_host_dialog.foundation()
$("#wizard_host_reset_button", $create_host_dialog).on("click", function(){
$('#create_host_dialog').html("");
setupCreateHostDialog();
popUpCreateHostDialog();
resetCreateHostDialog();
})
$(".drivers", $create_host_dialog).hide();
@ -1736,20 +1734,25 @@ function setupCreateHostDialog(){
});
}
function resetCreateHostDialog(){
$create_host_dialog.empty();
setupCreateHostDialog();
$create_host_dialog = $('div#create_host_dialog');
var cluster_id = $('#host_cluster_id .resource_list_select', $create_host_dialog).val();
if (!cluster_id) cluster_id = "-1";
insertSelectOptions('#host_cluster_id', $create_host_dialog, "Cluster", cluster_id, false);
$("input#name", $create_host_dialog).focus();
return false;
}
//Open creation dialogs
function popUpCreateHostDialog(){
$create_host_dialog.foundation('reveal', 'close');
$create_host_dialog.empty();
setupCreateHostDialog();
var cluster_id = $('#host_cluster_id .resource_list_select',$('div#create_host_dialog')).val();
if (!cluster_id) cluster_id = "-1";
insertSelectOptions('#host_cluster_id',$('div#create_host_dialog'), "Cluster", cluster_id, false);
$("#create_host_dialog").foundation('reveal', 'open');
$("input#name",$("#create_host_dialog")).focus();
return false;
resetCreateHostDialog();
$create_host_dialog.foundation('reveal', 'open');
return false;
}
// Call back when individual host history monitoring fails