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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
let confirmation = $(this).data('confirm');
|
let confirmation = $(this).data('confirm');
|
||||||
if (confirmation) {
|
if (confirmation !== undefined) {
|
||||||
if (!confirm(confirmation)) {
|
if (!confirm(confirmation)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,8 @@ jQuery(function () {
|
||||||
// lancement d'une modalbox
|
// lancement d'une modalbox
|
||||||
$('#app').on('click', '.modalbox', function (e) {
|
$('#app').on('click', '.modalbox', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (confirmation) {
|
let confirmation = $(this).data('confirm');
|
||||||
|
if (confirmation !== undefined) {
|
||||||
if (!confirm(confirmation)) {
|
if (!confirm(confirmation)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +42,8 @@ jQuery(function () {
|
||||||
// lancement d'une médiabox
|
// lancement d'une médiabox
|
||||||
$('#app').on('click', '.mediabox', function (e) {
|
$('#app').on('click', '.mediabox', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (confirmation) {
|
let confirmation = $(this).data('confirm');
|
||||||
|
if (confirmation !== undefined) {
|
||||||
if (!confirm(confirmation)) {
|
if (!confirm(confirmation)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ jQuery(function () {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var confirmation = $(this).data('confirm');
|
var confirmation = $(this).data('confirm');
|
||||||
|
|
||||||
if (confirmation) {
|
if (confirmation !== undefined) {
|
||||||
if (!confirm(confirmation)) {
|
if (!confirm(confirmation)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -47,8 +47,9 @@ jQuery(function () {
|
||||||
|
|
||||||
$('#app').on('click', '.modalbox', function (e) {
|
$('#app').on('click', '.modalbox', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
var confirmation = $(this).data('confirm');
|
||||||
|
|
||||||
if (confirmation) {
|
if (confirmation !== undefined) {
|
||||||
if (!confirm(confirmation)) {
|
if (!confirm(confirmation)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -61,8 +62,9 @@ jQuery(function () {
|
||||||
|
|
||||||
$('#app').on('click', '.mediabox', function (e) {
|
$('#app').on('click', '.mediabox', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
var confirmation = $(this).data('confirm');
|
||||||
|
|
||||||
if (confirmation) {
|
if (confirmation !== undefined) {
|
||||||
if (!confirm(confirmation)) {
|
if (!confirm(confirmation)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue