CINXE.COM
<div class="modal-header-imp"> <div class="bandeau-couleur"> <a id="button_close" role="button" href="#" class="close" data-dismiss="modal"><img src="/images/input-reset.png" alt="Fermer"></a> <div class="popin-impression"> <h1>Envoyer par courriel</h1> </div> </div> </div> <div class="modal-body-imp popinMail"> <div class="border-modal"> <div class="contenu-modal-imp"> <div></div> <form id="envoyerParMailForm" name="envoyerParMailForm" action="/submitEnvoiMail.do;jsessionid=CC6F37C0E071DC14FE153C47CAB92F37" method="get"> <table role="presentation"> <tr style="vertical-align:top;"> <td> <h2>Envoi par courriel au format txt :</h2> <input type="hidden" name="ithar" value="" id="ithar"/> </td> <td style="padding-left:5px;padding-top:10px;"> <span id="span3" style="display:block;"> <!-- <label style="font-size:1em;">Envoi par e-mail au format txt.</label> --> <div id="hide" style="display:none;"><label style="font-size:1em;"><input type="radio" value="0" id="radio31" name="typeFormatFichier" > PDF</label><br> <label style="font-size:1em;"><input type="radio" value="1" id="radio32" name="typeFormatFichier" checked="checked"> TXT</label><br></div> </span> <p> <td> <label style="font-size:1em;"><input type="radio" value="1" id="radio12" name="typeNoticesPdf" checked='checked'> notices compl猫tes</label><br> </td> </tr> <tr style="vertical-align:top;"> <td style="padding-top:5px;padding-bottom:5px;"> <h2>Format de la notice :</h2> </td> </tr> <tr> <td aria-hidden="true" width="200px"></td> <td style="padding-left:5px;padding-top:10px;"> <label class="radio" style="margin-left:0;margin-top:0"><input type="radio" value="1" id="radio6" name="formatNoticesPdf" checked="checked"> Public</label><br> <label class="radio" style="margin-left:0;margin-top:0"><input type="radio" value="2" id="radio7" name="formatNoticesPdf"> Intermarc</label><br> <label class="radio" style="margin-left:0;margin-top:0"><input type="radio" value="3" id="radio8" name="formatNoticesPdf"> Unimarc</label><br> </td> </tr> <tr> <td > <h2><label style="font-size:1em;"> Adresse du destinataire : </label></h2> </td> <td style="padding-left: 5px;padding-top: 10px;"> <input type="text" name="adresseMailDestinataire" maxlength="45" value="" id="adresseMailDestinataire"/> <div class="alert alert-danger" style="display:none;" id="errorSaisieMail"></div> <input type="hidden" name="envoiMail" value="envoiMailTrue" id="envoiMail"/> <input type="hidden" id="arkNotice" name="arkNotice" value="ark:/12148/cb119805257" /> </td> </tr> <div></div> </p> </table> <input id="envoyerParMail" type="submit" title="Valider (nouvelle fen锚tre)" value="Valider"/> <input type="hidden" name="pageRechNotice" value="rat" id="pageRechNotice"/> </form> </div> </div> </div> <script type="text/javascript"> // Fonction lors de la soumission du formulaire jQuery("#envoyerParMail").click(function(e){ var mail = jQuery("input#adresseMailDestinataire").val(); if (mail==''){ showMsgMail('Adresse 脿 renseigner'); return false; } var statutVerifMail = verifMail(mail); if (!statutVerifMail){ showMsgMail('Courriel invalide'); return false; } clickXiti('T', 'envoyerparmail'); $('#envoimail_popin_modal').modal('hide'); }); //Clic de fermeture de la popin jQuery("#button_close").click(function(e){ resetMsgMail(); }); // Si type notice = abr茅g茅e, les formats Intermarc, unimarc, isbd devient non cliquable jQuery(".popinMail #radio11").click(function(e){ $('.popinMail #radio6').prop('checked', true); $('.popinMail #radio7').prop('checked', false); $('.popinMail #radio7').prop('disabled', true); $('.popinMail #radio8').prop('checked', false); $('.popinMail #radio8').prop('disabled', true); $('.popinMail #radio9').prop('checked', false); $('.popinMail #radio9').prop('disabled', true); }); jQuery(".popinMail #radio21").click(function(e){ $('.popinMail #radio6').prop('checked', true); $('.popinMail #radio7').prop('checked', false); $('.popinMail #radio7').prop('disabled', true); $('.popinMail #radio8').prop('checked', false); $('.popinMail #radio8').prop('disabled', true); $('.popinMail #radio9').prop('checked', false); $('.popinMail #radio9').prop('disabled', true); }); // On rend le format Intermarc cliquable que si le type diff de notice abr茅g茅e jQuery(".popinMail #radio12, .popinMail #radio22, .popinMail #radio23").click(function(e){ $('.popinMail #radio7').prop('disabled', false); $('.popinMail #radio8').prop('disabled', false); $('.popinMail #radio9').prop('disabled', false); }); $(document).ready(function () { if ($('#pageRech').val() == 'rat') $('#pageRechNotice').val($('#pageRech').val()); if ($('#pageRechNotice').val() != 'rat') { $('#span1').hide(); $('#span2').show(); // Si on est dans le r茅sultat d'une recherche BIB // popin s'ouvre avec "notices abr茅g茅es" radio21 par d茅faut $('.popinMail #radio21').prop('checked', true); } else { // Idem r茅sultat d'une recherche AUT // mais alors radio11 $('.popinMail #radio11').prop('checked', true); } if($('.popinMail #radio21').is(':checked')) { // notices abr茅g茅es BIB $('.popinMail #radio6').prop('checked', true); $('.popinMail #radio7').prop('checked', false); $('.popinMail #radio7').prop('disabled', true); $('.popinMail #radio8').prop('checked', false); $('.popinMail #radio8').prop('disabled', true); $('.popinMail #radio9').prop('checked', false); $('.popinMail #radio9').prop('disabled', true); } if($('.popinMail #radio11').is(':checked')) { // notices abr茅g茅es AUT $('.popinMail #radio6').prop('checked', true); $('.popinMail #radio7').prop('checked', false); $('.popinMail #radio7').prop('disabled', true); $('.popinMail #radio8').prop('checked', false); $('.popinMail #radio8').prop('disabled', true); } if($('.popinMail #radio12').is(':checked')) { // notices compl猫tes AUT $('.popinMail #radio7').prop('checked', false); $('.popinMail #radio7').prop('disabled', false); $('.popinMail #radio8').prop('checked', false); $('.popinMail #radio8').prop('disabled', false); } }); function verifMail(mail){ var result = false; var regexemail = /^[a-zA-Z0-9._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$/; result = regexemail.test(mail); return result; } function resetMsgMail(){ jQuery("#errorSaisieMail").hide(); jQuery("#errorSaisieMail").text(""); } function showMsgMail(message){ jQuery("#errorSaisieMail").text(message); jQuery("#errorSaisieMail").show(); } </script>