From 89dafce5d2ceb5108d577974886382055c586625 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 22 Oct 2015 23:06:25 +0200 Subject: [PATCH] =?UTF-8?q?Pb=20du=20autoheight=20r=C3=A9gl=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API.php | 3 +- css/container.css | 63 +++++++++++++++++++-- css/header.css | 4 +- css/layout.css | 8 ++- css/menu.css | 2 +- index.php | 12 ++-- page/_JS/groups.js | 6 +- page/groups.php | 31 +++++++++- src/userlistSample.json | 122 ++++++++++++++++++++++++++++++++++++++++ test.php | 16 +++--- 10 files changed, 237 insertions(+), 30 deletions(-) create mode 100644 src/userlistSample.json diff --git a/API.php b/API.php index 08d527c..2242ded 100755 --- a/API.php +++ b/API.php @@ -38,7 +38,8 @@ /* GROUPES */ /***********/ case 'groups': - $answer->type = "group"; + if( isset($request->level_1) ){ include 'manager/groups.php'; groups_switch_level_1($request, $answer); } + else { $answer->request = 'missing_level_1'; } break; diff --git a/css/container.css b/css/container.css index 0ab8207..2f84544 100755 --- a/css/container.css +++ b/css/container.css @@ -1,13 +1,13 @@ #CONTAINER section{ /* position */ - display: block; - position: absolute; + display: none; + position: relative; top: 0; left: 0; width: 100%; - min-height: calc( 100vh - 5em ); + min-height: 100%; height: auto; - padding: 2em; + padding: 2em; /* background */ background-color: #ecf0f1; @@ -17,5 +17,58 @@ } +#CONTAINER section.active{ display: block; } -#CONTAINER section.active{ z-index: 8; } \ No newline at end of file + + +/* STYLE "BASIC" DES TABLEAUX */ +table.basic{ + /* border */ + border-radius: 5px; + border-spacing: 0; + box-shadow: 0 0 4px #e3e3e3; +} + + +table.basic tr td, +table.basic tr th{ + /* position */ + padding: 1em 1.5em; + + /* border */ + border-width: 1px 1px 0 0; + border-style: solid; + border-color: #e0e1e3; + + /* backgroud */ + background-color: #fff; + + /* foreground */ + color: #4e4e4e; +} + +table.basic tr th{ background-color: #f7f8fc; } +table.basic tr th:first-letter{ text-transform: uppercase; } + + +/* on ajoute les rebords pour ceux à gauche */ +table.basic tr td:first-child, +table.basic tr th:first-child{ border-left-width: 1px; } +/* on ajoute les rebords pour ceux en bas */ +table.basic tr:last-child td { border-bottom-width: 1px; } + + +/* angle haut gauche */ +table.basic tr:first-child th:first-child{ border-radius: 5px 0 0 0; } +/* angle haut droit */ +table.basic tr:first-child th:last-child { border-radius: 0 5px 0 0; } +/* angle bas gauche */ +table.basic tr:last-child td:first-child { border-radius: 0 0 0 5px; } +/* angle bas droit */ +table.basic tr:last-child td:last-child { border-radius: 0 0 5px 0; } + +/* @hover */ +table.basic tr:hover td{ + background-color: #f7f8fc; + color: #333; +} \ No newline at end of file diff --git a/css/header.css b/css/header.css index 802c8f8..8b6b0b0 100755 --- a/css/header.css +++ b/css/header.css @@ -84,7 +84,7 @@ /* border */ border-radius: 100% / 100%; - border: 2px solid #28B965; + border: 2px solid #2dcc70; /* background */ background: transparent url(../src/header/logout.svg) center center no-repeat; @@ -126,7 +126,7 @@ /* BOUTON SURVOL */ #HEADER .notifbar #LOGOUT:hover{ - background-color: #28B965; + background-color: #2dcc70; background-image: url(../src/header/logout@hover.svg); } diff --git a/css/layout.css b/css/layout.css index 5c0cac6..5dc87c0 100755 --- a/css/layout.css +++ b/css/layout.css @@ -36,7 +36,7 @@ body{ top: 0; left: 0; width: 100%; - height: 100%; + min-height: 100%; /* background */ background: #ecf0f1; @@ -44,7 +44,8 @@ body{ background-size: cover; background-attachment: fixed; - /* overflow */ + /* scroll */ + overflow: auto; overflow-x: hidden; /* empêche la barre horizontale de scroll [précaution] */ /* foreground */ @@ -152,7 +153,8 @@ body{ position: relative; margin-left: 14em; width: calc( 100% - 14em ); - min-height: calc( 100% - 5em ); + /*min-height: 100%;*/ + height: auto; /* background */ background-color: #ecf0f1; diff --git a/css/menu.css b/css/menu.css index 89bab2e..605a7f5 100755 --- a/css/menu.css +++ b/css/menu.css @@ -20,7 +20,7 @@ height: 5em; /* background */ - background: #28B965 url(../src/menu/userdata/visitor.svg) left 1em center no-repeat; + background: #28b965 url(../src/menu/userdata/visitor.svg) left 1em center no-repeat; background-size: 3em auto; /* foreground */ diff --git a/index.php b/index.php index 3833cdf..b459522 100755 --- a/index.php +++ b/index.php @@ -70,12 +70,12 @@ $notifNotifNum = 5; else echo "
Connection
"; ?> - Accueil - Groupes - Suivi - Modules - Notes - Paramètres + Accueil + Composition + Suivi + Modules + Notes + Paramètres diff --git a/page/_JS/groups.js b/page/_JS/groups.js index 65848f2..bac3a97 100755 --- a/page/_JS/groups.js +++ b/page/_JS/groups.js @@ -27,11 +27,13 @@ if( document.querySelector('#CONTAINER hgroup.active') == null ) /****************** EXEMPLE API ******************/ /*************************************************/ +// on récupère la liste des élèves du groupe E + /* objet envoyé à API.php */ var request = { level_0: 'groups', - level_1: 'visualiser', - group : 'ego' + level_1: 'userlist', + groupe : 'E' }; // console.log( request ); diff --git a/page/groups.php b/page/groups.php index c76322a..1545680 100755 --- a/page/groups.php +++ b/page/groups.php @@ -18,8 +18,35 @@
'; + // on lit la liste d'utilisateurs + $userlistFile = file_get_contents('../src/userlistSample.json'); + + $userlist = JSON_decode($userlistFile); + + + echo ""; + + // TITRES + echo ''; + foreach($userlist[0] as $key=>$value) + echo ''; + echo ''; + + + // CONTENU + echo ''; + foreach($userlist as $eleve){ + echo ''; + + foreach($eleve as $value) + echo ''; + + echo ''; + } + echo ''; + + echo '
'.$key.'
'.$value.'
'; + } ?>
diff --git a/src/userlistSample.json b/src/userlistSample.json new file mode 100644 index 0000000..5287259 --- /dev/null +++ b/src/userlistSample.json @@ -0,0 +1,122 @@ +[ + { + "name": "Dickson William", + "sexe": "male" + }, + { + "name": "Ortega Levy", + "sexe": "male" + }, + { + "name": "Stark Barrera", + "sexe": "male" + }, + { + "name": "Daugherty Rodriquez", + "sexe": "male" + }, + { + "name": "Shepard Conway", + "sexe": "male" + }, + { + "name": "Irene Knapp", + "sexe": "female" + }, + { + "name": "Frank Mckee", + "sexe": "male" + }, + { + "name": "Tammy Pearson", + "sexe": "female" + }, + { + "name": "Sherrie Dawson", + "sexe": "female" + }, + { + "name": "Guadalupe Richmond", + "sexe": "female" + }, + { + "name": "Juarez Winters", + "sexe": "male" + }, + { + "name": "Wendi Ashley", + "sexe": "female" + }, + { + "name": "Turner Romero", + "sexe": "male" + }, + { + "name": "England Cooper", + "sexe": "male" + }, + { + "name": "Merle Frye", + "sexe": "female" + }, + { + "name": "Lindsay Ferguson", + "sexe": "female" + }, + { + "name": "Graham Carver", + "sexe": "male" + }, + { + "name": "Aline Green", + "sexe": "female" + }, + { + "name": "Lorna Clayton", + "sexe": "female" + }, + { + "name": "Riley Hines", + "sexe": "male" + }, + { + "name": "Wiggins Cain", + "sexe": "male" + }, + { + "name": "Compton Stevenson", + "sexe": "male" + }, + { + "name": "Polly Byrd", + "sexe": "female" + }, + { + "name": "Kasey Tate", + "sexe": "female" + }, + { + "name": "Benson Rocha", + "sexe": "male" + }, + { + "name": "Rose Reeves", + "sexe": "female" + }, + { + "name": "Lizzie Rose", + "sexe": "female" + }, + { + "name": "Rebecca Garcia", + "sexe": "female" + }, + { + "name": "York Crawford", + "sexe": "male" + }, + { + "name": "Harrison Jimenez", + "sexe": "male" + } +] \ No newline at end of file diff --git a/test.php b/test.php index e283253..33f9be1 100644 --- a/test.php +++ b/test.php @@ -104,20 +104,20 @@ /*** AFFICHER LES MEMBRES D'UN GROUPE ***/ - require('manager/groups.php'); + // require('manager/groups.php'); - $request = new stdClass(); - $answer = new stdClass(); + // $request = new stdClass(); + // $answer = new stdClass(); - $request->level_1 = 'userlist'; - $request->groupe = 'E'; // groupe.nom + // $request->level_1 = 'userlist'; + // $request->groupe = 'E'; // groupe.nom - groups_switch_level_1($request, $answer); + // groups_switch_level_1($request, $answer); - echo var_dump( $answer ); + // echo var_dump( $answer ); - echo "






It works !"; + // echo "






It works !";