2010-06-24 09:42:23 +00:00
|
|
|
$(document).ready(function(){
|
|
|
|
//Gestion boite dialog mandataire
|
2010-06-25 12:49:43 +00:00
|
|
|
$('a.annonceDelete').click(function(e){
|
|
|
|
e.preventDefault();
|
2010-06-24 09:42:23 +00:00
|
|
|
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();
|
2010-08-27 07:14:47 +00:00
|
|
|
$('#result').html("Patientez...., Suppression en cours....");
|
2010-06-24 09:42:23 +00:00
|
|
|
$.post('index.php',
|
|
|
|
{ page: 'saisieajax', q: 'annonces/delete',
|
|
|
|
idan: idan, siret: siret},
|
|
|
|
function(data){ $('#result').html(data); }
|
|
|
|
);
|
|
|
|
},
|
|
|
|
'Quitter': function() { $(this).dialog('close'); }
|
|
|
|
},
|
2010-06-25 12:49:43 +00:00
|
|
|
close: function() { $('#dialog').remove(); }
|
2010-06-24 09:42:23 +00:00
|
|
|
};
|
2010-06-25 12:49:43 +00:00
|
|
|
$('<div id="dialog"></div>').dialog(dialogOpts);
|
2010-06-24 09:42:23 +00:00
|
|
|
});
|
|
|
|
|
2010-06-25 12:49:43 +00:00
|
|
|
$('a.annonceEdit').click(function(e){
|
|
|
|
e.preventDefault();
|
2010-06-24 09:42:23 +00:00
|
|
|
var title = $(this).attr('title');
|
|
|
|
var href = $(this).attr('href');
|
|
|
|
var dialogOpts = {
|
|
|
|
bgiframe: true,
|
|
|
|
title: title,
|
2010-06-25 14:07:19 +00:00
|
|
|
width: 650,
|
|
|
|
height: 500,
|
2010-06-24 09:42:23 +00:00
|
|
|
modal: true,
|
2010-06-25 12:49:43 +00:00
|
|
|
closeOnEscape: false,
|
2010-06-24 09:42:23 +00:00
|
|
|
open: function(event, ui) {
|
|
|
|
$(this).html('Chargement...').load(href);
|
|
|
|
},
|
|
|
|
buttons: {
|
2010-08-31 06:59:31 +00:00
|
|
|
'Enregistrer': function() {
|
|
|
|
if ($('form#saisie').length){
|
|
|
|
$('form#saisie').submit();
|
|
|
|
}
|
|
|
|
},
|
2010-06-24 09:42:23 +00:00
|
|
|
'Quitter': function() { $(this).dialog('close'); }
|
|
|
|
},
|
2010-06-25 12:49:43 +00:00
|
|
|
close: function() { $('#dialog').remove(); }
|
2010-06-24 09:42:23 +00:00
|
|
|
};
|
2010-06-25 12:49:43 +00:00
|
|
|
$('<div id="dialog"></div>').dialog(dialogOpts);
|
2010-06-24 09:42:23 +00:00
|
|
|
});
|
|
|
|
|
2010-06-25 12:49:43 +00:00
|
|
|
$('a.annonceCopy').click(function(e){
|
|
|
|
e.preventDefault();
|
2010-06-24 09:42:23 +00:00
|
|
|
var title = $(this).attr('title');
|
|
|
|
var href = $(this).attr('href');
|
|
|
|
var dialogOpts = {
|
|
|
|
bgiframe: true,
|
|
|
|
title: title,
|
|
|
|
width: 350,
|
2010-08-05 08:37:32 +00:00
|
|
|
height: 200,
|
2010-06-24 09:42:23 +00:00
|
|
|
modal: true,
|
2010-06-25 12:49:43 +00:00
|
|
|
closeOnEscape: false,
|
2010-06-24 09:42:23 +00:00
|
|
|
open: function(event, ui) {
|
|
|
|
$(this).html('Chargement...').load(href);
|
|
|
|
},
|
|
|
|
buttons: {
|
2010-08-05 08:37:32 +00:00
|
|
|
'Dupliquer': function() {
|
2010-11-22 11:33:34 +00:00
|
|
|
var siret = $('input[name=siret]').val();
|
2010-08-05 08:37:32 +00:00
|
|
|
var idan = $('input:hidden[name=idan]').val();
|
|
|
|
$.post('index.php',
|
|
|
|
{ page: 'saisieajax', q: 'annonces/copy',
|
|
|
|
idan: idan, siret: siret},
|
|
|
|
function(data){ $('#result').html(data); }
|
|
|
|
);
|
|
|
|
},
|
2010-06-24 09:42:23 +00:00
|
|
|
'Quitter': function() { $(this).dialog('close'); }
|
|
|
|
},
|
2010-06-25 12:49:43 +00:00
|
|
|
close: function() { $('#dialog').remove(); }
|
2010-06-24 09:42:23 +00:00
|
|
|
};
|
2010-06-25 12:49:43 +00:00
|
|
|
$('<div id="dialog"></div>').dialog(dialogOpts);
|
2010-06-24 09:42:23 +00:00
|
|
|
});
|
|
|
|
});
|