diff --git a/library/Class/Systeme/ModulesAccueil/PremierChapitre.php b/library/Class/Systeme/ModulesAccueil/PremierChapitre.php index ab359fc494ccd8d8eb38c40246aa33559615fbdc..f1d5b5a787f7bc4ce06cdcb54f2ffe43c45a0054 100644 --- a/library/Class/Systeme/ModulesAccueil/PremierChapitre.php +++ b/library/Class/Systeme/ModulesAccueil/PremierChapitre.php @@ -31,7 +31,7 @@ class Class_Systeme_ModulesAccueil_PremierChapitre extends Class_Systeme_Modules protected $_popupWidth = 600; - protected $_popupHeight = 700; + protected $_popupHeight = 600; protected $_defaultValues = ['titre' => 'Premier Chapitre', 'intro' => '', diff --git a/library/ZendAfi/View/Helper/Accueil/PremierChapitre.php b/library/ZendAfi/View/Helper/Accueil/PremierChapitre.php index 7f187ef1c0fd2d876d6a5192205a1f2ba235f510..79a5166059d8ba4683bc97d7298cecd44ad70edb 100644 --- a/library/ZendAfi/View/Helper/Accueil/PremierChapitre.php +++ b/library/ZendAfi/View/Helper/Accueil/PremierChapitre.php @@ -25,6 +25,7 @@ class ZendAfi_View_Helper_Accueil_PremierChapitre extends ZendAfi_View_Helper_Ac $this->contenu = ''; if (!empty($this->preferences['intro'])) $this->contenu = '<p>'.$this->preferences['intro'].'</p>'; + $this->preferences['maxWidth'] = 550; $this->contenu .= $this->view->renderPremierChapitre($this->id_module, $this->preferences); return $this->getHtmlArray(); diff --git a/library/ZendAfi/View/Helper/PremierChapitre/Frame.php b/library/ZendAfi/View/Helper/PremierChapitre/Frame.php index 69326253fa134dfe143dbfb467a7fe2b6728452a..e07715bbbc484e17ef712a48952b4befe76e7dbd 100644 --- a/library/ZendAfi/View/Helper/PremierChapitre/Frame.php +++ b/library/ZendAfi/View/Helper/PremierChapitre/Frame.php @@ -33,9 +33,12 @@ class ZendAfi_View_Helper_PremierChapitre_Frame extends ZendAfi_View_Helper_Prem if (!$pc) return $html; } else return $html; + $w = 700; $h = 700; + if (!empty($preferences['maxWidth']) && $preferences['maxWidth'] < $w) $w = $preferences['maxWidth']; + if (!empty($preferences['maxHeight']) && $preferences['maxHeight'] < $h) $h = $preferences['maxHeight']; $frm_attribs = ['id' => 'pc_frame', 'class' => 'iframe_premierchapitre', - 'style' => 'width:700px; height:700px; border:none;', + 'style' => 'width:'.$w.'px; height:'.$h.'px; border:none;', 'src' => $pc->getUrl()]; return $this->_tag('iframe',null,$frm_attribs); }