Skip to content
Extraits de code Groupes Projets
Valider 2f2514bb rédigé par Gabriel-Bowater's avatar Gabriel-Bowater
Parcourir les fichiers

shifted stopPropegation calls to a function

parent 460f567c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -72,9 +72,7 @@ $( document ).ready(function() { ...@@ -72,9 +72,7 @@ $( document ).ready(function() {
toggleCalendar(e); toggleCalendar(e);
}) })
$('.ui-datepicker-month, .ui-datepicker-year, .periodSelector td a').keydown(function(e){ blockPropegation();
e.stopPropagation();
})
$('.periodSelector .form-radio').keydown(function(e){ $('.periodSelector .form-radio').keydown(function(e){
e.stopPropagation(); e.stopPropagation();
...@@ -102,10 +100,14 @@ function toggleCalendar(e){ ...@@ -102,10 +100,14 @@ function toggleCalendar(e){
} }
function selectPeriodRadioButton(button){ function selectPeriodRadioButton(button){
$('.periodSelector .form-radio').removeClass('checked') $('.periodSelector .form-radio').removeClass('checked');
button.addClass('checked') button.addClass('checked');
button.find('input').click() button.find('input').click();
blockPropegation();
}
function blockPropegation(){
$('.ui-datepicker-month, .ui-datepicker-year, .periodSelector td a').keydown(function(e){ $('.ui-datepicker-month, .ui-datepicker-year, .periodSelector td a').keydown(function(e){
e.stopPropagation(); e.stopPropagation();
}) })
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter