13 lines
470 B
JavaScript
Raw Normal View History

2020-01-14 10:11:58 +01:00
$(document).ready(function(){
$('.nbr_input').submit(function(e) { return false; });
2020-01-15 15:56:23 +01:00
$('.update, .delete').click(function(e) {
console.log("blabla");
2020-01-14 10:11:58 +01:00
var li = $(this).parent("li");
2020-01-15 15:56:23 +01:00
console.log($(this).attr('class'));
$.post('/xml/' + li.data("file"), {'action': $(this).attr('class'), 'nbr': li.data("nbr"), 'new_nbr': li.children(".nbr_input").val(), 'date': li.data("date")}, function(d) {
2020-01-14 10:11:58 +01:00
if(d === 'ok') {
location.reload();
}
});
});
});