From 6e01601bafba1fcb5d5342e6de59cd52d40ff738 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 10 Apr 2016 13:20:37 +0200 Subject: [PATCH] Ajout du sous-menu --- css/container.css | 2 +- css/container.css.map | 2 +- css/container.scss | 6 +- css/menu-side.css | 2 +- css/menu-side.css.map | 2 +- css/menu-side.scss | 52 +++++++++++++++- js/action-script.js | 92 ++++++++++++++++++++++++++++- manager/repo/Token.php | 65 ++++++++++++++++++++ src/static/menu-side/sub-active.svg | 65 ++++++++++++++++++++ src/static/menu-side/sub.svg | 65 ++++++++++++++++++++ view.php | 9 +++ view/settings.php | 8 ++- 12 files changed, 359 insertions(+), 11 deletions(-) create mode 100644 manager/repo/Token.php create mode 100644 src/static/menu-side/sub-active.svg create mode 100644 src/static/menu-side/sub.svg diff --git a/css/container.css b/css/container.css index 29dd4c1..afefeeb 100755 --- a/css/container.css +++ b/css/container.css @@ -1,2 +1,2 @@ -#WRAPPER>#CONTAINER>section{display:block;position:relative;flex-grow:1;padding:1.5em;border-radius:5px;background-color:#fff;color:#000;font-size:1.2em}#WRAPPER>#CONTAINER>section h6{color:#848484;font-size:1.2em;text-transform:uppercase;font-weight:300;letter-spacing:.2em;margin:0;padding:0}#WRAPPER>#CONTAINER>section input[type="radio"],#WRAPPER>#CONTAINER>section input[type="checkbox"]{display:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for],#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]{padding-left:.8em;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{content:'';display:inline-block;position:relative;top:.1em;left:-.8em;width:calc( 1em - 2*.15em );height:calc( 1em - 2*.15em );border-radius:50% / 50%;border:0.15em solid #53d192;background:#fff center center no-repeat;background-image:none;background-size:70% auto;transition:background .2s ease-in-out;cursor:pointer}#WRAPPER>#CONTAINER>section input[type="radio"]:checked+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]:checked+label[for]:before{background-color:#53d192;background-image:url("/f/svg/checked/st/container")}#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{border-radius:3px}#WRAPPER>#CONTAINER>section input[type="button"]{margin:.5em;padding:.5em;border-radius:5px;border:3px solid #515151;font-weight:bold;color:#515151;background-color:#fff;transition:background .1s ease-in-out, color .1s ease-in-out}#WRAPPER>#CONTAINER>section input[type="button"]:active{background-color:#515151;color:#fff}#WRAPPER>#CONTAINER>section input[type="button"].primary{border-color:#53d192;color:#53d192;background-color:#fff}#WRAPPER>#CONTAINER>section input[type="button"].primary:active{background-color:#53d192;color:#fff} +#WRAPPER>#CONTAINER>section{display:none;position:relative;flex-grow:1;padding:1.5em;border-radius:5px;background-color:#fff;color:#000;font-size:1.2em}#WRAPPER>#CONTAINER>section.active{display:block}#WRAPPER>#CONTAINER>section h6{color:#848484;font-size:1.2em;text-transform:uppercase;font-weight:300;letter-spacing:.2em;margin:0;padding:0}#WRAPPER>#CONTAINER>section input[type="radio"],#WRAPPER>#CONTAINER>section input[type="checkbox"]{display:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for],#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]{padding-left:.8em;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#WRAPPER>#CONTAINER>section input[type="radio"]+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{content:'';display:inline-block;position:relative;top:.1em;left:-.8em;width:calc( 1em - 2*.15em );height:calc( 1em - 2*.15em );border-radius:50% / 50%;border:0.15em solid #53d192;background:#fff center center no-repeat;background-image:none;background-size:70% auto;transition:background .2s ease-in-out;cursor:pointer}#WRAPPER>#CONTAINER>section input[type="radio"]:checked+label[for]:before,#WRAPPER>#CONTAINER>section input[type="checkbox"]:checked+label[for]:before{background-color:#53d192;background-image:url("/f/svg/checked/st/container")}#WRAPPER>#CONTAINER>section input[type="checkbox"]+label[for]:before{border-radius:3px}#WRAPPER>#CONTAINER>section input[type="button"]{margin:.5em;padding:.5em;border-radius:5px;border:3px solid #515151;font-weight:bold;color:#515151;background-color:#fff;transition:background .1s ease-in-out, color .1s ease-in-out}#WRAPPER>#CONTAINER>section input[type="button"]:active{background-color:#515151;color:#fff}#WRAPPER>#CONTAINER>section input[type="button"].primary{border-color:#53d192;color:#53d192;background-color:#fff}#WRAPPER>#CONTAINER>section input[type="button"].primary:active{background-color:#53d192;color:#fff} /*# sourceMappingURL=container.css.map */ diff --git a/css/container.css.map b/css/container.css.map index 60261c8..2288800 100755 --- a/css/container.css.map +++ b/css/container.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAMC,2BAAW,CACV,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CAClB,SAAS,CAAE,CAAC,CAEZ,OAAO,CAAE,KAAK,CAEd,aAAa,CAAE,GAAG,CAElB,gBAAgB,CAAE,IAAI,CAEtB,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,KAAK,CAMhB,8BAAI,CACH,KAAK,CAAE,OAAsB,CAC7B,SAAS,CAAE,KAAK,CAChB,cAAc,CAAE,SAAS,CACzB,WAAW,CAAE,GAAG,CAChB,cAAc,CAAE,IAAI,CAEpB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CAYX,kGACwB,CACvB,OAAO,CAAE,IAAI,CAId,wHACqC,CACpC,YAAY,CAAE,IAAI,CAGlB,qBAAqB,CAAE,IAAI,CAC3B,mBAAmB,CAAI,IAAI,CAC3B,kBAAkB,CAAK,IAAI,CAC3B,gBAAgB,CAAO,IAAI,CAC3B,eAAe,CAAQ,IAAI,CAC3B,WAAW,CAAY,IAAI,CAI3B,sIAAQ,CACP,OAAO,CAAE,EAAE,CACX,OAAO,CAAE,YAAY,CACrB,QAAQ,CAAE,QAAQ,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ources": ["container.scss","constants.scss"], "names": [], "file": "container.css" diff --git a/css/container.scss b/css/container.scss index 14bb58d..c306593 100755 --- a/css/container.scss +++ b/css/container.scss @@ -5,7 +5,11 @@ /* [1] Section (contenu) =========================================================*/ & > section{ - display: block; + display: none; + + // Gestion de l'activation des sous-parties + &.active{display: block;} + position: relative; flex-grow: 1; diff --git a/css/menu-side.css b/css/menu-side.css index 808daa2..9691746 100755 --- a/css/menu-side.css +++ b/css/menu-side.css @@ -1,2 +1,2 @@ -#WRAPPER>#MENU-SIDE>span:not(.icon){display:block;position:relative;width:calc( 100% - 2*1em - 2*1.5em );padding:1.5em 1.5em;padding-left:calc( 1.5em + 2*1em );border-bottom:1px solid transparent;background:#32323a url("/f/svg/circle/st/menu-side/29282e") 1em center no-repeat;background-size:2em 2em;color:#ddd;text-shadow:1px 1px 0 #26262c;transition:color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out, border .2s ease-in-out;cursor:pointer}#WRAPPER>#MENU-SIDE>span:not(.icon)>svg,#WRAPPER>#MENU-SIDE>span:not(.icon)>svg *{position:absolute;top:calc( 50% - 1em/2 );left:1.5em;width:1em;height:1em;fill:#ddd !important;transition:fill .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon):hover,#WRAPPER>#MENU-SIDE>span:not(.icon).active{border-bottom-color:#242329;box-shadow:inset 0 0 1em #27262b;background-color:#29282e;color:#fff;text-shadow:1px 1px 0 #1d1c20}#WRAPPER>#MENU-SIDE>span:not(.icon):hover>svg,#WRAPPER>#MENU-SIDE>span:not(.icon):hover>svg *,#WRAPPER>#MENU-SIDE>span:not(.icon).active>svg,#WRAPPER>#MENU-SIDE>span:not(.icon).active>svg *{fill:#53d192 !important}#WRAPPER>#MENU-SIDE>span.icon{display:block;position:relative;width:calc( 100% - 3em - 2*1.5em );height:calc( 5em - 1px );padding:0 1.5em;padding-left:calc( 1.5em + 3em );border-bottom:1px solid transparent;background:#32323a;color:#fff;text-shadow:1px 1px 0 #26262c;font-weight:bold;line-height:5em}#WRAPPER>#MENU-SIDE>span.icon>svg,#WRAPPER>#MENU-SIDE>span.icon>svg *{position:absolute;top:calc( 50% - 5em/2 );left:1.5em;height:5em}#WRAPPER>#MENU-SIDE>span.icon:hover{border-bottom-color:#242329;box-shadow:inset 0 0 1em #27262b;background-color:#29282e;color:#fff;text-shadow:1px 1px 0 #1d1c20}#WRAPPER>#MENU-SIDE>span.sep{border-bottom:1px solid #4a4a55} +#WRAPPER>#MENU-SIDE>span:not(.icon){display:block;position:relative;width:calc( 100% - 2*1em - 2*1.5em );padding:1.5em 1.5em;padding-left:calc( 1.5em + 2*1em );border-bottom:1px solid transparent;background:url("/f/svg/circle/st/menu-side/29282e") 1em center no-repeat,url("/f/svg/sub/st/menu-side/777777") right 1em center no-repeat;background-size:2em 2em, 1em 1em;color:#ddd;text-shadow:1px 1px 0 #26262c;transition:color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out, border .2s ease-in-out;cursor:pointer}#WRAPPER>#MENU-SIDE>span:not(.icon).active{background:url("/f/svg/circle/st/menu-side/29282e") 1em center no-repeat,url("/f/svg/sub-active/st/menu-side/dddddd") right 1em center no-repeat;background-size:2em 2em, 1em 1em}#WRAPPER>#MENU-SIDE>span:not(.icon)>svg,#WRAPPER>#MENU-SIDE>span:not(.icon)>svg *{position:absolute;top:calc( 50% - 1em/2 );left:1.5em;width:1em;height:1em;fill:#ddd !important;transition:fill .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon):hover,#WRAPPER>#MENU-SIDE>span:not(.icon).active{border-bottom-color:#242329;box-shadow:inset 0 0 1em #27262b;background-color:#29282e;color:#fff;text-shadow:1px 1px 0 #1d1c20}#WRAPPER>#MENU-SIDE>span:not(.icon):hover>svg,#WRAPPER>#MENU-SIDE>span:not(.icon):hover>svg *,#WRAPPER>#MENU-SIDE>span:not(.icon).active>svg,#WRAPPER>#MENU-SIDE>span:not(.icon).active>svg *{fill:#53d192 !important}#WRAPPER>#MENU-SIDE>span.icon{display:block;position:relative;width:calc( 100% - 3em - 2*1.5em );height:calc( 5em - 1px );padding:0 1.5em;padding-left:calc( 1.5em + 3em );border-bottom:1px solid transparent;background:#32323a;color:#fff;text-shadow:1px 1px 0 #26262c;font-weight:bold;line-height:5em}#WRAPPER>#MENU-SIDE>span.icon>svg,#WRAPPER>#MENU-SIDE>span.icon>svg *{position:absolute;top:calc( 50% - 5em/2 );left:1.5em;height:5em}#WRAPPER>#MENU-SIDE>span.icon:hover{border-bottom-color:#242329;box-shadow:inset 0 0 1em #27262b;background-color:#29282e;color:#fff;text-shadow:1px 1px 0 #1d1c20}#WRAPPER>#MENU-SIDE>span.sep{border-bottom:1px solid #4a4a55}#WRAPPER>#MENU-SIDE>span:not(.icon).active+div.sub>span{display:block;position:relative;width:calc( 100% - 2*1.5em );padding:.5em 1.5em;padding-left:1.5em;border-bottom:1px solid transparent;background:#242329 url("/f/svg/sub/st/menu-side/888888") 0.5em center no-repeat;background-size:.5em;color:#aaa;font-size:.85em;cursor:pointer;transition:color .2s ease-in-out}#WRAPPER>#MENU-SIDE>span:not(.icon).active+div.sub>span:hover,#WRAPPER>#MENU-SIDE>span:not(.icon).active+div.sub>span.active{color:#fff;background-image:url("/f/svg/sub/st/menu-side/ffffff")}#WRAPPER>#MENU-SIDE>span:not(.icon):not(.active)+div.sub>span{display:none} /*# sourceMappingURL=menu-side.css.map */ diff --git a/css/menu-side.css.map b/css/menu-side.css.map index f7c7bf9..fb7d4db 100755 --- a/css/menu-side.css.map +++ b/css/menu-side.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAMC,mCAAmB,CAClB,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,8BAA8B,CAEtC,OAAO,CAAE,WAAW,CACpB,YAAY,CAAE,qBAAqB,CAEnC,aAAa,CAAE,qBAAqB,CAEpC,UAAU,CAAE,qEAAsE,CAClF,eAAe,CAAE,OAAO,CACxB,KAAK,C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wFtB,WAAW,CAAE,iBAAqC,CASpD,4BAAY,CACX,aAAa,CAAE,iBAA+B,CAO/C,uDAAyC,CACxC,OAAO,CAAE,KAAK,CACd,QAAQ,CAAE,QAAQ,CACjB,KAAK,CAAE,sBAAsB,CAE9B,OAAO,CAAE,UAAU,CACnB,YAAY,CAAE,KAAK,CAEnB,aAAa,CAAE,qBAAqB,CAEpC,UAAU,CAAE,oEAAuF,CACnG,eAAe,CAAE,IAAI,CAErB,KAAK,CAAE,IAAoB,CAC3B,SAAS,CAAE,KAAK,CAEhB,MAAM,CAAE,OAAO,CAEf,UAAU,CAAE,qBAAqB,CAGjC,4HACQ,CACP,KAAK,CChIU,IAAO,CDiItB,gBAAgB,CAAE,qCAAqC,CAMzD,6DAA+C,CAC9C,OAAO,CAAE,IAAI", "sources": ["menu-side.scss","constants.scss"], "names": [], "file": "menu-side.css" diff --git a/css/menu-side.scss b/css/menu-side.scss index 00d0b1f..9ea4004 100755 --- a/css/menu-side.scss +++ b/css/menu-side.scss @@ -14,8 +14,18 @@ border-bottom: 1px solid transparent; - background: $dark-bg url('/f/svg/circle/st/menu-side/29282e') 1em center no-repeat; - background-size: 2em 2em; + background: url('/f/svg/circle/st/menu-side/29282e') 1em center no-repeat, + url('/f/svg/sub/st/menu-side/777777') right 1em center no-repeat; + background-size: 2em 2em, 1em 1em; + + + // Modification du sens de la fleche quand le sous-menu est deroule + &.active{ + background: url('/f/svg/circle/st/menu-side/29282e') 1em center no-repeat, + url('/f/svg/sub-active/st/menu-side/dddddd') right 1em center no-repeat; + background-size: 2em 2em, 1em 1em; + } + color: $dark-fg; text-shadow: 1px 1px 0 darken($dark-bg, 5); @@ -100,6 +110,42 @@ & > span.sep{ border-bottom: 1px solid lighten($dark-bg, 10); } - + + /* [4] Gestion du menu deroulant + =========================================================*/ + /* (1) Quand le menu est deroule */ + & > span:not(.icon).active + div.sub>span{ + display: block; + position: relative; + width: calc( 100% - 2*1.5em ); + + padding: .5em 1.5em; + padding-left: 1.5em; + + border-bottom: 1px solid transparent; + + background: darken($dark-bg-primary, 2) url('/f/svg/sub/st/menu-side/888888') .5em center no-repeat;; + background-size: .5em; + + color: darken($dark-fg, 20); + font-size: .85em; + + cursor: pointer; + + transition: color .2s ease-in-out; + + // Animation de @hover ou .active + &:hover, + &.active{ + color: $dark-fg-primary; + background-image: url('/f/svg/sub/st/menu-side/ffffff'); + } + } + + /* (2) Quand le menu est replie */ + + & > span:not(.icon):not(.active) + div.sub>span{ + display: none; + } } diff --git a/js/action-script.js b/js/action-script.js index 8371cd4..af400fb 100755 --- a/js/action-script.js +++ b/js/action-script.js @@ -23,7 +23,73 @@ - /* [1] Toggle du side-menu <-> navigation + + /* [1] Toggle du sub-menu-side <-> navigation + ===========================================*/ + function navSubMenu(subsection){ + /* [1] Format du param + ------------------------------------------------*/ + // Contient l'element courant + var current = document.querySelector('#MENU-SIDE > span[data-link='+pageManager.page+'] + div.sub > span[data-sublink="'+pageManager.vars[0]+'"]'); + + // Contiendra l'element cible + var target = null; + + // si @subsection est un element, on le prends + target = (subsection instanceof Element) ? subsection : null; + + // Si string, on trouve l'element correspondant + target = (typeof subsection == 'string') ? document.querySelector('#MENU-SIDE > span[data-link='+pageManager.page+'] + div.sub > span[data-sublink="'+subsection+'"]') : target; + + // Si rien trouve, on prend le premier element correspondant a la premiere page + target = (target == null) ? document.querySelector('#MENU-SIDE > span[data-link='+pageManager.page+'] + div.sub > span[data-sublink]') : target; + + // Si le param n'est toujours pas bon, on retourne une erreur + if( target == null ) return false; + + /* [2] Gestion de l'affichage de l'element + ------------------------------------------------*/ + // On desactive l'element courant + if( current != null ) + current.remClass('active'); + + // On cache les sections visibles + var visibleSections = document.querySelectorAll('#CONTAINER > section[data-sublink].active'); + for( var i = 0 ; i < visibleSections.length ; i++ ) + visibleSections[i].remClass('active'); + + // On active le nouveau + if( target != null ){ + target.addClass('active'); + + // On affiche la section associee + var targetSection = document.querySelector('#CONTAINER > section[data-sublink="'+target.getData('sublink')+'"]'); + if( targetSection != null ) + targetSection.addClass('active'); + + } + + /* [3] Gestion de pageManager + ------------------------------------------------*/ + // Si element, on recupere le data-link + var page = null; + + // Si erreur, on retourne FALSE + if( !target.getData('sublink') ) return false + + var mustRefresh = pageManager.vars[0] != target.getData('sublink'); + + // On met a jour la variable page-manager si data-link trouve + pageManager.vars[0] = target.getData('sublink'); + + if( mustRefresh ) + // navMenu(pageManager.page); + pageManager.updateURL(); + + } + + + /* [4 Toggle du side-menu <-> navigation ===========================================*/ function navMenu(section){ @@ -69,6 +135,28 @@ pageManager.activeXHR.addEventListener('loadend', function(){ + // On gere la navigation du sous-menu (si defini, utilise) + var subSectionExists = pageManager.vars.length >= 1 && document.querySelector('#CONTAINER > section[data-sublink="'+pageManager.vars[0]+'"]') != null; + if( subSectionExists ) // Si le lien du menu associe existe + navSubMenu(pageManager.vars[0]); // on charge la page associee + else // sinon + navSubMenu(null); // on charge le lien par defaut + + + // GESTION DE LA NAVIGATION DU SOUS-MENU + // si le sous-menu existe + var smenu = document.querySelector('#MENU-SIDE > span[data-link='+pageManager.page+'] + div.sub'); + if( smenu != null ) + smenu.addEventListener('click', function(e){ + var target = e.target; + + while( target != document.body && !target.getData('sublink') ) + target = target.parentNode; + + if( target.getData('sublink') ) + navSubMenu(target); + }, false); + // On retire l'icone de chargement DOM.HEADER.remClass('loading'); }, false); @@ -93,7 +181,7 @@ - /* [2] Gestion de la navigation (physique) + /* [5] Gestion de la navigation (physique) ===========================================*/ DOM.MENUSIDE.addEventListener('click', function(e){ var target = e.target; diff --git a/manager/repo/Token.php b/manager/repo/Token.php new file mode 100644 index 0000000..f305209 --- /dev/null +++ b/manager/repo/Token.php @@ -0,0 +1,65 @@ + UID de la personne en question + * + * @return personne Tableau associatif contenant les informations utiles de la personne + * @return FALSE Si une erreur occure ou qu'aucune personne n'est trouvee, retourne FALSE + * + */ + public static function getById($id_personne=null){ + /* [0] Verification des INPUT + =========================================================*/ + if( !Database::check('id', $id_personne) ) return false; + + /* [1] On prepare et execute la requete + =========================================================*/ + $request = Database::getPDO()->prepare("SELECT idPersonne as id, pseudo, nom, prenom, id_facebook, telephone + FROM Personnes + WHERE idPersonne = :uid"); + $request->execute(array( + ':uid' => $id_personne + )); + + + /* [2] On recupere le resultat + =========================================================*/ + // si aucun resultat, on retourne FALSE + if( ($personne=$request->fetch()) === false ) return false; + + + /* [3] On retourne les donnees + =========================================================*/ + return Database::delNumeric( $personne, true ); + } + + + + + + + } + + +?> \ No newline at end of file diff --git a/src/static/menu-side/sub-active.svg b/src/static/menu-side/sub-active.svg new file mode 100644 index 0000000..e6ffb45 --- /dev/null +++ b/src/static/menu-side/sub-active.svg @@ -0,0 +1,65 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/static/menu-side/sub.svg b/src/static/menu-side/sub.svg new file mode 100644 index 0000000..8c7966c --- /dev/null +++ b/src/static/menu-side/sub.svg @@ -0,0 +1,65 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/view.php b/view.php index e0eb9fe..a21f538 100755 --- a/view.php +++ b/view.php @@ -62,9 +62,18 @@ Tableau de bord Acquisition +
+ Questionnaire + Facebook + Journal d'appel +
Statistiques Visualisation Paramètres +
+ Gestion des tokens + Gestion des utilisateurs +
diff --git a/view/settings.php b/view/settings.php index 2091895..4a377cc 100755 --- a/view/settings.php +++ b/view/settings.php @@ -6,4 +6,10 @@ ?> -Parametres +
+ Gestion des tokens +
+ +
+ Gestion des utilisateurs +