From 120de9a1bf62631fb6c46f1dca8e27dc371f32c8 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 3 Feb 2016 11:30:46 +0100 Subject: [PATCH] Modification de la sub-navigation, mise a jour de l'URL -> modification action-script + page-manager --- css/container.css | 2 +- css/container.scss | 3 +++ js/action-script.js | 4 +++- js/lib/page-manager.js | 2 +- todo.md | 2 -- view/dashboard.php | 7 ++++++- view/machines.php | 2 ++ view/settings.php | 8 +++++++- view/sync.php | 10 +++++++++- view/users.php | 9 ++++++++- 10 files changed, 40 insertions(+), 9 deletions(-) diff --git a/css/container.css b/css/container.css index 932bf02..9ddc38a 100755 --- a/css/container.css +++ b/css/container.css @@ -1,2 +1,2 @@ -#WRAPPER>#CONTAINER>.sub-menu-side{display:block;position:relative}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]{display:block;position:relative;padding:.3em 1em .3em 2em;margin:1em;border-radius:3px;color:#5b5e63;text-shadow:1px 1px white;white-space:nowrap;transition:all .2s;cursor:pointer}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]>.svg>svg{display:inline-block;position:absolute;left:.5em;top:50%;width:1em;height:1em;transform:translateY(-50%)}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]>.svg>svg path{fill:#5b5e63 !important}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]:hover,#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink].active{color:#121213;background-color:#d8deea;box-shadow:inset 0 0 4px #c8ced9}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]:hover>.svg>svg path,#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink].active>.svg>svg path{fill:#121213 !important}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]:nth-child(1){margin-top:1em}#WRAPPER>#CONTAINER>section{flex-grow:1} +#WRAPPER>#CONTAINER>.sub-menu-side{display:block;position:relative}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]{display:block;position:relative;width:7.5em;padding:.3em 1em .3em 2em;margin:1em;border-radius:3px;color:#5b5e63;text-shadow:1px 1px white;white-space:nowrap;transition:all .2s;cursor:pointer;overflow:hidden}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]>.svg>svg{display:inline-block;position:absolute;left:.5em;top:50%;width:1em;height:1em;transform:translateY(-50%)}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]>.svg>svg path{fill:#5b5e63 !important}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]:hover,#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink].active{color:#121213;background-color:#d8deea;box-shadow:inset 0 0 4px #c8ced9}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]:hover>.svg>svg path,#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink].active>.svg>svg path{fill:#121213 !important}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]:nth-child(1){margin-top:1em}#WRAPPER>#CONTAINER>section{flex-grow:1} /*# sourceMappingURL=container.css.map */ diff --git a/css/container.scss b/css/container.scss index 6c7e7d1..7d2010d 100755 --- a/css/container.scss +++ b/css/container.scss @@ -13,6 +13,7 @@ & > span[data-sublink]{ display: block; position: relative; + width: 7.5em; padding: .3em 1em .3em 2em; margin: 1em ; @@ -27,6 +28,8 @@ cursor: pointer; + overflow: hidden; + // Dimension/Position des svg (icones) & > .svg > svg{ display: inline-block; diff --git a/js/action-script.js b/js/action-script.js index 9b679ec..6dfb793 100755 --- a/js/action-script.js +++ b/js/action-script.js @@ -53,8 +53,10 @@ function navSubMenu(subsection){ var page = null; // On met a jour la variable page-manager si data-link trouve - if( target.getData('sublink') ) + if( target.getData('sublink') ){ pageManager.vars[0] = target.getData('sublink'); + pageManager.updateURL(); + } } diff --git a/js/lib/page-manager.js b/js/lib/page-manager.js index bffdf33..a7f2bb1 100644 --- a/js/lib/page-manager.js +++ b/js/lib/page-manager.js @@ -270,7 +270,7 @@ pageManagerClass.prototype = { * @action Recharge la page en cours en conservant les variables * */ - reload: function(){ + refresh: function(){ this.setPage(this.page); return this; diff --git a/todo.md b/todo.md index b59da8d..3026b86 100644 --- a/todo.md +++ b/todo.md @@ -14,8 +14,6 @@ # EN COURS # ############ - - - [ ] Gestion JS/PHP de la navigation - [ ] Gestion de l'affichage des pages en fonction du sous-menu diff --git a/view/dashboard.php b/view/dashboard.php index 43d0088..49c7db7 100644 --- a/view/dashboard.php +++ b/view/dashboard.php @@ -22,4 +22,9 @@ -Bienvenue sur le DASHBOARD \ No newline at end of file + + + +
+ Bienvenue sur le DASHBOARD +
diff --git a/view/machines.php b/view/machines.php index 69ae8f0..75e287e 100644 --- a/view/machines.php +++ b/view/machines.php @@ -33,6 +33,8 @@ + +
Bienvenue sur la page de gestion des MACHINES
\ No newline at end of file diff --git a/view/settings.php b/view/settings.php index 8da3144..aa0bd1a 100644 --- a/view/settings.php +++ b/view/settings.php @@ -33,4 +33,10 @@ -Bienvenue sur la page des PARAMETRES \ No newline at end of file + + + + +
+ Bienvenue sur la page des PARAMETRES +
diff --git a/view/sync.php b/view/sync.php index 64721cf..a4f39cc 100644 --- a/view/sync.php +++ b/view/sync.php @@ -23,4 +23,12 @@ -Bienvenue sur la page de SYNCHRONISATION \ No newline at end of file + + + + + + +
+ Bienvenue sur la page de SYNCHRONISATION +
\ No newline at end of file diff --git a/view/users.php b/view/users.php index eb7eb96..e0ee6ff 100644 --- a/view/users.php +++ b/view/users.php @@ -33,4 +33,11 @@ -Bienvenue sur la page de gestion des UTILISATEURS \ No newline at end of file + + + + + +
+ Bienvenue sur la page de gestion des UTILISATEURS +
\ No newline at end of file