From 6180b903c9f0302634d29c439daabce812172a68 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 1 Nov 2020 08:51:23 +0100 Subject: [PATCH 1/8] =?UTF-8?q?Alignement=20du=20menu=20centr=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 2 +- core/layout/common.css | 13 +++++++++---- core/module/theme/view/menu/menu.js.php | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/core.php b/core/core.php index b9b031ea..63ddfaa8 100644 --- a/core/core.php +++ b/core/core.php @@ -1597,7 +1597,7 @@ class core extends common { } $css .= 'nav #burgerText{color:' . $colors['text'] . '}'; $css .= 'nav .navLevel1 a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}'; - $css .= '#menuLeft{float:' . $this->getData(['theme', 'menu', 'textAlign']) . '}'; + $css .= '#menu{text-align:' . $this->getData(['theme', 'menu', 'textAlign']) . '}'; if($this->getData(['theme', 'menu', 'margin'])) { if( $this->getData(['theme', 'menu', 'position']) === 'site-first' diff --git a/core/layout/common.css b/core/layout/common.css index 18ceda2e..9ea30bbb 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -522,20 +522,25 @@ nav a:hover { text-decoration: none; } -nav #menuLeft { + +/* Barre de menu */ + +#menuLeft { display: inline-flex; - /*float: left;*/ } -nav #menuRight { - display: inline-flex; + +#menuRight { + display: inline-flex ; float: right; } + /* fin barre de menu */ nav::after { content: " "; clear: both; display: flex; } + nav::before { content: " "; clear: left; diff --git a/core/module/theme/view/menu/menu.js.php b/core/module/theme/view/menu/menu.js.php index 02b257fb..ab3848a5 100644 --- a/core/module/theme/view/menu/menu.js.php +++ b/core/module/theme/view/menu/menu.js.php @@ -54,7 +54,7 @@ $("input, select").on("change", function() { // Taille, hauteur, épaisseur et capitalisation de caractères du menu 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 += "#menuLeft{float:" + $("#themeMenuTextAlign").val() + "}"; + css += "#menu{text-align:" + $("#themeMenuTextAlign").val() + "}"; // Marge if($("#themeMenuMargin").is(":checked")) { if( From 7783eb69abf886b06e6655a27faa56c26c061198 Mon Sep 17 00:00:00 2001 From: Fred <23246457+fredtempez@users.noreply.github.com> Date: Sun, 1 Nov 2020 09:12:28 +0100 Subject: [PATCH 2/8] taille de la loupe --- site/file/source/icones/loupe.png | Bin 1577 -> 8085 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/site/file/source/icones/loupe.png b/site/file/source/icones/loupe.png index c0aec15fc4d0b4eea509a4d5c8e62614da977d4e..c33662537c00a864e409a24ae116e6d92f748db4 100755 GIT binary patch literal 8085 zcmeHLc|6o>+eeWsDcMpoRQ54rW-v2`vSnYgWR1ow3}!Ji)~uyyvt(aFqAXD&vXzoT zmTVU5mnlnj zP^Z8IM^lt}hSazSo=G;Wvqi z$DIE(A{}q;II8`i&1`UPiR+98irYP`iV_SYWC4TG`#X=!Btk=h4);3flS!4{Yg6RCS>Qf2Uu6caZ$o z-NGtbv&+O-n-QBY=}Uzlo6k+pWI>CAm7NBKrb2PAPev5^ysnHM^l{`NRXypboL$pM z3Zgc6>$a|DfvO$ZO5Q?G`V23od-FL@J5@}NR<$ai6l{ncD0{m+Q4xXifGb$&YTj$f$`sZef!j;c%)N4%(VNO()J8_&85J zx!Oe$IuaSJ!ODAx{Wz=3fe?$v_vV5iO`Yt6O%^#v#kJ!_Fc%Dil~)9=wSN^msHPtcW5l=rn!%)3`P=HS-pVg#({be9eanCQfqsi!#w zh>^aqnq7i-HeSDkoH>|)PlmiRhPFedBzqE_(M=cRi)xw+__}W)?gaaN+oya=ua%gy z@Oa_KWe3Zuv^$2<*~wwa*D;~Vl1H@E8m607wz>)+8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(0bkfG{g zK~%(1t5Adrp;lE=Cr2km7b)?+q|hS9 z2bcG8-aCi;?gNBInQ2znIH2iOGnI&one3_}4DgA>v&=B7#2duZn^lAJK5>{8WtI4xc+8{*i66PHxctVs;IP0m!)7`) zPaGx|3mvRWF%8f*2*Ul_{iE6ZG`iXeeSEJ1<@1vQjV zMinvIby6&(=sfP>A9DN>xfF7hz{s(H3N*-$e;@o0e$Up*PfoZ=p*Ya}V%s0XKwuYW z)@}Ry*tVM|fd3h|(%b$@1DN?Fz24TMM?l{;aBz7U)@X=hiyM=>w3aStW0PgF|4XK-uda?+$j(?cY1C`TYQ4ZgQYI+KA==000JJ zlZzcJe+Uo=95tW6C#(Pf0We8KK~zY`-IY&H!cY*#UrAsi+=EC+-N>H{a0w5hOP0E! zT5kh!MZAFE1;i7e2_>oi+fFB-paUep5_p#`W$XMT za09ppa`sCOq(Gxe@R@>afLovkoJjk?9gqn#e>0INbAT71TY!s!m9VL$=eaWP2H;~= zk^`q91c@?A3>ByHnS_9!1wJirRzmz-PjS?`NmE8zTe&QWqUjp(jL zJ%i7ntVMnWQ#~&XdF`+dmNCtMH~@bJY~|Coj@_z=M8RLJW9@*tw<+tE}q@umIk)uAdaR?cu0Q5}3&4HfmP$NXq00000NkvXXu0mjfTHWAA From f863b69a4daa5dda554660798ef045efa33c092c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 1 Nov 2020 13:38:25 +0100 Subject: [PATCH 3/8] Localisation avec test de l'encodage --- core/core.php | 4 +++- core/module/config/config.php | 4 +++- core/module/user/user.php | 6 ++++-- index.php | 1 - module/blog/blog.php | 15 ++++++++++----- module/blog/view/article/article.php | 15 ++++++++++++--- module/blog/view/index/index.php | 4 +++- module/news/news.php | 10 +++++++--- module/news/view/index/index.php | 4 +++- 9 files changed, 45 insertions(+), 18 deletions(-) diff --git a/core/core.php b/core/core.php index 63ddfaa8..c34e8c79 100644 --- a/core/core.php +++ b/core/core.php @@ -1717,7 +1717,9 @@ class core extends common { exit(); } // Journalisation - $dataLog = strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';' ; + $dataLog = mb_detect_encoding(strftime('%d/%m/%y',time()), 'UTF-8', true) + ? strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';' + : utf8_encode(strftime('%d/%m/%y',time())) . ';' . utf8_encode(strftime('%R',time())) . ';' ; $dataLog .= helper::getIp() . ';'; $dataLog .= $this->getUser('id') ? $this->getUser('id') . ';' : 'anonyme' . ';'; $dataLog .= $this->getUrl(); diff --git a/core/module/config/config.php b/core/module/config/config.php index 13e474b5..c0ca5bcb 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -695,7 +695,9 @@ class config extends common { $d = $this->getData(['blacklist']); $data = ''; foreach ($d as $key => $item) { - $data .= strftime('%d/%m/%y',$item['lastFail']) . ';' . strftime('%R',$item['lastFail']) . ';' ; + $data .= mb_detect_encoding(strftime('%d/%m/%y',$item['lastFail']), 'UTF-8', true) + ? strftime('%d/%m/%y',$item['lastFail']) . ';' . utf8_encode(strftime('%R',$item['lastFail'])) . ';' + : utf8_encode(strftime('%d/%m/%y',$item['lastFail'])) . ';' . utf8_encode(strftime('%R',$item['lastFail'])) . ';' ; $data .= $key . ';' . $item['ip'] . ';' . $item['connectFail'] . PHP_EOL; } file_put_contents($fileName,$data,FILE_APPEND); diff --git a/core/module/user/user.php b/core/module/user/user.php index f1c8aeef..9d8ce8e5 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -53,7 +53,7 @@ class user extends common { $userFirstname = $this->getInput('userAddFirstname', helper::FILTER_STRING_SHORT, true); $userLastname = $this->getInput('userAddLastname', helper::FILTER_STRING_SHORT, true); $userMail = $this->getInput('userAddMail', helper::FILTER_MAIL, true); - + // Stockage des données $this->setData([ 'user', @@ -433,7 +433,9 @@ class user extends common { $notification = 'Trop de tentatives, accès bloqué durant ' . ($this->getData(['config', 'connect', 'timeout']) / 60) . ' minutes.'; } // Journalisation - $dataLog = strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';' ; + $dataLog = mb_detect_encoding(strftime('%d/%m/%y',time()), 'UTF-8', true) + ? strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';' + : utf8_encode(strftime('%d/%m/%y',time())) . ';' . utf8_encode(strftime('%R',time())) . ';' ; $dataLog .= helper::getIp() . ';'; $dataLog .= $userId . ';' ; $dataLog .= $this->getUrl() .';' ; diff --git a/index.php b/index.php index 0aef1059..30ea149e 100644 --- a/index.php +++ b/index.php @@ -37,7 +37,6 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) { date_default_timezone_set('Europe/Paris'); setlocale (LC_ALL,'french','fr_Fr','fr_FR.utf8'); - /** * Chargement des classes */ diff --git a/module/blog/blog.php b/module/blog/blog.php index 0b37766d..a13c011c 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -127,7 +127,9 @@ class blog extends common { // Met en forme le tableau $comment = $comments[$commentIds[$i]]; self::$comments[] = [ - strftime('%d %B %Y - %H:%M', $comment['createdOn']), + mb_detect_encoding(strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true) + ? strftime('%d %B %Y - %H:%M', $comment['createdOn']) + : utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])), $comment['content'], $comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'], template::button('blogCommentDelete' . $commentIds[$i], [ @@ -188,12 +190,15 @@ class blog extends common { // Articles en fonction de la pagination for($i = $pagination['first']; $i < $pagination['last']; $i++) { // Met en forme le tableau + $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))); + $heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])), 'UTF-8', true) + ? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])) + : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn']))); self::$articles[] = [ $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'title']), - // date('d/m/Y H:i', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])), - strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])) - .' à '. - strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $articleIds[$i], 'publishedOn'])), + $date .' à '. $heure, self::$states[$this->getData(['module', $this->getUrl(0), $articleIds[$i], 'state'])], template::button('blogConfigEdit' . $articleIds[$i], [ 'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $articleIds[$i] . '/' . $_SESSION['csrf'], diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index 0e48c040..8b5e5d30 100644 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -3,8 +3,14 @@
- getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?> - à getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?> + getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); + $heure = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); + echo $date . ' à ' . $heure; + ?>
- le + le diff --git a/module/blog/view/index/index.php b/module/blog/view/index/index.php index 7265af36..271e2dba 100644 --- a/module/blog/view/index/index.php +++ b/module/blog/view/index/index.php @@ -34,7 +34,9 @@
- +

