Ajout du frontend et branchement sur l'API axione #9
1 changed files with 1 additions and 15 deletions
|
@ -106,13 +106,9 @@
|
|||
}
|
||||
}
|
||||
if (communes.length == 1) {
|
||||
codeInsee=communes[0].codeInsee
|
||||
console.log("fillCommunes show voieForm")
|
||||
codeInsee=communes[0].codeInsee;
|
||||
$('#voieForm').collapse('show');
|
||||
console.log("fillCommunes shown voieForm")
|
||||
} else {
|
||||
console.log("fillCommunes hide voieForm")
|
||||
console.log("voieInput to empty")
|
||||
$('#voieInput').val('');
|
||||
$('#voieForm').collapse('hide');
|
||||
}
|
||||
|
@ -143,11 +139,9 @@
|
|||
voies[i].libelle[0] + "'></option>");
|
||||
}
|
||||
if (voies.length == 1) {
|
||||
console.log("fillVoies show btnTestAdresse")
|
||||
$('#btnTestAdresse').collapse('show');
|
||||
voie=voies[0].libelle[0]
|
||||
} else {
|
||||
console.log("fillVoies hide btnTestAdresse")
|
||||
$('#btnTestAdresse').collapse('hide');
|
||||
}
|
||||
}
|
||||
|
@ -155,26 +149,20 @@
|
|||
});
|
||||
}
|
||||
$('#methodAddress').on('show.bs.collapse', function () {
|
||||
console.log("SHOW methodAddress")
|
||||
$('#communeInput').trigger('input')
|
||||
$('#communeInput').trigger('keyup')
|
||||
});
|
||||
$('#voieForm').on('show.bs.collapse', function () {
|
||||
console.log("SHOW voieForm")
|
||||
|
||||
$('#voieInput').trigger('input')
|
||||
$('#voieInput').trigger('keyup')
|
||||
});
|
||||
|
||||
$('#communeInput').on('keyup', function () {
|
||||
console.log("communes keyup, call fillCommunes")
|
||||
fillCommunes($(this).val());
|
||||
});
|
||||
|
||||
$('#communeInput').on('input', function() {
|
||||
console.log("val ", $(this).val())
|
||||
if ($(this).val() === '') {
|
||||
console.log("on empty input hide voieForm")
|
||||
$('#voieForm').collapse('hide');
|
||||
}
|
||||
});
|
||||
|
@ -182,9 +170,7 @@
|
|||
fillVoies(codeInsee,$(this).val());
|
||||
});
|
||||
$('#voieInput').on('input', function () {
|
||||
console.log("voie val ", $(this).val())
|
||||
if ($(this).val() === '') {
|
||||
console.log("on empty input hide btnTestAdresse")
|
||||
$('#btnTestAdresse').collapse('hide');
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue