Merge branch '11000' of https://forge.chapril.org/ZwiiCMS-Team/ZwiiCMS into 11000
This commit is contained in:
commit
89ef3c84ab
@ -2211,6 +2211,11 @@ class core extends common {
|
||||
'style' => file_get_contents($stylePath)
|
||||
]);
|
||||
}
|
||||
if ($output['style']) {
|
||||
$this->addOutput([
|
||||
'style' => $this->output['style'] . file_get_contents($output['style'])
|
||||
]);
|
||||
}
|
||||
// JS
|
||||
$scriptPath = $modulePath . 'module/' . $moduleId . '/view/' . $output['view'] . '/' . $output['view'] . '.js.php';
|
||||
if(file_exists($scriptPath)) {
|
||||
|
@ -180,15 +180,30 @@ class news extends common {
|
||||
public function config() {
|
||||
// Mise à jour des données de module
|
||||
$this->update();
|
||||
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
|
||||
// Générer la feuille de CSS
|
||||
$class = get_called_class();
|
||||
$moduleId = $this->getUrl(0);
|
||||
$style = '.newsContent {height:' . $this->getInput('newsConfigItemsHeight',helper::FILTER_STRING_SHORT) . ';}';
|
||||
// Dossier de l'instance
|
||||
if (!is_dir(self::DATA_DIR . 'modules/' . $class . '/' . $moduleId)) {
|
||||
mkdir (self::DATA_DIR . 'modules/' . $class . '/' . $moduleId, 0775, true);
|
||||
}
|
||||
|
||||
$success = file_put_contents(self::DATA_DIR . 'modules/' . $class . '/' . $moduleId . '/style.css' , $style );
|
||||
// Fin feuille de style
|
||||
|
||||
$this->setData(['module', $this->getUrl(0), 'config',[
|
||||
'feeds' => $this->getInput('newsConfigShowFeeds',helper::FILTER_BOOLEAN),
|
||||
'feedsLabel' => $this->getInput('newsConfigFeedslabel',helper::FILTER_STRING_SHORT),
|
||||
'itemsperPage' => $this->getInput('newsConfigItemsperPage', helper::FILTER_INT,true),
|
||||
'itemsperCol' => $this->getInput('newsConfigItemsperCol', helper::FILTER_INT,true),
|
||||
'itemsHeight' => $this->getInput('newsConfigItemsHeight',helper::FILTER_STRING_SHORT),
|
||||
'version' => $this->getData(['module', $this->getUrl(0), 'config', 'version'])
|
||||
'version' => $this->getData(['module', $this->getUrl(0), 'config', 'version']),
|
||||
'style' => $success ? self::DATA_DIR . 'modules/' . $class . '/' . $moduleId . '/style.css' : ''
|
||||
]]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -387,7 +402,8 @@ class news extends common {
|
||||
$this->addOutput([
|
||||
'showBarEditButton' => true,
|
||||
'showPageContent' => true,
|
||||
'view' => 'index'
|
||||
'view' => 'index',
|
||||
'style' => $this->getData(['module', $this->getUrl(0),'config', 'style'])
|
||||
]);
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
overflow: hidden; /* les dépassements seront masqués */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.newsBlur {
|
||||
position: absolute;
|
||||
bottom: -5%;
|
||||
@ -39,6 +40,7 @@
|
||||
.newsContent {
|
||||
clear: left;
|
||||
margin-left: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.newsSignature {
|
||||
|
@ -5,7 +5,7 @@
|
||||
<h1 class="newsTitle" id="<?php echo $newsId;?>">
|
||||
<?php echo '<a href="'. helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
|
||||
</h1>
|
||||
<div class="newsContent" style="height:<?php echo $this->getData(['module', $this->getUrl(0),'config', 'itemsHeight']); ?>;">
|
||||
<div class="newsContent">
|
||||
<?php echo $news['content']; ?>
|
||||
<div class="newsBlur"></div>
|
||||
</div>
|
||||
|
1
site/data/modules/news/actu/style.css
Normal file
1
site/data/modules/news/actu/style.css
Normal file
@ -0,0 +1 @@
|
||||
.newsContent {height:200px;}
|
Loading…
Reference in New Issue
Block a user