mise en place editeur dans site

This commit is contained in:
fredtempez 2019-01-02 23:55:43 +01:00
parent 0718a8e6db
commit 3222aaf7d5
4 changed files with 52 additions and 11 deletions

View File

@ -349,7 +349,8 @@ class common {
'backgroundColor' => 'rgba(255, 255, 255, 1)', 'backgroundColor' => 'rgba(255, 255, 255, 1)',
'radius' => '0', 'radius' => '0',
'shadow' => '0', 'shadow' => '0',
'width' => '1170px' 'width' => '1170px',
'blocks' => '100'
], ],
'text' => [ 'text' => [
'font' => 'Open+Sans', 'font' => 'Open+Sans',
@ -994,7 +995,9 @@ class common {
} }
// Version 9.0.0 // Version 9.0.0
if($this->getData(['core', 'dataVersion']) < 900) { if($this->getData(['core', 'dataVersion']) < 900) {
$this->setData(['theme', 'site', 'blocks','100']);
$this->setData(['theme', 'site', 'contentLeft','']);
$this->setData(['theme', 'site', 'contentRight','']);
$this->setData(['core', 'dataVersion', 900]); $this->setData(['core', 'dataVersion', 900]);
$this->SaveData(); $this->SaveData();
} }

View File

@ -24,19 +24,18 @@ class page extends common {
]; ];
public static $moduleIds = []; public static $moduleIds = [];
// Menu image
public static $typeMenu = [ public static $typeMenu = [
'text' => 'Texte', 'text' => 'Texte',
'icon' => 'Icône', 'icon' => 'Icône',
'icontitle' => 'Icône et bulle' 'icontitle' => 'Icône et bulle'
]; ];
// menu image
// Position du module // Position du module
public static $modulePosition = [ public static $modulePosition = [
'bottom' => 'En bas', 'bottom' => 'En bas',
'top' => 'En haut', 'top' => 'En haut',
'free' => 'Libre' 'free' => 'Libre'
]; ];
/** /**
* Création * Création
*/ */
@ -46,12 +45,10 @@ class page extends common {
$this->setData([ $this->setData([
'page', 'page',
$pageId, $pageId,
[ [
// Menu icon
'typeMenu' => 'text', 'typeMenu' => 'text',
'iconUrl' => '', 'iconUrl' => '',
'disable' => false, 'disable' => false,
// Menu icon
'content' => 'Contenu de votre nouvelle page.', 'content' => 'Contenu de votre nouvelle page.',
'hideTitle' => false, 'hideTitle' => false,
'metaDescription' => '', 'metaDescription' => '',

View File

@ -201,9 +201,18 @@ class theme extends common {
'contain' => 'Image entière', 'contain' => 'Image entière',
'cover' => 'Largeur adaptée au fond', 'cover' => 'Largeur adaptée au fond',
'100% 100%' => 'Taille adaptée au fond' '100% 100%' => 'Taille adaptée au fond'
]; ];
public static $siteBlocks = [
'100' => 'Une colonne',
'33-66' => 'Deux colonnes : 1/3 - 2/3',
'66-33' => 'Deux colonnes : 2/3 - 1/3',
'25-75' => 'Deux colonnes : 1/4 - 3/4',
'75-25' => 'Deux colonnes : 3/4 - 1/2',
'25-50-25' => 'Trois colonnes : 1/4 - 1/2 - 1/4'
];
/** /**
* Mode avancé * Mode avancé
*/ */
@ -424,7 +433,11 @@ class theme extends common {
'backgroundColor' => $this->getInput('themeSiteBackgroundColor'), 'backgroundColor' => $this->getInput('themeSiteBackgroundColor'),
'radius' => $this->getInput('themeSiteRadius'), 'radius' => $this->getInput('themeSiteRadius'),
'shadow' => $this->getInput('themeSiteShadow'), 'shadow' => $this->getInput('themeSiteShadow'),
'width' => $this->getInput('themeSiteWidth') 'width' => $this->getInput('themeSiteWidth'),
'blocks' => $this->getInput('themeSiteBlocks'),
'contentLeft' => (empty($this->getInput('themeSiteContentleft', null)) ? "<p></p>" : $this->getInput('themeSiteContentleft', null)),
'contentRight' => (empty($this->getInput('themeSiteContentright', null)) ? "<p></p>" : $this->getInput('themeSiteContentright', null))
]]); ]]);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
@ -437,7 +450,8 @@ class theme extends common {
$this->addOutput([ $this->addOutput([
'title' => 'Personnalisation du site', 'title' => 'Personnalisation du site',
'vendor' => [ 'vendor' => [
'tinycolorpicker' 'tinycolorpicker',
'tinymce'
], ],
'view' => 'site' 'view' => 'site'
]); ]);

View File

@ -131,4 +131,31 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="block">
<h4>Mise en page</h4>
<div class='row'>
<div class="col3">
<?php echo template::select('themeSiteBlocks', $module::$siteBlocks, [
'label' => 'Colonnes',
'selected' => $this->getData(['theme', 'site', 'blocks'])
]); ?>
</div>
</div>
<div class='row'>
<div class="col6">
<?php echo template::textarea('themeSiteContentright', [
'class' => 'editorWysiwyg',
'value' => $this->getData(['theme', 'site', 'contentRight'])
]); ?>
</div>
<div class="col6">
<?php echo template::textarea('themeSiteContentleft', [
'class' => 'editorWysiwyg',
'value' => $this->getData(['theme', 'site', 'contentLeft'])
]); ?>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>