From d405e37885806cc4b5c7331ac3e9204daaf3e971 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 1 Nov 2015 00:16:23 +0100 Subject: [PATCH] Ajout du lien vers les notifications --- css/header.css | 11 +++++++++-- js/actionScript.js | 14 ++++++++++++-- page/home.php | 8 ++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/css/header.css b/css/header.css index d336e48..6cf854c 100755 --- a/css/header.css +++ b/css/header.css @@ -44,7 +44,7 @@ #HEADER .notifbar .notification:hover{ background-image: url(../src/header/notifbar/notification@hover.svg); } /* affichage du nombre de notifications */ -#HEADER .notifbar div[data-num]::after{ +#HEADER .notifbar div[data-num]:after{ content: attr(data-num); /* position */ display: block; @@ -66,9 +66,16 @@ font-size: 11px; text-align: center; line-height: 1em; + + /* animation */ + transition: .2s ease-in-out; + -moz-transition: .2s ease-in-out; + -webkit-transition: .2s ease-in-out; + -ms-transition: .2s ease-in-out; + -o-transition: .2s ease-in-out; } -#HEADER .notifbar div[data-num='']::after{ content: '0'; } +#HEADER .notifbar div[data-num='']:after{ content: '0'; } diff --git a/js/actionScript.js b/js/actionScript.js index 60680c1..9912caa 100755 --- a/js/actionScript.js +++ b/js/actionScript.js @@ -14,6 +14,7 @@ * [b] sous-parties * * [3] Gestion de l'authentification * * [4] Gestion des formulaires * + * [5] Gestion des liens spécifiques * * * * * * * @@ -44,7 +45,8 @@ var DOM = { CONTAINER : document.querySelector('#CONTAINER'), AUTHFILTER : document.querySelector('#AUTH_FILTER'), AUTH : document.querySelector('#AUTH'), - LOGOUT : document.querySelector('#HEADER #LOGOUT') + LOGOUT : document.querySelector('#HEADER #LOGOUT'), + NOTIFBTN : document.querySelector('#HEADER > .notifbar > .notification') }; @@ -327,4 +329,12 @@ initForm( // initialisation du formulaire de connection document.querySelector('#AUTH .errorbox').innerHTML = 'Identifiants incorrects.'; }); } -); \ No newline at end of file +); + + +/* [5] GESTION DES LIENS SPÉCIFIQUES +==============================================================*/ +DOM.NOTIFBTN.addEventListener('click', function(e){ + pageM.vars[0] = 'notifications'; + selectSection( document.querySelector('#MENU > span[data-link=home]') ); +}, false); \ No newline at end of file diff --git a/page/home.php b/page/home.php index a22d1c6..629ca5a 100755 --- a/page/home.php +++ b/page/home.php @@ -33,6 +33,14 @@ require_once __ROOT__.'/manager/groups.php'; - Saisir des notes si vous en avez l'accès

+
+

Notification 3

+

Notification 2

+

Notification 1

+
+ + +

Vous pouvez consulter votre groupe ainsi que tous les groupes de votre semestre.