extranet/www/js/annonces.js

76 lines
2.0 KiB
JavaScript
Raw Normal View History

$(document).ready(function(){
//Gestion boite dialog mandataire
$('a.annonceDelete').live('click', function(){
var title = $(this).attr('title');
var href = $(this).attr('href');
var dialogOpts = {
bgiframe: true,
title: title,
width: 350,
height: 150,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...').load(href);
},
buttons: {
'Supprimer': function() {
var siret = $('input:hidden[name=siret]').val();
var idan = $('input:hidden[name=idan]').val();
$.post('index.php',
{ page: 'saisieajax', q: 'annonces/delete',
idan: idan, siret: siret},
function(data){ $('#result').html(data); }
);
},
'Quitter': function() { $(this).dialog('close'); }
},
close: function() { $('#dialogmand').remove(); }
};
$('<div id="dialogmand"></div>').dialog(dialogOpts);
return false;
});
$('a.annonceEdit').live('click', function(){
var title = $(this).attr('title');
var href = $(this).attr('href');
var dialogOpts = {
bgiframe: true,
title: title,
width: 350,
height: 150,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...').load(href);
},
buttons: {
'Enregistrer': function() { },
'Quitter': function() { $(this).dialog('close'); }
},
close: function() { $('#dialogmand').remove(); }
};
$('<div id="dialogmand"></div>').dialog(dialogOpts);
return false;
});
$('a.annonceCopy').live('click', function(){
var title = $(this).attr('title');
var href = $(this).attr('href');
var dialogOpts = {
bgiframe: true,
title: title,
width: 350,
height: 150,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...').load(href);
},
buttons: {
'Enregistrer': function() { },
'Quitter': function() { $(this).dialog('close'); }
},
close: function() { $('#dialogmand').remove(); }
};
$('<div id="dialogmand"></div>').dialog(dialogOpts);
return false;
});
});