2010-02-23 15:27:18 +00:00
|
|
|
$(document).ready(function()
|
|
|
|
{
|
|
|
|
$('.dialogcmd').live('click', function(){
|
|
|
|
var title = $(this).attr('title');
|
|
|
|
var href = $(this).attr('href');
|
|
|
|
var dialogOpts = {
|
|
|
|
bgiframe: true,
|
|
|
|
title: title,
|
|
|
|
width: 550,
|
|
|
|
height: 300,
|
|
|
|
modal: true,
|
|
|
|
open: function(event, ui) {
|
|
|
|
$(this).html('Chargement...');
|
|
|
|
$(this).load(href);
|
|
|
|
},
|
|
|
|
close: function() { $('#dialogcmd').remove(); }
|
|
|
|
};
|
|
|
|
$('<div id="dialogcmd"></div>').dialog(dialogOpts);
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
2010-06-22 07:31:15 +00:00
|
|
|
$('span.fichier > a').live('click', function(e){
|
|
|
|
e.preventDefault();
|
2010-05-12 10:31:56 +00:00
|
|
|
var objet = $(this).parent('span');
|
|
|
|
objet.html('<br/>Chargement du fichier...');
|
|
|
|
var url = $(this).attr('href');
|
|
|
|
$.post( url+'&ajax=true', function (data, textStatus)
|
|
|
|
{
|
|
|
|
if( data=='' || data=='FALSE' || textStatus=='timeout' )
|
|
|
|
{
|
|
|
|
data = '<br/>Le chargement du fichier a échoué';
|
|
|
|
}
|
2010-05-24 14:46:00 +00:00
|
|
|
objet.replaceWith(data);
|
2010-05-12 10:31:56 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2010-06-22 07:31:15 +00:00
|
|
|
$('a.multiactes').live('click', function(e){
|
|
|
|
e.preventDefault();
|
2010-05-12 10:31:56 +00:00
|
|
|
var url = $(this).attr('href');
|
|
|
|
var objet = $(this).parent('td');
|
|
|
|
objet.html('Commande en cours...');
|
|
|
|
$.post( url+'&ajax=true', function (data, textStatus)
|
|
|
|
{
|
|
|
|
if( data=='' || data=='FALSE' || textStatus=='timeout' )
|
|
|
|
{
|
|
|
|
data = 'Erreur lors de la requete.';
|
|
|
|
}
|
|
|
|
objet.html(data);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|