40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
$(document).ready(function(){
|
|
|
|
$('div.lien').click(function(e){
|
|
e.preventDefault();
|
|
var text = $(this).children('span').html();
|
|
var title = $(this).children('a').attr('title');
|
|
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;
|
|
});
|
|
|
|
$('.rs').click(function(e){
|
|
e.preventDefault();
|
|
var item = $(this);
|
|
$.post(item.attr('href'),
|
|
function(data){ item.replaceWith('<b>'+data+'</b>'); }
|
|
);
|
|
});
|
|
|
|
$('select.changeEtat').change(function(e){
|
|
e.preventDefault();
|
|
var commandeEtat = $(this).val();
|
|
var commandeId = $(this).attr('name');
|
|
$.post('/dashboard/commandesetatchange', { etat: commandeEtat, idCommande: commandeId }, function(data){
|
|
if (data==0){ alert("Une erreur s'est produite...Raffraichir la page!");}
|
|
});
|
|
});
|
|
|
|
}); |