mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
Bug #1886: All dialogs now open with focus on first input
This commit is contained in:
parent
7b56ae8301
commit
a6bddd2163
@ -485,6 +485,8 @@ function popUpCreateClusterDialog(){
|
||||
Sunstone.runAction("ClusterDS.list");
|
||||
$create_cluster_dialog.reveal();
|
||||
|
||||
$("input#name",$create_cluster_dialog).focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1123,6 +1123,7 @@ function popUpCreateDatastoreDialog(){
|
||||
$('select#cluster_id',$create_datastore_dialog).html(clusters_sel());
|
||||
$('select#datastore_cluster_raw',$create_datastore_dialog).html(clusters_sel());
|
||||
$create_datastore_dialog.reveal();
|
||||
$("input#name",$create_datastore_dialog).focus();
|
||||
hide_all($create_datastore_dialog);
|
||||
select_filesystem();
|
||||
}
|
||||
|
@ -403,12 +403,7 @@ var file_buttons = {
|
||||
type: "confirm",
|
||||
layout: "del",
|
||||
text: tr("Delete")
|
||||
},
|
||||
//"File.help" : {
|
||||
// type: "action",
|
||||
// text: '?',
|
||||
// alwaysActive: true
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
var file_info_panel = {
|
||||
@ -664,21 +659,8 @@ function setupCreateFileDialog(){
|
||||
|
||||
var height = Math.floor($(window).height()*0.8); //set height to a percentage of the window
|
||||
|
||||
//Prepare jquery dialog
|
||||
//dialog.dialog({
|
||||
// autoOpen: false,
|
||||
// modal:true,
|
||||
// width: 520,
|
||||
// height: height
|
||||
//});
|
||||
dialog.addClass("reveal-modal large max-height");
|
||||
|
||||
|
||||
//$('#img_tabs',dialog).tabs();
|
||||
//$('button',dialog).button();
|
||||
//$('#datablock_img',dialogs_contextog).attr('disabled','disabled');
|
||||
|
||||
|
||||
$('select#img_type',dialog).change(function(){
|
||||
var value = $(this).val();
|
||||
var context = $create_file_dialog;
|
||||
@ -829,7 +811,6 @@ function setupCreateFileDialog(){
|
||||
|
||||
//Inform complete upload, destroy upload dialog, refresh img list
|
||||
|
||||
//$('div#pb_dialog').dialog('destroy');
|
||||
$('div#pb_dialog').trigger("reveal:close")
|
||||
return false;
|
||||
},
|
||||
@ -947,6 +928,7 @@ function popUpCreateFileDialog(){
|
||||
$('#file_datastore_raw',$create_file_dialog).html(datastores_str);
|
||||
|
||||
$create_file_dialog.reveal();
|
||||
$("input#img_name",$create_file_dialog).focus();
|
||||
}
|
||||
|
||||
// Set the autorefresh interval for the datatable
|
||||
|
@ -578,6 +578,7 @@ function setupCreateGroupDialog(){
|
||||
|
||||
function popUpCreateGroupDialog(){
|
||||
$create_group_dialog.reveal();
|
||||
$("input#name",$create_group_dialog).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -888,16 +888,9 @@ function setupCreateHostDialog(){
|
||||
var dialog = $create_host_dialog;
|
||||
|
||||
dialog.html(create_host_tmpl);
|
||||
//dialog.dialog({
|
||||
// autoOpen: false,
|
||||
// modal: true,
|
||||
// width: 500
|
||||
//});
|
||||
|
||||
dialog.addClass("reveal-modal max-height");
|
||||
|
||||
//$('button',dialog).button();
|
||||
|
||||
|
||||
// Show custom driver input only when custom is selected in selects
|
||||
$('input[name="custom_vmm_mad"],'+
|
||||
'input[name="custom_im_mad"],'+
|
||||
@ -972,6 +965,7 @@ function setupCreateHostDialog(){
|
||||
function popUpCreateHostDialog(){
|
||||
$('#host_cluster_id',$create_host_dialog).html(clusters_sel());
|
||||
$create_host_dialog.reveal();
|
||||
$("input#name",$create_host_dialog).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1230,6 +1230,7 @@ function popUpCreateImageDialog(){
|
||||
$('#img_datastore_raw',$create_image_dialog).html(datastores_str);
|
||||
|
||||
$create_image_dialog.reveal();
|
||||
$("input#img_name",$create_image_dialog).focus();
|
||||
|
||||
$('select#img_datastore').children('option').each(function() {
|
||||
if ($(this).val() == "2")
|
||||
@ -1294,18 +1295,8 @@ function setupImageCloneDialog(){
|
||||
';
|
||||
|
||||
dialog.html(html);
|
||||
|
||||
//Convert into jQuery
|
||||
//dialog.dialog({
|
||||
// autoOpen:false,
|
||||
// width:375,
|
||||
// modal:true,
|
||||
// resizable:false
|
||||
//});
|
||||
dialog.addClass("reveal-modal");
|
||||
|
||||
//$('button',dialog).button();
|
||||
|
||||
$('form',dialog).submit(function(){
|
||||
var name = $('input', this).val();
|
||||
var sel_elems = imageElements();
|
||||
@ -1345,6 +1336,7 @@ function popUpImageCloneDialog(){
|
||||
};
|
||||
|
||||
$(dialog).reveal();
|
||||
$("input[name='name']",dialog).focus();
|
||||
}
|
||||
|
||||
//The DOM is ready at this point
|
||||
|
@ -4213,6 +4213,8 @@ function popUpCreateTemplateDialog(){
|
||||
|
||||
$create_template_dialog.reveal();
|
||||
|
||||
$("input#NAME",$create_template_dialog).focus();
|
||||
|
||||
$('button.refresh').each(function(){
|
||||
this.click();
|
||||
})
|
||||
@ -4924,6 +4926,7 @@ function popUpTemplateCloneDialog(){
|
||||
};
|
||||
|
||||
$(dialog).reveal();
|
||||
$("input[name='name']",dialog).focus();
|
||||
}
|
||||
|
||||
// Set the autorefresh interval for the datatable
|
||||
@ -5121,6 +5124,7 @@ function setupInstantiateTemplateDialog(easy_provision){
|
||||
function popUpInstantiateVMTemplateDialog(easy_provision){
|
||||
setupInstantiateTemplateDialog(easy_provision);
|
||||
$instantiate_vm_template_dialog.reveal();
|
||||
$("input#vm_name",$instantiate_vm_template_dialog).focus();
|
||||
}
|
||||
|
||||
//The DOM is ready at this point
|
||||
|
@ -811,13 +811,6 @@ function setupCreateUserDialog(){
|
||||
var dialog = $create_user_dialog;
|
||||
dialog.html(create_user_tmpl);
|
||||
|
||||
//Prepare jquery dialog
|
||||
//dialog.dialog({
|
||||
// autoOpen: false,
|
||||
// modal:true,
|
||||
// width: 400
|
||||
//});
|
||||
|
||||
dialog.addClass("reveal-modal");
|
||||
|
||||
//$('button',dialog).button();
|
||||
@ -920,18 +913,19 @@ function setupUserQuotasDialog(){
|
||||
}
|
||||
|
||||
function popUpUserQuotasDialog(){
|
||||
popUpQuotasDialog($user_quotas_dialog, 'User', userElements())
|
||||
popUpQuotasDialog($user_quotas_dialog, 'User', userElements());
|
||||
}
|
||||
|
||||
function popUpCreateUserDialog(){
|
||||
$create_user_dialog.reveal();
|
||||
|
||||
$("input#username",$create_user_dialog).focus();
|
||||
}
|
||||
|
||||
|
||||
function popUpUpdatePasswordDialog(){
|
||||
$('#new_password',$update_pw_dialog).val("");
|
||||
$update_pw_dialog.reveal();
|
||||
$("input#new_password",$update_pw_dialog).focus();
|
||||
}
|
||||
|
||||
function popUpChangeAuthenticationDialog(){
|
||||
|
@ -2081,6 +2081,7 @@ function popUpSaveAsDialog(vm_id, disk_id){
|
||||
$('#vm_id',$save_as_dialog).text(vm_id);
|
||||
$('#disk_id',$save_as_dialog).text(disk_id);
|
||||
$save_as_dialog.reveal();
|
||||
$("input#image_name",$save_as_dialog).focus();
|
||||
}
|
||||
|
||||
|
||||
@ -2786,6 +2787,7 @@ function setupSnapshotDialog(){
|
||||
function popUpSnapshotDialog(vm_id){
|
||||
$('#vm_id',$snapshot_dialog).text(vm_id);
|
||||
$snapshot_dialog.reveal();
|
||||
$("input#snapshot_name",$snapshot_dialog).focus();
|
||||
}
|
||||
|
||||
|
||||
@ -3017,6 +3019,7 @@ function setupCreateVMDialog(include_select_image){
|
||||
function popUpCreateVMDialog(include_select_image){
|
||||
setupCreateVMDialog(include_select_image);
|
||||
$create_vm_dialog.reveal();
|
||||
$("input#vm_name",$create_vm_dialog).focus();
|
||||
}
|
||||
|
||||
//Prepares autorefresh
|
||||
|
@ -1479,6 +1479,7 @@ function setupCreateVNetDialog() {
|
||||
|
||||
function popUpCreateVnetDialog() {
|
||||
$create_vn_dialog.reveal();
|
||||
$("input#name",$create_vn_dialog).focus();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1565,6 +1565,8 @@ function popUpQuotasDialog(dialog, resource, sel_elems){
|
||||
$('input[value="vm"]', dialog).click();
|
||||
|
||||
dialog.reveal();
|
||||
|
||||
$("input[name='VMS']",dialog).focus();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user