Préparation de la vue 'dashboard' renommée en 'history' + mise en place des sous-sections avec icon + icon du menu
This commit is contained in:
parent
84f23e755b
commit
6e8e0ff786
|
@ -30,7 +30,7 @@
|
|||
|
||||
|
||||
/* (2) On définit la page d'accueil */
|
||||
if( $auth == 2 ) define('__REDIRECT__', 'Location: /dashboard/'); // Connecté -> Accès
|
||||
if( $auth == 2 ) define('__REDIRECT__', 'Location: /history/'); // Connecté -> Accès
|
||||
elseif( $auth == 1 ) define('__REDIRECT__', 'Location: /admin/'); // Pas identifié -> Identification
|
||||
else define('__REDIRECT__', 'Location: /warehouse/'); // Pas localisé -> Localisation
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
|||
// nomPage/arg1/arg2 -> inclusion de la page
|
||||
$R->get('(.*)', function($m){
|
||||
// Liste des pages du site
|
||||
$page_list = [ 'dashboard', 'profile', 'machines', 'users', 'groups', 'analytics', 'settings' ];
|
||||
$page_list = [ 'history', 'profile', 'machines', 'users', 'groups', 'analytics', 'settings' ];
|
||||
|
||||
|
||||
if( !preg_match('#^(?:'.implode('|', $page_list).')(?:/[\w-]+)*/?$#i', $m[0]) )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
DOM={WRAPPER:$("WRAPPER"),HEADER:$("HEADER"),MENUSIDE:$("MENU-SIDE"),CONTAINER:$("CONTAINER")};var pageManager=new pageManagerClass;pageManager.setPage(null,"/view",DOM.CONTAINER,"profile dashboard machines users groups analytics settings".split(" "));var api=new APIClass("/api/");
|
||||
DOM={WRAPPER:$("WRAPPER"),HEADER:$("HEADER"),MENUSIDE:$("MENU-SIDE"),CONTAINER:$("CONTAINER")};var pageManager=new pageManagerClass;pageManager.setPage(null,"/view",DOM.CONTAINER,"history profile machines users groups analytics settings".split(" "));var api=new APIClass("/api/");
|
||||
function navSubMenu(a){var d=document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+pageManager.vars[0]+'"]'),b=null,b=a instanceof Element?a:null,b="string"==typeof a?document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+a+'"]'):b,b=null==b?document.querySelector("#CONTAINER > .sub-menu-side > span[data-sublink]"):b;if(null==b)return!1;null!=d&&d.remClass("active");a=document.querySelectorAll("#CONTAINER > section[data-sublink].active");for(d=0;d<a.length;d++)a[d].remClass("active");
|
||||
null!=b&&(b.addClass("active"),a=document.querySelector('#CONTAINER > section[data-sublink="'+b.getData("sublink")+'"]'),null!=a&&a.addClass("active"));if(!b.getData("sublink"))return!1;a=pageManager.vars[0]!=b.getData("sublink");pageManager.vars[0]=b.getData("sublink");a&&pageManager.updateURL()}
|
||||
function navMenu(a,d){var b=document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.page+'"]'),c=null,c=a instanceof Element?a:null,c="string"==typeof a?document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+a+'"]'):c,c=null==c?document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]'):c;if(null==c)return!1;d=!0===d?!0:!1;null!=b&&b.remClass("active");null!=c&&c.addClass("active");d||b==c||(pageManager.vars=[]);c.getData("link")&&
|
||||
|
|
|
@ -9,7 +9,7 @@ DOM = {
|
|||
/* [0] Instanciation
|
||||
===========================================*/
|
||||
var pageManager = new pageManagerClass();
|
||||
pageManager.setPage(null, '/view', DOM.CONTAINER, ['profile', 'dashboard', 'machines', 'users', 'groups', 'analytics', 'settings'] );
|
||||
pageManager.setPage(null, '/view', DOM.CONTAINER, ['history', 'profile', 'machines', 'users', 'groups', 'analytics', 'settings'] );
|
||||
|
||||
var api = new APIClass('/api/');
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
public static function getById($id_warehouse, $id_user){
|
||||
/* [1] On rédige/execute la requête
|
||||
=========================================================*/
|
||||
$get = Database::getPDO()->prepare("SELECT u.id_user, u.code, u.username, u.firstname, u.lastname, u.mail, u.status
|
||||
$get = Database::getPDO()->prepare("SELECT u.id_user, u.code, u.username, u.firstname, u.lastname, u.mail
|
||||
FROM user as u
|
||||
WHERE u.id_warehouse = :id_warehouse
|
||||
AND u.id_user = :id_user");
|
||||
|
@ -325,7 +325,7 @@
|
|||
public static function getByUsername($id_warehouse, $username){
|
||||
/* [1] On rédige/execute la requête
|
||||
=========================================================*/
|
||||
$get = Database::getPDO()->prepare("SELECT u.id_user, u.code, u.username, u.firstname, u.lastname, u.mail, u.status
|
||||
$get = Database::getPDO()->prepare("SELECT u.id_user, u.code, u.username, u.firstname, u.lastname, u.mail
|
||||
FROM user as u
|
||||
WHERE u.id_warehouse = :id_warehouse
|
||||
AND u.username = :username");
|
||||
|
@ -362,7 +362,7 @@
|
|||
public static function getAll($id_warehouse){
|
||||
/* [1] On rédige/execute la requête
|
||||
=========================================================*/
|
||||
$get = Database::getPDO()->prepare("SELECT u.id_user, u.code, u.username, u.firstname, u.lastname, u.mail, u.status
|
||||
$get = Database::getPDO()->prepare("SELECT u.id_user, u.code, u.username, u.firstname, u.lastname, u.mail
|
||||
FROM user as u
|
||||
WHERE u.id_warehouse = :id_warehouse");
|
||||
$get->execute([
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
|
||||
$USERLIST = $answer->get('users');
|
||||
|
||||
|
||||
foreach($USERLIST as $u=>$user){
|
||||
$clustersReq = new ModuleRequest('userDefault/getClusters', [ 'id_user' => $user['id_user'] ]);
|
||||
$clustersRes = $clustersReq->dispatch();
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
enable-background="new 0 0 48 48"
|
||||
height="32"
|
||||
version="1.1"
|
||||
viewBox="0 0 32 32"
|
||||
width="32"
|
||||
xml:space="preserve"
|
||||
id="svg2"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="dashboard.svg"><metadata
|
||||
id="metadata23"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs21" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="960"
|
||||
inkscape:window-height="1028"
|
||||
id="namedview19"
|
||||
showgrid="false"
|
||||
inkscape:snap-page="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="9.8333333"
|
||||
inkscape:cx="18.53746"
|
||||
inkscape:cy="8.4169676"
|
||||
inkscape:window-x="960"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" /><path
|
||||
d="M 16 0.87109375 L 0.20507812 15.980469 C -0.060257945 16.235139 -0.069122395 16.655872 0.18554688 16.921875 C 0.44021615 17.187881 0.86095046 17.197361 1.1269531 16.943359 L 16 2.7167969 L 30.873047 16.943359 C 31.002382 17.066697 31.167982 17.128906 31.333984 17.128906 C 31.509985 17.128906 31.683785 17.058543 31.814453 16.921875 C 32.069119 16.655872 32.060258 16.233185 31.794922 15.978516 L 16 0.87109375 z M 21.333984 3.1269531 C 20.965314 3.1269531 20.667969 3.4269182 20.667969 3.7949219 C 20.667969 4.1629257 20.965314 4.4609375 21.333984 4.4609375 L 25.333984 4.4609375 L 25.333984 8.4609375 C 25.333984 8.8289412 25.631329 9.1269531 26 9.1269531 C 26.36867 9.1269531 26.667969 8.8289412 26.667969 8.4609375 L 26.667969 3.1269531 L 21.333984 3.1269531 z M 4.6660156 16.460938 C 4.2973452 16.460937 4 16.760902 4 17.128906 L 4 31.128906 L 13.333984 31.128906 L 13.333984 22.460938 L 18.667969 22.460938 L 18.667969 31.128906 L 28 31.128906 L 28 17.794922 C 28 17.426918 27.702654 17.128906 27.333984 17.128906 C 26.965313 17.128906 26.667969 17.426918 26.667969 17.794922 L 26.667969 29.794922 L 20 29.794922 L 20 21.128906 L 12 21.128906 L 12 29.794922 L 5.3339844 29.794922 L 5.3339844 17.128906 C 5.3339844 16.760902 5.034686 16.460938 4.6660156 16.460938 z "
|
||||
id="stylisable" /></svg>
|
Before Width: | Height: | Size: 2.7 KiB |
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
enable-background="new 0 0 48 48"
|
||||
height="32"
|
||||
id="Layer_1"
|
||||
version="1.1"
|
||||
viewBox="0 0 32 32"
|
||||
width="32"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="dashboard.svg"><metadata
|
||||
id="metadata9"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs7" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
id="namedview5"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="4.9166667"
|
||||
inkscape:cx="-22.37288"
|
||||
inkscape:cy="76.777946"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" /><path
|
||||
d="m 27.826087,31.304344 0,0 c 0,0.3847 -0.310957,0.69566 -0.695652,0.69566 l -19.4782613,0 0,0 c -1.921391,0 -3.478261,-1.556874 -3.478261,-3.478265 l 0,-25.0434785 c 0,-1.920696 1.55687,-3.47826097216795 3.478261,-3.47826097216795 l 0,0 18.0869563,0 0,0 c 0.288,0 0.535653,0.17530400216795 0.641392,0.42504300216795 0.03478,0.08278 0.05426,0.174609 0.05426,0.270609 l 0,0 0,4.86956497 0,0 0.695652,0 0,0 c 0.193391,0 0.368,0.08 0.494608,0.207305 0.123827,0.125913 0.201044,0.297739 0.201044,0.488348 0,0 0,0 0,0 l 0,25.0434745 z m -22.2608693,-2.782605 0,0 0,0 c 0,1.152696 0.934956,2.086957 2.086956,2.086957 l 2.086956,0 0,-23.6521745 -2.086956,0 0,0 c -0.786782,0 -1.504,-0.271305 -2.086956,-0.710957 l 0,22.2761745 z M 25.043478,5.5652165 l 0,-4.173913 -17.3913043,0 0,0 0,0 c -1.152,0 -2.086956,0.934261 -2.086956,2.086957 0,1.152696 0.934956,2.086956 2.086956,2.086956 l 17.3913043,0 0,0 z m 1.391305,1.391305 -15.304348,0 0,23.6521745 15.304348,0 0,-23.6521745 z M 7.6521737,4.1739125 c -0.384696,0 -0.695652,-0.311652 -0.695652,-0.695652 0,-0.384 0.310956,-0.695652 0.695652,-0.695652 l 15.3043483,0 c 0.384695,0 0.695652,0.311652 0.695652,0.695652 0,0.384 -0.310957,0.695652 -0.695652,0.695652 l -15.3043483,0 z"
|
||||
id="stylisable"
|
||||
inkscape:connector-curvature="0"
|
||||
style="clip-rule:evenodd;fill-rule:evenodd" /></svg>
|
After Width: | Height: | Size: 2.7 KiB |
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="32"
|
||||
id="Layer_1"
|
||||
version="1.1"
|
||||
viewBox="0 0 32 32"
|
||||
width="32"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="archive.svg"><metadata
|
||||
id="metadata13"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs11" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1056"
|
||||
id="namedview9"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="3.6875"
|
||||
inkscape:cx="45.426918"
|
||||
inkscape:cy="67.725684"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" /><path
|
||||
d="m 12.543314,4.5720491 0,6.8567699 -5.6853804,0 9.1423654,8.26379 9.142365,-8.26379 -5.713979,0 0,-6.8567699 -6.885371,0 z m -6.4138574,10.4422399 -5.099753,3.92836 c -0.75710196,0.44283 -1.12848296,1.35718 -1.00706096,2.25713 l 0.621339,4.7782 c 0.164277,0.93567 0.69279196,1.44998 2.00700696,1.44998 l 26.6986194,0 c 1.364212,0 1.84273,-0.54288 2.007007,-1.44998 l 0.621339,-4.7782 c 0.121422,-0.92138 -0.264188,-1.8143 -1.02129,-2.25713 l -5.099753,-3.92836 -2.999839,0 4.428333,4.4141 -3.614063,0 c -0.164277,0 -0.307154,0.0857 -0.385721,0.20716 l -1.314243,3.24983 -11.963642,0 -1.3142434,-3.24983 c -0.07142,-0.12856 -0.221305,-0.20716 -0.385582,-0.20716 l -3.606948,0 4.442562,-4.4141 -3.014068,0 z"
|
||||
id="stylisable"
|
||||
inkscape:connector-curvature="0" /></svg>
|
After Width: | Height: | Size: 2.2 KiB |
|
@ -15,17 +15,12 @@
|
|||
|
||||
<span data-sublink='filter' >
|
||||
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/filter.svg' ); ?></span>
|
||||
<span>Filtrer</span>
|
||||
</span>
|
||||
|
||||
<span data-sublink='search' >
|
||||
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/search.svg' ); ?></span>
|
||||
<span>Recherche</span>
|
||||
<span>Détails</span>
|
||||
</span>
|
||||
|
||||
<span data-sublink='remove' >
|
||||
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/remove.svg' ); ?></span>
|
||||
<span>Vider l'historique</span>
|
||||
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/archive.svg' ); ?></span>
|
||||
<span>Archiver</span>
|
||||
</span>
|
||||
</nav>
|
||||
|
|
@ -208,6 +208,7 @@ if( section.create.element != null ){
|
|||
section.create.input.submit.anim('active', 1500);
|
||||
|
||||
document.location = '';
|
||||
|
||||
}else // Erreur
|
||||
console.error('ModuleError::'+answer.ModuleError);
|
||||
|
||||
|
|
|
@ -46,11 +46,11 @@
|
|||
<span data-link='profile' data-desc='Profil' class='mb' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/profile.svg'); ?></span>
|
||||
|
||||
|
||||
<span data-link='dashboard' data-desc='Tableau de bord' class='apart' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/dashboard.svg'); ?></span>
|
||||
<span data-link='history' data-desc='Tableau de bord' class='apart' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/history.svg'); ?></span>
|
||||
<span data-link='machines' data-desc='Systèmes' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/device.svg'); ?></span>
|
||||
<span data-link='users' data-desc='Utilisateurs' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/users.svg'); ?></span>
|
||||
<span data-link='groups' data-desc='Gestion des groupes' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/groups.svg'); ?></span>
|
||||
<span data-link='analytics' data-desc='Statistiques et suivi' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/analytics.svg'); ?></span>
|
||||
<span data-link='analytics' data-desc='Statistiques et analyse' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/analytics.svg'); ?></span>
|
||||
|
||||
<span data-link='settings' data-desc='Paramètres' class='mt' ><?= file_get_contents(__ROOT__.'/src/static/menu-side/settings.svg'); ?></span>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue