forked from ZwiiCMS-Team/ZwiiCMS
Page Améliore l'insertion CSS et JS
This commit is contained in:
parent
1de6177929
commit
189f5e1365
@ -49,7 +49,7 @@ class common
|
||||
// Numéro de version
|
||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
|
||||
|
||||
const ZWII_VERSION = '12.0.00-dev020';
|
||||
const ZWII_VERSION = '12.0.00-dev021';
|
||||
const ZWII_UPDATE_CHANNEL = "test";
|
||||
|
||||
public static $actions = [];
|
||||
@ -2935,8 +2935,7 @@ class core extends common
|
||||
'title' => $title,
|
||||
'content' => $this->getPage($this->getUrl(0), self::$i18nContent) .
|
||||
// Concatène avec les paramètres avancés.
|
||||
$this->getData(['page', $this->getUrl(0), 'css']) .
|
||||
$this->getData(['page', $this->getUrl(0), 'js']),
|
||||
'<script>' . $this->getData(['page', $this->getUrl(0), 'js']) . '</script>',
|
||||
'metaDescription' => $this->getData(['page', $this->getUrl(0), 'metaDescription']),
|
||||
'metaTitle' => $this->getData(['page', $this->getUrl(0), 'metaTitle']),
|
||||
'typeMenu' => $this->getData(['page', $this->getUrl(0), 'typeMenu']),
|
||||
|
@ -20,6 +20,10 @@
|
||||
<link rel="alternate" type="application/rss+xml" href="'<?php echo helper::baseUrl(). $this->getUrl(0) . '/rss';?>" title="fLUX rss">
|
||||
<?php endif; ?>
|
||||
<?php $this->showStyle(); ?>
|
||||
<!-- Style de la page affichée -->
|
||||
<?php if ( $this->getData(['page', $this->getUrl(0), 'css'])): ?>
|
||||
<?php echo '<style>' . $this->getData(['page', $this->getUrl(0), 'css']) . '</style>'; ?>
|
||||
<?php endif;?>
|
||||
<!-- Script perso dans le header -->
|
||||
<?php if (file_exists(self::DATA_DIR .'head.inc.html')) {
|
||||
include(self::DATA_DIR .'head.inc.html');
|
||||
|
@ -199,7 +199,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
]
|
||||
],
|
||||
'module' => [],
|
||||
@ -359,7 +361,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'enfant' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -384,7 +388,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'privee' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -409,7 +415,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'mise-en-page' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -434,7 +442,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'menu-lateral' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -459,7 +469,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'blog' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -484,7 +496,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'galeries' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -509,7 +523,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'site-de-zwii' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -535,7 +551,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'contact' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -560,7 +578,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'barre' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -585,7 +605,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'barrelateraleavecmenu' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -610,7 +632,9 @@ class init extends common {
|
||||
'displayMenu' => 'parents',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'mentions-legales' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -636,7 +660,9 @@ class init extends common {
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuHead' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'erreur302' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -662,7 +688,9 @@ class init extends common {
|
||||
'hideMenuSide' => true,
|
||||
'hideMenuHead' => true,
|
||||
'hideMenuChildren' => true,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'erreur403' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -687,7 +715,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'erreur404' => [
|
||||
'typeMenu' => 'text',
|
||||
@ -712,7 +742,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false,
|
||||
'extraPosition' => false
|
||||
'extraPosition' => false,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
'recherche' => [
|
||||
'typeMenu' => 'icon',
|
||||
@ -737,7 +769,9 @@ class init extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' => false,
|
||||
'extraPosition' => true
|
||||
'extraPosition' => true,
|
||||
'css' => '',
|
||||
'js' => ''
|
||||
],
|
||||
],
|
||||
'module' => [
|
||||
|
@ -299,6 +299,7 @@
|
||||
"Enregistrer": "To register",
|
||||
"Éditeur CSS": "CSS publisher",
|
||||
"Éditeur JS": "JS editor",
|
||||
"Ne pas saisir les balises": "Do not enter tags",
|
||||
"Accueil": "Welcome",
|
||||
"Aide": "Aide",
|
||||
"Fontes": "Sources",
|
||||
|
@ -253,7 +253,6 @@
|
||||
"Contenu": "Contenido",
|
||||
"Mise en forme des titres": "Formato de título",
|
||||
"Copie des traductions rédigées": "Copia de traducciones redactadas",
|
||||
"Multilangue": "Multilingüe",
|
||||
"Identité": "Identificación",
|
||||
"Permissions :": "Permisos",
|
||||
"Accès aux pages privées": "Acceso a páginas privadas",
|
||||
@ -300,6 +299,7 @@
|
||||
"Enregistrer": "Registrar",
|
||||
"Éditeur CSS": "Editor de CSS",
|
||||
"Éditeur JS": "Editor de JS",
|
||||
"Ne pas saisir les balises": "No ingrese las etiquetas",
|
||||
"Accueil": "Inicio",
|
||||
"Aide": "Ayuda",
|
||||
"Fontes": "Tipografias",
|
||||
@ -366,6 +366,7 @@
|
||||
"Archive invalide": "Archivo no válido",
|
||||
"Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.": "El control deslizante horizontal establece el nivel de transparencia, colóquelo completamente hacia la izquierda para obtener un resaltado invisible.",
|
||||
"Contenu multilangues": "Contenido multilingüe",
|
||||
"Multilangue": "Multilingüe",
|
||||
"Extension": "Extensión",
|
||||
"Permission": "Permiso",
|
||||
"Emplacement dans le menu": "Ubicación en el menú",
|
||||
|
@ -299,6 +299,7 @@
|
||||
"Enregistrer": "",
|
||||
"Éditeur CSS": "",
|
||||
"Éditeur JS": "",
|
||||
"Ne pas saisir les balises": "",
|
||||
"Accueil": "",
|
||||
"Aide": "",
|
||||
"Fontes": "",
|
||||
|
@ -462,6 +462,7 @@ class page extends common
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modifie la page ou en crée une nouvelle si l'id a changé
|
||||
$this->setData([
|
||||
'page',
|
||||
@ -492,7 +493,7 @@ class page extends common
|
||||
'hideMenuChildren' => $this->getinput('pageEditHideMenuChildren', helper::FILTER_BOOLEAN),
|
||||
'extraPosition' => $this->getinput('pageEditExtraPosition', helper::FILTER_BOOLEAN),
|
||||
'css' => $this->getData(['page', $this->getUrl(2), 'css']),
|
||||
'js' => $this->getData(['page', $this->getUrl(2), 'js'])
|
||||
'js' => $this->getData(['page', $this->getUrl(2), 'js']),
|
||||
]
|
||||
]);
|
||||
|
||||
@ -561,10 +562,14 @@ class page extends common
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if ($this->isPost()) {
|
||||
// Supprime les balises styles si elles ont été saisies
|
||||
$css = $this->getInput('pageCssEditorContent', null);
|
||||
$css = str_replace('<style>', '', $css);
|
||||
$css = str_replace('</style>', '', $css);
|
||||
// Enregistre le CSS
|
||||
$this->setData([
|
||||
'page', $this->getUrl(2), 'css',
|
||||
$this->getInput('pageCssEditorContent', null)
|
||||
$css
|
||||
]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -589,11 +594,15 @@ class page extends common
|
||||
public function jsEditor()
|
||||
{
|
||||
// Soumission du formulaire
|
||||
// Supprime les balises scripts si elles ont été saisies
|
||||
$js = $this->getInput('pageJsEditorContent', null);
|
||||
$js = str_replace('<script>', '', $js);
|
||||
$js = str_replace('<script>', '', $js);
|
||||
if ($this->isPost()) {
|
||||
// Enregistre le JS
|
||||
$this->setData([
|
||||
'page', $this->getUrl(2), 'js',
|
||||
$this->getInput('pageJsEditorContent', null)
|
||||
$js
|
||||
]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -12,6 +12,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo helper::translate('Ne pas saisir les balises') . htmlentities(' <style></style>'); ?>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageCssEditorContent', [
|
||||
'value' => empty($this->getData(['page', $this->getUrl(2), 'css'])) ? '' : $this->getData(['page', $this->getUrl(2), 'css']),
|
||||
|
@ -12,6 +12,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo helper::translate('Ne pas saisir les balises') . htmlentities(' <script></script>'); ?>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageJsEditorContent', [
|
||||
'value' => empty($this->getData(['page', $this->getUrl(2), 'js'])) ? '' : $this->getData(['page', $this->getUrl(2), 'js']),
|
||||
|
Loading…
Reference in New Issue
Block a user