on ajoute un petit test pour moins d'erreurs
This commit is contained in:
parent
25f0d4d42c
commit
3db0076019
2 changed files with 10 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue