Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1421 → Rev 1422

/trunk/modules/mobile/presentations/js/mobile.js
7,10 → 7,29
voirSources();
});
if(!!window.innerWidth) {
var largeurFenetre = window.innerWidth;
// Tablettes / écran moyens, On met du L
if(largeurFenetre > 500 && largeurFenetre < 1000) {
adapterTailleImages('L');
} else {
// Plus de 1000 px, XL est bien plus agréable
if(largeurFenetre >= 1000) {
adapterTailleImages('XL');
}
}
}
function voirSources() {
var w = window.open();
var html = $("#smartflore-sources").html();
$(w.document.body).html(html);
}
function adapterTailleImages(taille) {
$('#smartflore-illustrations-galerie-carousel img').each(function(index) {
var src = $(this).attr('src');
$(this).attr('src', src.replace('S', taille));
});
}
});