Issue #0001750: Modification du code javascript pour faire marcher la touche Entree

This commit is contained in:
Aram HARUTYUNYAN 2013-11-12 12:34:01 +00:00
parent d77f57ae8f
commit 0c97c46568
2 changed files with 22 additions and 1 deletions

View File

@ -234,6 +234,15 @@ div#dialog .ui-widget-content { text-align:left; }
$.datepicker.setDefaults( $.datepicker.regional["fr"] );
$('input[name=dateEffetLien]').datepicker({ changeMonth: true, changeYear: true });
$('.ui-dialog').on('keypress', function(event){
var code = (event.keyCode ? event.keyCode : event.which);
if (code == 13)
{
event.preventDefault();
$('.ui-button:contains("Valider")').click();
}
});
$('a#lienDoc').on('click', function(e){
e.preventDefault();
$('div#doc').load($(this).attr('href'));

View File

@ -15,5 +15,17 @@ $('#dialog').dialog({ buttons: [ {
$(this).dialog("close");
window.location.href = window.location.href;
}
} ] });
} ]
});
$(".ui-button:contains('Quitter')").focus();
$('.ui-dialog').on('keypress', function(event){
var code = (event.keyCode ? event.keyCode : event.which);
if (code == 13)
{
event.preventDefault();
$('.ui-button:contains("Quitter")').click();
}
});
</script>