78 lines
2.0 KiB
JavaScript
78 lines
2.0 KiB
JavaScript
$(document).ready(function(){
|
|
//Gestion boite dialog mandataire
|
|
$('a.annonceDelete').click(function(e){
|
|
e.preventDefault();
|
|
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() { $('#dialog').remove(); }
|
|
};
|
|
$('<div id="dialog"></div>').dialog(dialogOpts);
|
|
});
|
|
|
|
$('a.annonceEdit').click(function(e){
|
|
e.preventDefault();
|
|
var title = $(this).attr('title');
|
|
var href = $(this).attr('href');
|
|
var dialogOpts = {
|
|
bgiframe: true,
|
|
title: title,
|
|
width: 650,
|
|
height: 500,
|
|
modal: true,
|
|
closeOnEscape: false,
|
|
open: function(event, ui) {
|
|
$(this).html('Chargement...').load(href);
|
|
},
|
|
buttons: {
|
|
'Enregistrer': function() { $('form#saisie').submit(); },
|
|
'Quitter': function() { $(this).dialog('close'); }
|
|
},
|
|
close: function() { $('#dialog').remove(); }
|
|
};
|
|
$('<div id="dialog"></div>').dialog(dialogOpts);
|
|
});
|
|
|
|
$('a.annonceCopy').click(function(e){
|
|
e.preventDefault();
|
|
var title = $(this).attr('title');
|
|
var href = $(this).attr('href');
|
|
var dialogOpts = {
|
|
bgiframe: true,
|
|
title: title,
|
|
width: 350,
|
|
height: 150,
|
|
modal: true,
|
|
closeOnEscape: false,
|
|
open: function(event, ui) {
|
|
$(this).html('Chargement...').load(href);
|
|
},
|
|
buttons: {
|
|
'Enregistrer': function() { },
|
|
'Quitter': function() { $(this).dialog('close'); }
|
|
},
|
|
close: function() { $('#dialog').remove(); }
|
|
};
|
|
$('<div id="dialog"></div>').dialog(dialogOpts);
|
|
});
|
|
}); |