diff --git a/CHANGES.MD b/CHANGES.MD index f80e51b2..c0604283 100644 --- a/CHANGES.MD +++ b/CHANGES.MD @@ -1,5 +1,12 @@ # ChangeLog +## Version 8.5.0 +* Correction : + - Suppression popup active par défaut dans le menu + - Suppression option de titre de page dans le menu Icone + Texte +* Modification : + - Thème du menu : sélection de la police de caractère + ## Version 8.4.9 * Correction : - Adresse d'une page inactive @@ -17,7 +24,7 @@ ## Version 8.4.6 * corrections : - Encodage des dates dans la liste des articles news et blog - - Variable itemsperpage stockée dans le mauvais type + - Variable itemsperPage stockée dans le mauvais type ## Version 8.4.5 * corrections : diff --git a/core/core.php b/core/core.php index 1cd46c02..b6f212cb 100644 --- a/core/core.php +++ b/core/core.php @@ -24,7 +24,7 @@ class common { const GROUP_MEMBER = 1; const GROUP_MODERATOR = 2; const GROUP_ADMIN = 3; - const ZWII_VERSION = '8.4.9'; + const ZWII_VERSION = '8.5.0'; public static $actions = []; public static $coreModuleIds = [ @@ -56,7 +56,7 @@ class common { ], 'timezone' => 'Europe/Paris', 'title' => 'Zwii, votre site en quelques clics !', - 'ItemsperPage' => 10 + 'itemsperPage' => 10 ], 'core' => [ 'dataVersion' => 0, @@ -345,6 +345,7 @@ class common { ], 'menu' => [ 'backgroundColor' => 'rgba(74, 105, 189, 1)', + 'font' => 'Oswald', 'fontSize' => '1em', 'fontWeight' => 'normal', 'height' => '15px 10px', @@ -906,7 +907,7 @@ class common { $this->setData(['theme','footer','socialsPosition','1']); $this->setData(['theme','footer','textPosition','2']); $this->setData(['theme','footer','copyrightPosition','3']); - $this->setData(['config','ItemsperPage',10]); + $this->setData(['config','itemsperPage',10]); $this->setData(['core', 'dataVersion', 840]); $this->SaveData(); } @@ -917,14 +918,19 @@ class common { $this->setData(['theme','footer','copyrightPosition','center']); $this->setData(['core', 'dataVersion', 844]); $this->SaveData(); - } - + } // Version 8.4.6 if($this->getData(['core', 'dataVersion']) < 846) { - $this->setData(['config','ItemsperPage',10]); + $this->setData(['config','iItemsperPage',10]); $this->setData(['core', 'dataVersion', 846]); $this->SaveData(); } + // Version 8.5.0 + if($this->getData(['core', 'dataVersion']) < 850) { + $this->setData(['theme','menu','font',10]); + $this->setData(['core', 'dataVersion', 850]); + $this->SaveData(); + } } } @@ -997,7 +1003,7 @@ class core extends common { // Version $css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/'; // Import des polices de caractères - $css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '");'; + $css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '|' . $this->getData(['theme', 'menu', 'font']) . '");'; // Fond du site $colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor'])); $css .= 'body{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}'; @@ -1058,7 +1064,7 @@ class core extends common { $css .= 'nav{margin:0 20px 0}'; } } - $css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) . ';font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}'; + $css .= '#toggle span,#menu a{padding:' . $this->getData(['theme', 'menu', 'height']) .';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'menu', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'menu', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'menu', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'menu', 'textTransform']) . '}'; // Pied de page $colors = helper::colorVariants($this->getData(['theme', 'footer', 'backgroundColor'])); if($this->getData(['theme', 'footer', 'margin'])) { @@ -1880,14 +1886,14 @@ class layout extends common { $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; // Mise en page de l'item $items .= '
  • '; - // Menu image - + if ( $this->getData(['page',$parentPageId,'disable']) === true AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) - {$items .= '';} - else { - $items .= ''; } + {$items .= ''; + } else { + $items .= ''; + } switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { @@ -1906,22 +1912,13 @@ class layout extends common { break; case 'icontitle' : if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") { - $items .= ''.$this->getData(['page', $parentPageId, 'title']).''; + $items .= ''.$this->getData(['page', $parentPageId, 'title']).''; } else { - $items .= $this->getData(['page', $parentPageId, 'title']); + $items .= $this->getData(['page', $parentPageId, 'title']); } break; - case 'icontext' : - if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") { - $items .= ''.$this->getData(['page', $parentPageId, 'title']).''; - $items .= $this->getData(['page', $parentPageId, 'title']); - } else { - $items .= $this->getData(['page', $parentPageId, 'title']); - } - break; } - // Menu Image diff --git a/core/module/config/config.php b/core/module/config/config.php index be1f4963..969eed20 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -222,7 +222,7 @@ class config extends common { ], 'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true), 'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true), - 'ItemsperPage' => $this->getInput('ItemsperPage', helper::FILTER_INT,true) + 'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true) ] ]); if(self::$inputNotices === []) { diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 704eb23b..7ab88a59 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -57,9 +57,9 @@ ]); ?> - 'Pagination Blog et News', - 'selected' => $this->getData(['config', 'ItemsperPage']), + 'selected' => $this->getData(['config', 'itemsperPage']), 'help' => 'Nombre d\'articles de blog ou de news par page' ]); ?> diff --git a/core/module/page/page.php b/core/module/page/page.php index f213d66c..cccf8a38 100755 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -28,8 +28,7 @@ class page extends common { public static $typeMenu = [ 'text' => 'Texte', 'icon' => 'Icône', - 'icontitle' => 'Icône et bulle', - 'icontext' => 'Icône et texte' + 'icontitle' => 'Icône et bulle' ]; // menu image // Position du module diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index d48abd23..319925a2 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -356,6 +356,7 @@ class theme extends common { if($this->isPost()) { $this->setData(['theme', 'menu', [ 'backgroundColor' => $this->getInput('themeMenuBackgroundColor'), + 'font' => $this->getInput('themeMenuFont'), 'fontSize' => $this->getInput('themeMenuFontSize'), 'fontWeight' => $this->getInput('themeMenuFontWeight'), 'height' => $this->getInput('themeMenuHeight'), diff --git a/core/module/theme/view/menu/menu.js.php b/core/module/theme/view/menu/menu.js.php index b171e55b..fc9c6ea6 100755 --- a/core/module/theme/view/menu/menu.js.php +++ b/core/module/theme/view/menu/menu.js.php @@ -14,14 +14,17 @@ * Aperçu en direct */ $("input, select").on("change", function() { - // Couleurs du menu + // Import des polices de caractères + var menuFont = $("#themeMenuFont").val(); + var css = "@import url('https://fonts.googleapis.com/css?family=" + menuFont + "');"; var colors = core.colorVariants($("#themeMenuBackgroundColor").val()); - var css = "nav,nav a{background-color:" + colors.normal + "}"; + // Couleurs du menu + css += "nav,nav a{background-color:" + colors.normal + "}"; css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}"; css += "nav a:hover{background-color:" + colors.darken + "}"; css += "nav a.active{background-color:" + colors.veryDarken + "}"; // Taille, hauteur, épaisseur et capitalisation de caractères du menu - css += "#toggle span,#menu a{padding:" + $("#themeMenuHeight").val() + ";font-weight:" + $("#themeMenuFontWeight").val() + ";font-size:" + $("#themeMenuFontSize").val() + ";text-transform:" + $("#themeMenuTextTransform").val() + "}"; + css += "#toggle span,#menu a{padding:" + $("#themeMenuHeight").val() + ";font-family:'" + menuFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeMenuFontWeight").val() + ";font-size:" + $("#themeMenuFontSize").val() + ";text-transform:" + $("#themeMenuTextTransform").val() + "}"; // Alignement du menu css += "#menu{text-align:" + $("#themeMenuTextAlign").val() + "}"; // Marge diff --git a/core/module/theme/view/menu/menu.php b/core/module/theme/view/menu/menu.php index 58b8aae2..905a00c6 100755 --- a/core/module/theme/view/menu/menu.php +++ b/core/module/theme/view/menu/menu.php @@ -38,25 +38,33 @@

    Mise en forme du texte

    -
    +
    'Caractères', 'selected' => $this->getData(['theme', 'menu', 'textTransform']) ]); ?>
    -
    +
    'Style', 'selected' => $this->getData(['theme', 'menu', 'fontWeight']) ]); ?>
    -
    - 'Taille', - 'selected' => $this->getData(['theme', 'menu', 'fontSize']) - ]); ?> -
    +
    +
    + 'Police', + 'selected' => $this->getData(['theme', 'menu', 'font']) + ]); ?> +
    +
    + 'Taille', + 'selected' => $this->getData(['theme', 'menu', 'fontSize']) + ]); ?> +
    +
    diff --git a/module/blog/blog.php b/module/blog/blog.php index ce3a2d65..8c4bf930 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -99,7 +99,7 @@ class blog extends common { // Ids des commentaires par ordre de création $commentIds = array_keys(helper::arrayCollumn($comments, 'createdOn', 'SORT_DESC')); // Pagination - $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','ItemsperPage'])); + $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage'])); // Liste des pages self::$pages = $pagination['pages']; // Commentaires en fonction de la pagination @@ -155,7 +155,7 @@ class blog extends common { // Ids des articles par ordre de publication $articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0)]), 'publishedOn', 'SORT_DESC')); // Pagination - $pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','ItemsperPage'])); + $pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','itemsperPage'])); // Liste des pages self::$pages = $pagination['pages']; // Articles en fonction de la pagination @@ -318,7 +318,7 @@ class blog extends common { // Ids des commentaires par ordre de publication $commentIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'comment']), 'createdOn', 'SORT_DESC')); // Pagination - $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','ItemsperPage']),'#comment'); + $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage']),'#comment'); // Liste des pages self::$pages = $pagination['pages']; // Commentaires en fonction de la pagination @@ -346,7 +346,7 @@ class blog extends common { } } // Pagination - $pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','ItemsperPage'])); + $pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','itemsperPage'])); // Liste des pages self::$pages = $pagination['pages']; // Articles en fonction de la pagination diff --git a/module/form/form.php b/module/form/form.php index f6effce8..40a62c86 100755 --- a/module/form/form.php +++ b/module/form/form.php @@ -104,7 +104,7 @@ class form extends common { $data = $this->getData(['module', $this->getUrl(0), 'data']); if($data) { // Pagination - $pagination = helper::pagination($data, $this->getUrl(),$this->getData(['config','ItemsperPage'])); + $pagination = helper::pagination($data, $this->getUrl(),$this->getData(['config','itemsperPage'])); // Liste des pages self::$pagination = $pagination['pages']; // Inverse l'ordre du tableau diff --git a/module/news/news.php b/module/news/news.php index b4b93fdc..a57ccec8 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -82,7 +82,7 @@ class news extends common { // Ids des news par ordre de publication $newsIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0)]), 'publishedOn', 'SORT_DESC')); // Pagination - $pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','ItemsperPage'])); + $pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','itemsperPage'])); // Liste des pages self::$pages = $pagination['pages']; // News en fonction de la pagination @@ -205,7 +205,7 @@ class news extends common { } } // Pagination - $pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','ItemsperPage'])); + $pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','itemsperPage'])); // Liste des pages self::$pages = $pagination['pages']; // News en fonction de la pagination