Skip to content

Commit

Permalink
correction du scope des events pour fonctionnement correct après refr…
Browse files Browse the repository at this point in the history
…esh ajax de la colonne latérale
  • Loading branch information
MedShake committed Oct 12, 2018
1 parent 2352141 commit 2c15b8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public_html/js/module/formsScripts/medGeATCD.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $(document).ready(function() {
$('#id_imc_id').val(imc);
}

$("#id_poids_id , #id_taillePatient_id").on("keyup", function() {
$("#patientLatCol").on("keyup", "#id_poids_id , #id_taillePatient_id", function() {
poids = $('#id_poids_id').val();
taille = $('#id_taillePatient_id').val();
imc = imcCalc(poids, taille);
Expand All @@ -52,15 +52,15 @@ $(document).ready(function() {
auto_grow(this);
});

$("#formName_medGeATCD textarea").on("keyup", function() {
$("#patientLatCol").on("keyup", "#formName_medGeATCD textarea", function() {
$(this).css("overflow", "auto");
});

////////////////////////////////////////////////////////////////////////
///////// Gestion Allergies

// ajout Allergies
$("button.getAllergiesPanel").on("click", function(e) {
$("#patientLatCol").on("click", "button.getAllergiesPanel", function(e) {
e.preventDefault();
$('#texteRechercheAllergie').attr('data-parentid', $(this).attr('data-parentid'));
});
Expand Down Expand Up @@ -129,7 +129,7 @@ $(document).ready(function() {
});

// retirer allergie
$("#latForm").on("click", "button.removeAllergie", function(e) {
$("#patientLatCol").on("click", "button.removeAllergie", function(e) {
e.preventDefault();
origin = $(this);
objetid = $(this).attr('data-objetid');
Expand Down

0 comments on commit 2c15b8b

Please sign in to comment.