From 60c880096589df86e96d5f4dd2e98fb1a4fbb60c Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 6 Nov 2015 16:23:00 +0100 Subject: [PATCH] =?UTF-8?q?Modification=20du=20formulaire=20de=20connectio?= =?UTF-8?q?n/d=C3=A9connection=20(flou=20au=20lieu=20de=20fonc=C3=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/layout.css | 32 +++++++++++--------------------- js/actionScript.js | 33 ++++++++++++++------------------- 2 files changed, 25 insertions(+), 40 deletions(-) diff --git a/css/layout.css b/css/layout.css index 640a41f..036db39 100755 --- a/css/layout.css +++ b/css/layout.css @@ -52,6 +52,16 @@ body{ font: 16px 'Ubuntu', 'Open Sans', 'Helvetica Neue', 'Arial', 'sans-serif'; } +/* @blurred */ +*.blurred{ + filter: blur(2px); + -moz-filter: blur(2px); + -webkit-filter: blur(2px); + -ms-filter: blur(2px); + -o-filter: blur(2px); +} + + #DRAGNDROP{ /* position */ /*display: block;*/ display: none; @@ -164,26 +174,6 @@ body{ } -#AUTH_FILTER{ - /* position */ - display: none; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - - /* background */ - background-color: rgba(0, 0, 0,.5); - - /* Z */ - z-index: 100; -} - -/* affichage du filtre si actif */ -#AUTH_FILTER.active{ display: block; } - - @@ -216,7 +206,7 @@ body{ } /* affichage du formulaire si filtre actif */ -#AUTH_FILTER.active + #AUTH{ top: 10em; } +#WRAPPER.blurred ~ #AUTH{ top: 10em; } diff --git a/js/actionScript.js b/js/actionScript.js index 9912caa..0cf8ea4 100755 --- a/js/actionScript.js +++ b/js/actionScript.js @@ -206,28 +206,22 @@ var connected = !( DOM.AUTH.children[0].innerHTML == 'Connexion' ); /* [3] GESTION DE L'AUTHENTIFICATION ==============================================================*/ -// ouvre l'interface d'authentification quand click -DOM.LOGOUT.addEventListener('click', function(e){ // sur bouton - DOM.AUTHFILTER.className = 'active'; -}, false); +// ouvre l'interface d'authentification quand click sur bouton prévu à cet effet +DOM.LOGOUT.addEventListener('mouseup', function(e){ addClass(DOM.WRAPPER, 'blurred'); }, false); if( !connected ) // sur zone verte si pas connecté - DOM.MENU.children[0].addEventListener('click', function(e){ - addClass(DOM.AUTHFILTER, 'active'); - }, false); + DOM.MENU.children[0].addEventListener('mouseup', function(e){ addClass(DOM.WRAPPER, 'blurred'); }, false); + else // sinon amène sur le profil - DOM.MENU.children[0].addEventListener('click', function(e){ + DOM.MENU.children[0].addEventListener('mouseup', function(e){ pageM.vars[0] = 'myprofile'; - selectSection( document.querySelector('#MENU span[data-link=settings]') ); + selectSection( document.querySelector('#MENU > span[data-link=settings]') ); }, false); - - -// ferme l'interface d'authentification quand clic sur filtre -DOM.AUTHFILTER.addEventListener('click', function(e){ - remClass(DOM.AUTHFILTER, 'active'); -}, false); + +// ferme l'interface d'authentification quand clic autre part que sur zone AUTH +DOM.WRAPPER.addEventListener('mousedown', function(e){ remClass(DOM.WRAPPER, 'blurred'); }, false); @@ -334,7 +328,8 @@ initForm( // initialisation du formulaire de connection /* [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 +if( DOM.NOTIFBTN != null ) + 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