modalbox, onShow, on teste la presence de la fonction charger_require,

pour l'executer
This commit is contained in:
Christophe 2021-04-20 14:30:51 +02:00
parent d82f0b9e0e
commit 4b8801d254
2 changed files with 8 additions and 2 deletions

View file

@ -60,7 +60,9 @@ jQuery(function () {
url += '&largeur=' + valeur_reduite + 'px'; url += '&largeur=' + valeur_reduite + 'px';
} }
data.onShow = () => { data.onShow = () => {
jQuery.getScript('local/mon_site.js'); if (typeof charger_require !== undefined) {
charger_require();
}
}; };
$.modalbox(url, data); $.modalbox(url, data);
}); });

View file

@ -20,6 +20,8 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
jQuery(function () { jQuery(function () {
// pour les #URL_ACTION_AUTEUR // pour les #URL_ACTION_AUTEUR
// il faut ajouter une class : url_action // il faut ajouter une class : url_action
@ -94,7 +96,9 @@ jQuery(function () {
} }
data.onShow = function () { data.onShow = function () {
jQuery.getScript('local/mon_site.js'); if ((typeof charger_require === "undefined" ? "undefined" : _typeof(charger_require)) !== undefined) {
charger_require();
}
}; };
$.modalbox(url, data); $.modalbox(url, data);