[10.0.125.dev] iframe responsive

This commit is contained in:
fredtempez 2019-11-23 23:06:17 +01:00
parent 31e6c24ead
commit 0f03ac4ebf
2 changed files with 3 additions and 1 deletions

View File

@ -326,6 +326,7 @@ core.start = function() {
var _this = $(this);
_this
.data("ratio", _this.height() / _this.width())
.data("maxwidth", _this.width())
.removeAttr("width height");
});
// Prend la largeur du parent et détermine la hauteur à l'aide du ratio lors du resize de la fenêtre
@ -333,6 +334,7 @@ core.start = function() {
elementDOM.each(function() {
var _this = $(this);
var width = _this.parent().first().width();
if (width > _this.data("maxwidth")){ width = _this.data("maxwidth");}
_this
.width(width)
.height(width * _this.data("ratio"));

View File

@ -32,7 +32,7 @@ class common {
const I18N_DIR = 'site/i18n/';
// Numéro de version
const ZWII_VERSION = '10.0.124.dev';
const ZWII_VERSION = '10.0.125.dev';
public static $actions = [];
public static $coreModuleIds = [