From 345dc0e16937781cc42dd4a008c0532411564507 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 13 Apr 2020 09:40:23 +0200 Subject: [PATCH] =?UTF-8?q?[10.0.063]=20suppresion=20option=20ouverture=20?= =?UTF-8?q?=20d'une=20page=20dans=20lity=20cause=20pb=20de=20th=C3=A8me.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 4 +- core/core.php | 80 +++++++------------ core/module/install/ressource/defaultdata.php | 2 - core/module/page/page.php | 2 - core/module/page/view/edit/edit.js.php | 17 ---- core/module/page/view/edit/edit.php | 8 -- 6 files changed, 33 insertions(+), 80 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9833ce38..335a42c5 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,10 +18,10 @@ - L'importation des données est possible uniquement à partir d'une version 9. - Fonction d'import des données provenant d'autres version de ZwiiCMS, avec option de préservation des données utilisateurs. - Nouveau masque dédié à la sauvegarde automatique, à l'import et à l'export des données de site. -- Modification : +- Modifications : - Module gallery optimisé, tri dynamique. - Chargement paresseux des images. - + - Edtion de page : suppression de l'option d'ouverture dans une lity. ## version 9.2.27 - Corrections : - Pages d'administration, thème spécifique diff --git a/core/core.php b/core/core.php index 538d8560..a9808cb2 100644 --- a/core/core.php +++ b/core/core.php @@ -20,7 +20,6 @@ class common { const DISPLAY_LAYOUT_BLANK = 2; const DISPLAY_LAYOUT_MAIN = 3; const DISPLAY_LAYOUT_LIGHT = 4; - const DISPLAY_LAYOUT_POPUP = 5; const GROUP_BANNED = -1; const GROUP_VISITOR = 0; const GROUP_MEMBER = 1; @@ -37,7 +36,7 @@ class common { const THUMBS_WIDTH = 320; // Numéro de version - const ZWII_VERSION = '10.0.062'; + const ZWII_VERSION = '10.0.063'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; @@ -84,7 +83,6 @@ class common { 'notification' => '', 'redirect' => '', 'script' => '', - 'targetLity' => false, 'showBarEditButton' => false, 'showPageContent' => false, 'state' => false, @@ -1519,7 +1517,6 @@ class core extends common { 'disable' => $this->getData(['page', $this->getUrl(0), 'disable']), 'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']), 'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']), - 'targetLity' => is_null($this->getData(['page', $this->getUrl(0), 'targetLity'])) ? false : $this->getData(['page', $this->getUrl(0), 'targetLity']) ]); } // Importe le module @@ -1536,8 +1533,7 @@ class core extends common { 'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']), 'disable' => $this->getData(['page', $this->getUrl(0), 'disable']), 'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']), - 'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']), - 'targetLity' => is_null($this->getData(['page', $this->getUrl(0), 'targetLity'])) ? false : $this->getData(['page', $this->getUrl(0), 'targetLity']) + 'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']) ]); $pageContent = $this->getData(['page', $this->getUrl(0), 'content']); } @@ -1743,40 +1739,30 @@ class core extends common { 'metaDescription' => $this->getData(['config', 'metaDescription']) ]); } - // Traitement de la popup hors connexion. - if( $this->output['targetLity'] && - $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') - ) { - $this->output['display'] = self::DISPLAY_LAYOUT_POPUP; - } - switch($this->output['display']) { - // Layout vide - case self::DISPLAY_LAYOUT_BLANK: - require 'core/layout/blank.php'; - break; - // Affichage en JSON - case self::DISPLAY_JSON: - header('Content-Type: application/json'); - echo json_encode($this->output['content']); - break; - // Layout alléger - case self::DISPLAY_LAYOUT_LIGHT: - require 'core/layout/light.php'; - break; - // Layout principal - case self::DISPLAY_LAYOUT_MAIN: - require 'core/layout/main.php'; - break; - // Layout poup lity - case self::DISPLAY_LAYOUT_POPUP: - require 'core/layout/popup.php'; - break; - // Layout brut - case self::DISPLAY_RAW: - echo $this->output['content']; - break; - } + switch($this->output['display']) { + // Layout vide + case self::DISPLAY_LAYOUT_BLANK: + require 'core/layout/blank.php'; + break; + // Affichage en JSON + case self::DISPLAY_JSON: + header('Content-Type: application/json'); + echo json_encode($this->output['content']); + break; + // Layout alléger + case self::DISPLAY_LAYOUT_LIGHT: + require 'core/layout/light.php'; + break; + // Layout principal + case self::DISPLAY_LAYOUT_MAIN: + require 'core/layout/main.php'; + break; + // Layout brut + case self::DISPLAY_RAW: + echo $this->output['content']; + break; + } } } @@ -2026,7 +2012,6 @@ class layout extends common { // Propriétés de l'item $active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : ''; $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; - $targetLity = ($this->getData(['page', $parentPageId, 'targetLity']) && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) ? ' rel="data-lity"' : ''; // Mise en page de l'item $items .= '
  • '; @@ -2035,7 +2020,7 @@ class layout extends common { {$items .= ''; } else { - $items .= ''; + $items .= ''; } switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { @@ -2082,15 +2067,14 @@ class layout extends common { foreach($childrenPageIds as $childKey) { // Propriétés de l'item $active = ($childKey === $currentPageId) ? ' class="active"' : ''; - $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; - $targetLity = ($this->getData(['page', $childKey, 'targetLity']) && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) ? ' rel="data-lity"' : ''; + $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; // Mise en page du sous-item $items .= '
  • '; if ( $this->getData(['page',$childKey,'disable']) === true AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { $items .= ''; } else { - $items .= ''; + $items .= ''; } switch ($this->getData(['page', $childKey, 'typeMenu'])) { @@ -2183,7 +2167,6 @@ class layout extends common { // Propriétés de l'item $active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : ''; $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; - $targetLity = ($this->getData(['page', $parentPageId, 'targetLity']) && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) ? ' rel="data-lity"' : ''; // Mise en page de l'item; // Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée. if ($onlyChildren === false) { @@ -2192,7 +2175,7 @@ class layout extends common { AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { $items .= ''; } else { - $items .= ''; + $items .= ''; } $items .= $this->getData(['page', $parentPageId, 'title']); $items .= ''; @@ -2206,8 +2189,7 @@ class layout extends common { // Propriétés de l'item $active = ($childKey === $currentPageId) ? ' class="active"' : ''; - $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; - $targetLity = ($this->getData(['page', $childKey, 'targetLity']) && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')) ? ' rel="data-lity"' : ''; + $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; // Mise en page du sous-item $itemsChildren .= '