moduel cde : désactiver iframe - modifier showcontent

This commit is contained in:
fredtempez 2019-01-27 14:09:23 +01:00
parent 4cde13f871
commit 30a3ecbbc2
3 changed files with 20 additions and 25 deletions

View File

@ -1972,16 +1972,25 @@ class layout extends common {
* Affiche le contenu * Affiche le contenu
*/ */
public function showContent() { public function showContent() {
if( // Exception pour le module code
$this->core->output['title'] if ($this->getData(['page', $this->getUrl(0), 'moduleId']) == 'code'&&
AND ( $this->getUrl(1) !== 'config') {
$this->getData(['page', $this->getUrl(0)]) === null $this->core->output['title'];
OR $this->getData(['page', $this->getUrl(0), 'hideTitle']) === false //$this->core->output[include('site/file/source/' . $this->getdata(['module',$this->getUrl(0),'file']))];
) echo include('site/file/source/' . $this->getdata(['module',$this->getUrl(0),'file']));
) { } else {
echo '<h1 id="sectionTitle">' . $this->core->output['title'] . '</h1>'; // Fin de l'exception
if(
$this->core->output['title']
AND (
$this->getData(['page', $this->getUrl(0)]) === null
OR $this->getData(['page', $this->getUrl(0), 'hideTitle']) === false
)
) {
echo '<h1 id="sectionTitle">' . $this->core->output['title'] . '</h1>';
}
echo $this->core->output['content'];
} }
echo $this->core->output['content'];
} }
/** /**

View File

@ -143,14 +143,4 @@ input[type='password']:hover,
.inputFile:hover, .inputFile:hover,
select:hover, select:hover,
textarea:hover { textarea:hover {
} }
/* iframe du module core */
iframe {
height: 100%;
border: none;
margin-top: 10px;
margin-bottom: 10px;
}

View File

@ -63,11 +63,7 @@ class code extends common {
$this->setData(['module', $this->getUrl(0), 'count', helper::filter($this->getData(['module', $this->getUrl(0), 'count']) + 1, helper::FILTER_INT)]); $this->setData(['module', $this->getUrl(0), 'count', helper::filter($this->getData(['module', $this->getUrl(0), 'count']) + 1, helper::FILTER_INT)]);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'content' => '<iframe name="modulecodefile" src="' . 'content' => $this->getData(['module', $this->getUrl(0), 'file']),
helper::baseUrl(false) .
'site/file/source/' .
$this->getData(['module', $this->getUrl(0), 'file']) .
'"></iframe>' ,
'state' => true 'state' => true
]); ]);
} }