diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index 5eeffbe..bf2e443 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -5,7 +5,7 @@ jQuery(function () { e.preventDefault(); e.stopPropagation(); let confirmation = $(this).data('confirm'); - if (confirmation) { + if (confirmation !== undefined) { if (!confirm(confirmation)) { return; } @@ -28,7 +28,8 @@ jQuery(function () { // lancement d'une modalbox $('#app').on('click', '.modalbox', function (e) { e.preventDefault(); - if (confirmation) { + let confirmation = $(this).data('confirm'); + if (confirmation !== undefined) { if (!confirm(confirmation)) { return; } @@ -41,7 +42,8 @@ jQuery(function () { // lancement d'une médiabox $('#app').on('click', '.mediabox', function (e) { e.preventDefault(); - if (confirmation) { + let confirmation = $(this).data('confirm'); + if (confirmation !== undefined) { if (!confirm(confirmation)) { return; } diff --git a/js/gamutable.js b/js/gamutable.js index 60e8256..98c1e34 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -24,7 +24,7 @@ jQuery(function () { e.stopPropagation(); var confirmation = $(this).data('confirm'); - if (confirmation) { + if (confirmation !== undefined) { if (!confirm(confirmation)) { return; } @@ -47,8 +47,9 @@ jQuery(function () { $('#app').on('click', '.modalbox', function (e) { e.preventDefault(); + var confirmation = $(this).data('confirm'); - if (confirmation) { + if (confirmation !== undefined) { if (!confirm(confirmation)) { return; } @@ -61,8 +62,9 @@ jQuery(function () { $('#app').on('click', '.mediabox', function (e) { e.preventDefault(); + var confirmation = $(this).data('confirm'); - if (confirmation) { + if (confirmation !== undefined) { if (!confirm(confirmation)) { return; }