... diff --git a/module/news/news.php b/module/news/news.php index 4499028c..10486ec8 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -89,11 +89,15 @@ class news extends common { // News en fonction de la pagination for($i = $pagination['first']; $i < $pagination['last']; $i++) { // Met en forme le tableau + $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])), 'UTF-8', true) + ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])) + : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))); + $heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])), 'UTF-8', true) + ? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])) + : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn']))); self::$news[] = [ $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'title']), - strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])) - .' à '. - strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $newsIds[$i], 'publishedOn'])), + $date .' à '. $heure, self::$states[$this->getData(['module', $this->getUrl(0), $newsIds[$i], 'state'])], template::button('newsConfigEdit' . $newsIds[$i], [ 'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsIds[$i]. '/' . $_SESSION['csrf'], diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php index 7c34a1da..60bbe60b 100644 --- a/module/news/view/index/index.php +++ b/module/news/view/index/index.php @@ -10,7 +10,9 @@

- + - getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
From 62da5cc5b5284ca9f752e8d8e433c56f3fc6503f Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 1 Nov 2020 14:15:13 +0100 Subject: [PATCH 4/8] =?UTF-8?q?double=20arri=C3=A8re-plan=20dans=20le=20me?= =?UTF-8?q?nu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 +- core/core.php | 2 +- core/module/theme/view/menu/menu.js.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b12c1a6d..6ccc6460 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,7 @@ - Thème : import d'un thème, d'administration impossible. - Thème : import d'un thème, nettoyage du dossier tmp. - Thème administration : modification de l'appel du code CSS permettant une mise à jour du thème sans vider le cache. - - Thème du menu : alignement inopérant. + - Thème du menu : alignement inopérant ; arrière-plan semi-transparent non uniforme. - Amélioration : - Mise en page du corps des mails de notification. - Paramètres de localisation. diff --git a/core/core.php b/core/core.php index c34e8c79..55a6515a 100644 --- a/core/core.php +++ b/core/core.php @@ -1584,7 +1584,7 @@ class core extends common { $css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}'; // Menu $colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor'])); - $css .= 'nav,nav a{background-color:' . $colors['normal'] . '}'; + $css .= 'nav,nav .navLevel2 a{background-color:' . $colors['normal'] . '}'; $css .= 'nav a,#toggle span,nav a:hover{color:' . $this->getData(['theme', 'menu', 'textColor']) . '}'; $css .= 'nav a:hover{background-color:' . $colors['darken'] . '}'; $css .= 'nav a.active{color:' . $this->getData(['theme','menu','activeTextColor']) . ';}'; diff --git a/core/module/theme/view/menu/menu.js.php b/core/module/theme/view/menu/menu.js.php index ab3848a5..021f4d8e 100644 --- a/core/module/theme/view/menu/menu.js.php +++ b/core/module/theme/view/menu/menu.js.php @@ -43,7 +43,7 @@ $("input, select").on("change", function() { var css = "@import url('https://fonts.googleapis.com/css?family=" + menuFont + "');"; var colors = core.colorVariants($("#themeMenuBackgroundColor").val()); // Couleurs du menu - css += "nav,nav a{background-color:" + colors.normal + "}"; + css += "nav,nav .navLevel2 a{background-color:" + colors.normal + "}"; css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}"; css += "nav a:hover{background-color:" + colors.darken + "}"; if ($("#themeMenuActiveColorAuto").is(':checked')) { From ba7a0633b09366d1fcbc7f8a84709f84d46a0118 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 1 Nov 2020 19:00:24 +0100 Subject: [PATCH 5/8] colorvariants option rgb supprime la transparence --- core/class/helper.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/class/helper.class.php b/core/class/helper.class.php index f14395fc..58613dc0 100644 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -219,7 +219,8 @@ class helper { 'normal' => 'rgba(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')', 'darken' => 'rgba(' . max(0, $rgba[0] - 15) . ',' . max(0, $rgba[1] - 15) . ',' . max(0, $rgba[2] - 15) . ',' . $rgba[3] . ')', 'veryDarken' => 'rgba(' . max(0, $rgba[0] - 20) . ',' . max(0, $rgba[1] - 20) . ',' . max(0, $rgba[2] - 20) . ',' . $rgba[3] . ')', - 'text' => self::relativeLuminanceW3C($rgba) > .22 ? "#222" : "#DDD" + 'text' => self::relativeLuminanceW3C($rgba) > .22 ? "#222" : "#DDD", + 'rgb' => 'rgb(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ')' ]; } From 9a2274a71631a8a5d399276038bc9ece09ddafd3 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 1 Nov 2020 19:06:33 +0100 Subject: [PATCH 6/8] heure blog --- module/blog/view/article/article.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index 8b5e5d30..fda79bf6 100644 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -6,9 +6,9 @@ getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])) : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); - $heure = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) - ? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])) - : utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); + $heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) + ? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])) + : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); echo $date . ' à ' . $heure; ?> From 72d3bb772fc307314387ca8a4e380251fc3418ce Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 1 Nov 2020 20:19:02 +0100 Subject: [PATCH 7/8] Couleur du sous-menu --- CHANGES.md | 5 +++++ core/core.js.php | 8 +++---- core/core.php | 21 +++++++++++++------ core/layout/common.css | 9 ++++++-- core/module/install/ressource/defaultdata.php | 1 + core/module/theme/theme.php | 1 + core/module/theme/view/menu/menu.js.php | 5 ++++- core/module/theme/view/menu/menu.php | 12 +++++++++-- 8 files changed, 47 insertions(+), 15 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 6ccc6460..a8183c40 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,8 +8,13 @@ - Thème administration : modification de l'appel du code CSS permettant une mise à jour du thème sans vider le cache. - Thème du menu : alignement inopérant ; arrière-plan semi-transparent non uniforme. - Amélioration : + - Thème menu : couleurs du sous menu. - Mise en page du corps des mails de notification. - Paramètres de localisation. +- Modification : + - Changement de noms de classe : + - navLevel1 devient navMain + - navLevel2 devient navSub - Mise à jour : - TinyMCE 4.9.11 diff --git a/core/core.js.php b/core/core.js.php index 9c16b702..8623d83f 100644 --- a/core/core.js.php +++ b/core/core.js.php @@ -392,12 +392,12 @@ $(document).ready(function(){ * Affiche le sous-menu quand il est sticky */ $("nav").mouseenter(function(){ - $("#navfixedlogout .navLevel2").css({ 'pointer-events' : 'auto' }); - $("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'auto' }); + $("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' }); + $("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' }); }); $("nav").mouseleave(function(){ - $("#navfixedlogout .navLevel2").css({ 'pointer-events' : 'none' }); - $("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'none' }); + $("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' }); + $("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' }); }); /** diff --git a/core/core.php b/core/core.php index 55a6515a..44d622bf 100644 --- a/core/core.php +++ b/core/core.php @@ -1430,13 +1430,19 @@ class common { if ($this->getData(['core', 'dataVersion']) < 10302) { // Activation par défaut du captcha à la connexion $this->setData(['config', 'connect','captcha', true]); - $this->setData(['core', 'dataVersion', 10302]); + $this->setData(['core', 'dataVersion', 10302]); } // Version 10.3.03 if ($this->getData(['core', 'dataVersion']) < 10303) { // Activation par défaut du captcha à la connexion $this->setData(['config', 'captchaStrong', false]); - $this->setData(['core', 'dataVersion', 10303]); + $this->setData(['core', 'dataVersion', 10303]); + } + // Version 10.3.04 + if ($this->getData(['core', 'dataVersion']) < 10304) { + // Couleur des sous menus + $this->setData(['theme', 'menu', 'backgroundColorSub', $this->getData(['theme', 'menu', 'backgroundColor']) ]); + $this->setData(['core', 'dataVersion', 10304]); } } } @@ -1584,7 +1590,7 @@ class core extends common { $css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}'; // Menu $colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor'])); - $css .= 'nav,nav .navLevel2 a{background-color:' . $colors['normal'] . '}'; + $css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}'; $css .= 'nav a,#toggle span,nav a:hover{color:' . $this->getData(['theme', 'menu', 'textColor']) . '}'; $css .= 'nav a:hover{background-color:' . $colors['darken'] . '}'; $css .= 'nav a.active{color:' . $this->getData(['theme','menu','activeTextColor']) . ';}'; @@ -1596,7 +1602,10 @@ class core extends common { $css .= 'nav a.active{color:' . $color2['text'] . '}';*/ } $css .= 'nav #burgerText{color:' . $colors['text'] . '}'; - $css .= 'nav .navLevel1 a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}'; + // Sous menu + $colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColorSub'])); + $css .= 'nav .navSub a{background-color:' . $colors['normal'] . '}'; + $css .= 'nav .navMain a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}'; $css .= '#menu{text-align:' . $this->getData(['theme', 'menu', 'textAlign']) . '}'; if($this->getData(['theme', 'menu', 'margin'])) { if( @@ -2409,7 +2418,7 @@ class layout extends common { empty($childrenPageIds)) { continue; } - $itemsLeft .= '