fix: coquille sur le typeof de charger_require
This commit is contained in:
parent
bb6b31d9b7
commit
2d810faf27
1 changed files with 38 additions and 38 deletions
|
@ -4,45 +4,45 @@
|
||||||
* Imposer le style sur le premier bloc englobant dans la madiabox (style="width: [(#ENV{largeur})])
|
* Imposer le style sur le premier bloc englobant dans la madiabox (style="width: [(#ENV{largeur})])
|
||||||
*/
|
*/
|
||||||
jQuery(function () {
|
jQuery(function () {
|
||||||
modalbox();
|
modalbox();
|
||||||
|
|
||||||
function modalbox() {
|
function modalbox() {
|
||||||
$('body').on('click', '.modalbox, .modalgamutable', function (e) {
|
$('body').on('click', '.modalbox, .modalgamutable', function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let ts = + new Date()
|
let ts = + new Date()
|
||||||
let url = $(this).attr('href');
|
let url = $(this).attr('href');
|
||||||
url += '&var_zajax=content';
|
url += '&var_zajax=content';
|
||||||
url += '&ts=' + ts;
|
url += '&ts=' + ts;
|
||||||
let data = {};
|
let data = {};
|
||||||
let minHeight = $(this).data('minheight');
|
let minHeight = $(this).data('minheight');
|
||||||
let minWidth = $(this).data('minwidth');
|
let minWidth = $(this).data('minwidth');
|
||||||
if (minHeight !== undefined) {
|
if (minHeight !== 'undefined') {
|
||||||
data.minHeight = minHeight;
|
data.minHeight = minHeight;
|
||||||
}
|
}
|
||||||
if (minWidth !== undefined) {
|
if (minWidth !== 'undefined') {
|
||||||
data.minWidth = minWidth;
|
data.minWidth = minWidth;
|
||||||
}
|
}
|
||||||
let width = $(this).data('width');
|
let width = $(this).data('width');
|
||||||
if (width !== undefined) {
|
if (width !== 'undefined') {
|
||||||
data.width = width;
|
data.width = width;
|
||||||
let valeur_reduite = ($(window).width() * width) / 100;
|
let valeur_reduite = ($(window).width() * width) / 100;
|
||||||
url += '&largeur=' + valeur_reduite + 'px';
|
url += '&largeur=' + valeur_reduite + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
let that = this;
|
let that = this;
|
||||||
data.onShow = () => {
|
data.onShow = () => {
|
||||||
if (typeof charger_require !== undefined) {
|
if (typeof charger_require !== 'undefined') {
|
||||||
charger_require();
|
charger_require();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($(that).hasClass('modalgamutable')) {
|
if ($(that).hasClass('modalgamutable')) {
|
||||||
if (typeof window.gamutable !== 'undefined') {
|
if (typeof window.gamutable !== 'undefined') {
|
||||||
window.gamutable();
|
window.gamutable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$.modalbox(url, data);
|
$.modalbox(url, data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue