This commit is contained in:
gauthiier
2020-01-15 15:56:23 +01:00
parent dd6d67cf6b
commit 036b549e75
7 changed files with 1996 additions and 9793 deletions
+4 -2
View File
@@ -1,8 +1,10 @@
$(document).ready(function(){
$('.nbr_input').submit(function(e) { return false; });
$('.update').click(function(e) {
$('.update, .delete').click(function(e) {
console.log("blabla");
var li = $(this).parent("li");
$.post('/xml/' + li.data("file"), {'action': 'update', 'nbr': li.data("nbr"), 'new_nbr': li.children(".nbr_input").val()}, function(d) {
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) {
if(d === 'ok') {
location.reload();
}