12,7 → 12,6 |
}); |
}); |
|
|
function changerAccordeonOuOnglets(ongletId) { |
|
i = 0 ; |
209,6 → 208,7 |
|
bouton_valider.before("<input type=\"button\" title=\"Sauvegarder la fiche sans la vérifier (celle ci ne sera pas publiée)\" id=\"sauvegarde_form\" onclick=\"validerFormulaire(false)\" value=\"sauvegarder\" />"); |
|
recherche = false; |
|
} |
else |
376,6 → 376,9 |
url_ajax += "&valider_fiche=0"; |
|
var callback = function(reponse_json) { |
|
reponse_brute = reponse_json.match('{"success":(?:false|true,"id_fiche":[0-9]+)}') ; |
reponse_json = reponse_brute[0] ; |
|
var reponse = eval('('+reponse_json+')'); |
|
406,4 → 409,53 |
} |
} |
|
$(document).ready(ajouterAccordeonOuOnglets); |
$(document).ready(ajouterAccordeonOuOnglets); |
|
|
|
var champsSontCaches ; |
|
function ajouterLienRechercheAvancee() { |
|
champsCaches = $(".form_depliable > table > tbody > tr"); |
var i = 1 ; |
|
champsSontCaches = true; |
|
longueur = champsCaches.length ; |
|
champsCaches.each(function() { |
|
if(i == 2) { |
this.setAttribute("id","emplacement_recherche_avancee_base"); |
} |
|
if(i >= 2 && i < longueur) { |
this.setAttribute("class","emplacement_recherche_avancee"); |
} |
i++; |
}); |
|
$("#emplacement_recherche_avancee_base").before("<tr id=\"cell_lien_rech_avancee\"><td><a href=# id=\"lien_rech_avancee\">+ recherche avancee</a></td></tr>"); |
$(".emplacement_recherche_avancee").hide(); |
|
$("#lien_rech_avancee").click(function (champsSontCaches) { |
cacherAfficherLiensRechercheAvancee(); |
}); |
|
} |
|
function cacherAfficherLiensRechercheAvancee() { |
|
$(".emplacement_recherche_avancee").toggle(); |
|
if(champsSontCaches) { |
$("#lien_rech_avancee").text("- recherche simple"); |
champsSontCaches = false; |
} else { |
$("#lien_rech_avancee").text("+ recherche avancee"); |
champsSontCaches = true; |
} |
} |
|
$(".form_depliable").ready(ajouterLienRechercheAvancee); |