From 2d810faf273fd31b08fcc22f3bf612b20a28ac8a Mon Sep 17 00:00:00 2001 From: tofulm Date: Mon, 15 Apr 2024 20:29:41 +0200 Subject: [PATCH] fix: coquille sur le typeof de charger_require --- js/gamubox.js | 76 +++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/js/gamubox.js b/js/gamubox.js index e271d66..1cdcd1a 100644 --- a/js/gamubox.js +++ b/js/gamubox.js @@ -4,45 +4,45 @@ * Imposer le style sur le premier bloc englobant dans la madiabox (style="width: [(#ENV{largeur})]) */ jQuery(function () { - modalbox(); + modalbox(); - function modalbox() { - $('body').on('click', '.modalbox, .modalgamutable', function (e) { - e.stopPropagation(); - e.preventDefault(); - let ts = + new Date() - let url = $(this).attr('href'); - url += '&var_zajax=content'; - url += '&ts=' + ts; - let data = {}; - let minHeight = $(this).data('minheight'); - let minWidth = $(this).data('minwidth'); - if (minHeight !== undefined) { - data.minHeight = minHeight; - } - if (minWidth !== undefined) { - data.minWidth = minWidth; - } - let width = $(this).data('width'); - if (width !== undefined) { - data.width = width; - let valeur_reduite = ($(window).width() * width) / 100; - url += '&largeur=' + valeur_reduite + 'px'; - } + function modalbox() { + $('body').on('click', '.modalbox, .modalgamutable', function (e) { + e.stopPropagation(); + e.preventDefault(); + let ts = + new Date() + let url = $(this).attr('href'); + url += '&var_zajax=content'; + url += '&ts=' + ts; + let data = {}; + let minHeight = $(this).data('minheight'); + let minWidth = $(this).data('minwidth'); + if (minHeight !== 'undefined') { + data.minHeight = minHeight; + } + if (minWidth !== 'undefined') { + data.minWidth = minWidth; + } + let width = $(this).data('width'); + if (width !== 'undefined') { + data.width = width; + let valeur_reduite = ($(window).width() * width) / 100; + url += '&largeur=' + valeur_reduite + 'px'; + } - let that = this; - data.onShow = () => { - if (typeof charger_require !== undefined) { - charger_require(); - } + let that = this; + data.onShow = () => { + if (typeof charger_require !== 'undefined') { + charger_require(); + } - if ($(that).hasClass('modalgamutable')) { - if (typeof window.gamutable !== 'undefined') { - window.gamutable(); - } - } - }; - $.modalbox(url, data); - }); - } + if ($(that).hasClass('modalgamutable')) { + if (typeof window.gamutable !== 'undefined') { + window.gamutable(); + } + } + }; + $.modalbox(url, data); + }); + } });