2011-05-10 09:52:12 +00:00
|
|
|
$(document).ready(function(){
|
|
|
|
|
2012-09-26 10:21:52 +00:00
|
|
|
$('a.lien').click(function(e){
|
2011-05-10 09:52:12 +00:00
|
|
|
e.preventDefault();
|
2012-09-26 10:21:52 +00:00
|
|
|
var id = $(this).attr('id');
|
2012-10-10 07:44:29 +00:00
|
|
|
var text = $(this).parent('td').find('div#'+id).html();
|
2012-09-26 10:21:52 +00:00
|
|
|
var title = $(this).attr('title');
|
2011-05-10 09:52:12 +00:00
|
|
|
var dialogOpts = {
|
|
|
|
bgiframe: true,
|
|
|
|
title: title,
|
|
|
|
width: 500,
|
|
|
|
height: 350,
|
|
|
|
modal: true,
|
|
|
|
open: function(event, ui) { $(this).html(text); },
|
|
|
|
buttons: {
|
|
|
|
'Fermer': function() { $(this).dialog('close'); }
|
|
|
|
},
|
|
|
|
close: function() { $('#cadreinfo').remove(); }
|
|
|
|
};
|
|
|
|
$('<div id="cadreinfo"></div>').dialog(dialogOpts);
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
2011-06-27 16:08:18 +00:00
|
|
|
$('.rs').click(function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var item = $(this);
|
|
|
|
$.post(item.attr('href'),
|
|
|
|
function(data){ item.replaceWith('<b>'+data+'</b>'); }
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2011-08-04 16:00:20 +00:00
|
|
|
$('select.changeEtat').change(function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var commandeEtat = $(this).val();
|
|
|
|
var commandeId = $(this).attr('name');
|
2011-12-13 11:29:10 +00:00
|
|
|
var commandeType = $('input[name=mode]').val();
|
2011-12-13 15:42:00 +00:00
|
|
|
var href = $(this).parent('form').attr('action');
|
|
|
|
$.post(href, { etat: commandeEtat, idCommande: commandeId, mode: commandeType}, function(data){
|
2011-08-04 16:00:20 +00:00
|
|
|
if (data==0){ alert("Une erreur s'est produite...Raffraichir la page!");}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2011-05-10 09:52:12 +00:00
|
|
|
});
|