Commit 6d55435a authored by Mat's avatar Mat

ajoute un bouton reload pour rafraîchir la page

parent 47ab85ba
......@@ -8,8 +8,12 @@
<a href="javascript: void(0);" class="btn btn-create">
<i class="fas fa-plus fa-fw"></i> Nouvel auteur
<a href="javascript: void(0);" class="btn btn-reload">
<i class="fas fa-sync-alt fa-fw"></i> Rafraichir
<div class="hidden" style="margin-top: 1em;">
......@@ -111,16 +115,20 @@
// form[name^="owner"] .. regex, qui commence par owner
let createBtns = document.querySelectorAll('.btn-create');
// ou for (let currentBtn of createBtns)
// 'e' veut dire 'event'
currentBtn.addEventListener('click', function(e){
createBtns.forEach(function(currentBtn){ // ou for (let currentBtn of createBtns)
currentBtn.addEventListener('click', function(e){ // 'e' veut dire 'event'
let reloadBtns = document.querySelectorAll('.btn-reload');
reloadBtns.forEach(function(reloadBtn) {
reloadBtn.addEventListener('dblclick', function (e) {
form.addEventListener('submit', function(e) {
// Annule l'événement, mais préserve la fonction callback
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment