Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions application/views/scripts/dossier/prescription.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -303,17 +303,23 @@ $(document).ready(function(){
var typePresc = $("#TYPE_PRESCRIPTION_DOSSIER").val();
//On enregistre la prescription associée au dossier puis on integre le tableau retourné dans le li class=listePrescriptions

$.ajax({
type: "POST",
url: "/dossier/prescriptionaddtype",
data: "&idPrescType="+id+"&idDossier="+$("#idDossier").val()+"&typePrescriptionDossier="+typePresc,
beforeSend: function(){
$("#listePrescriptionType").html("<img src='/images/load.gif' />");
},
success: function(msg){
window.location = '/dossier/prescription/id/'+$("#idDossier").val();
}
});
$.ajax({
type: "POST",
url: "/dossier/prescriptionaddtype",
data: "&idPrescType="+id+"&idDossier="+$("#idDossier").val()+"&typePrescriptionDossier="+typePresc,
success: function(msg){
var $list = $('#prescRappelReg');
if (typePresc == 1) {
$list = $('#prescExploitation');
} else if (typePresc == 2) {
$list = $('#prescAmelioration');
}
$list.find('> div').remove(); /* Retrait du message empty list */
$list.append(msg);
$this.attr('disabled', 'disabled').html('Ajouté ');
}
});

return false;
});

Expand Down