1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<script>
$(document).ready(
function () {
$(".sup_news").click(function() { afficherBoiteDialogueSupnews(); });
initBoiteDialogueSupnews();
});
function initBoiteDialogueSupnews() {
$("#bdsupnews").dialog({
autoOpen: false,
modal: true,
width: 380,
// Boutons
buttons: { "non": abandonNonSupnews, "oui": abandonOuiSupnews }
});
}
function afficherBoiteDialogueSupnews() {
$("#bdsupnews").dialog("open");
}
// Rester en saisie
function abandonNonSupnews(evt) {
$("#bdsupnews").dialog("close");
}
// Suppression
function abandonOuiSupnews(evt) {
//var id = evt.target.id;
var id = $(evt.target).attr("id");
alert(id);
$("#bdsupnews").dialog("close");
window.location.href = "index.php?nav=3-1&sql=delete_news&id="+id;
}
</script> |