diff --git a/inquire.db b/inquire.db index 50d97e1..546964b 100644 Binary files a/inquire.db and b/inquire.db differ diff --git a/templates/lecturer.html b/templates/lecturer.html index c0c3618..8f14625 100644 --- a/templates/lecturer.html +++ b/templates/lecturer.html @@ -118,12 +118,13 @@ url: url, type: 'POST', data: answer, - succes: function(response) { - // location.reload(); + complete: function() { + alertify.notify('Pomyślnie wysłano odpowiedź', 'success', 3).then( + location.reload()); } }); //location.reload(); - alertify.notify('Pomyślnie wysłano odpowiedź', 'success', 3); + }); $('.question--mark').on('click', () => { @@ -142,12 +143,12 @@ url: '/delete', type: 'POST', data: delID, - succes: function(response) { - // location.reload(); + complete: function() { + alertify.notify('Pytanie zostało usunięte', 'error', 3).then( + location.reload()); } - }); - alertify.notify('Pytanie zostało usunięte', 'error', 3); + }, function(){ alertify.notify('Anulowano usunięcie', 'error', 3); } diff --git a/templates/student.html b/templates/student.html index 6f5ff75..f743446 100644 --- a/templates/student.html +++ b/templates/student.html @@ -124,8 +124,8 @@ type: 'POST', data: question, complete: function() { - location.reload(); - alertify.notify('Pomyślnie wysłano pytanie', 'success', 3); + alertify.notify('Pomyślnie wysłano pytanie', 'success', 3).then( + location.reload()); } }); @@ -140,13 +140,11 @@ $.ajax({ url: link, type: 'POST', - succes: function(response) { + complete: function() { + alertify.notify('Pomyślnie oceniono pytanie', 'success', 3); location.reload(); - //alert(response) } }); - alertify.notify('Pomyślnie oceniono pytanie', 'success', 3); - location.reload(); });