1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| function apparaitreCreationCommande(idItem,idCommande) {
// On fait apparaître la fenêtre de création de commande, en chargeant les cibles correspondant au déploiement
var idDeploiement = $("#"+idItem).attr("name");
$("#div_creation").attr('src','');
var action = $("#form_listeCible").attr("action");
var dataString = "idDeploiement=" + idDeploiement;
$('#div_creation').html('<p><img src="img/ajax-loader.gif" width="220" height="19" /></p>');
// Requête Ajax pour obtenir les choix possibles dans la sélection
$.ajax( {
type : "POST",
url : action,
data : dataString,
dataType : "html",
success : function(data) {
$('#div_creation').html(data);
},
error : function() {}
});
$('#li_deploiement_'+idDeploiement).css("background","#DEFAFF");
document.getElementById('wrap').style.height="500px";
$(".boutonOuvrirCreation").attr('disabled', 'disabled');
$('#div_creation').slideToggle(); // La fenêtre de sélection a été chargé avec la requête Ajax, je l'affiche alors avec une fonction JQuery
// Si une idCommande a été renseignée (idCommande != 0, avec le bouton "Copier Commande") on coche les
// cases correspondant à la commande copiée
if (idCommande != 0)
{
fonctionCocher(); // Contient des instructions du type : $("#toto[type='checkbox']").attr("checked","true");
}
return false;
} |
Partager