From f62e14c45a5ed3c6ff9598addde6b7a127100e08 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 1 Dec 2015 19:45:00 +0100 Subject: [PATCH] =?UTF-8?q?Affichage=20de=20l'ann=C3=A9e=20courante=20et?= =?UTF-8?q?=20m=C3=A0j=20dynamique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/menu.css | 16 +++++++++++++++- index.php | 2 ++ js/actionScript.js | 9 ++++++++- page/_JS/settings.js | 5 ++++- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/css/menu.css b/css/menu.css index 29792c9..3284756 100755 --- a/css/menu.css +++ b/css/menu.css @@ -73,7 +73,7 @@ -#MENU span{ +#MENU span[data-link]{ /* position */ display: block; position: relative; @@ -145,3 +145,17 @@ + + +/* affichage de l'année de visualisation (en cours) */ +#MENU #CURRENTYEAR{ + /* position */ + position: absolute; + bottom: 1em; + width: 100%; + + /* foreground */ + color: #92a6b0; + font-family: 'Ubuntu'; + text-align: center; +} \ No newline at end of file diff --git a/index.php b/index.php index 199a976..dd4e940 100755 --- a/index.php +++ b/index.php @@ -64,6 +64,8 @@ $notifNotifNum = 5; Modules Notes Paramètres + +
Année scolaire en cours
diff --git a/js/actionScript.js b/js/actionScript.js index dcf548f..02201f8 100755 --- a/js/actionScript.js +++ b/js/actionScript.js @@ -44,6 +44,7 @@ var DOM = { DRAGNDROP : document.querySelector('#DRAGNDROP'), WRAPPER : document.querySelector('#WRAPPER'), MENU : document.querySelector('#MENU'), + CURRENTYEAR: document.querySelector('#MENU > #CURRENTYEAR'), HEADER : document.querySelector('#HEADER'), SUBHEADER : document.querySelector('#SUBHEADER'), SUBSECTIONS : document.querySelector("#HEADER > nav.subsections"), @@ -393,5 +394,11 @@ if( DOM.NOTIFBTN != null ) }, false); +// modification de l'année scolaire en cours +function updateCurrentYear(y){ + y = parseInt(y); + + var anneeScolaire = y+' - '+(y+1); - + DOM.CURRENTYEAR.children[1].innerHTML = anneeScolaire;; +} \ No newline at end of file diff --git a/page/_JS/settings.js b/page/_JS/settings.js index 985496c..bf2456f 100755 --- a/page/_JS/settings.js +++ b/page/_JS/settings.js @@ -317,7 +317,10 @@ if( changeYear.select != null && changeYear.button != null ){ // on envoie la requête à l'API API.send(request, function(answer){ - if( answer.request == 'success' ) reload(); + if( answer.request == 'success' ){ + reload(); // on recharge la page + updateCurrentYear(request.year); + } }); }, false);