From c3acd3fac2a104f38797c03b9bd1b3278f36ba4f Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 8 Jan 2017 16:30:40 +0100 Subject: [PATCH] Fixed (partially) + font for login pages ( + ) + migrated view to Twig --- build/viewer/view/group/group_groupChoice.php | 1 - .../viewer/view/group/group_groupChoice.twig | 2 +- .../viewer/view/group/group_membersChoice.php | 287 +++++++----------- .../view/group/group_membersChoice.twig | 50 +++ public_html/css/layout.scss | 2 +- public_html/css/min/layout.css | 60 +++- public_html/css/min/reset.css | 130 +++++++- public_html/css/reset.scss | 1 + public_html/js/action-script.js | 28 +- public_html/js/lib/min/page-manager.js | 10 +- public_html/js/lib/page-manager.js | 8 +- public_html/js/min/action-script.js | 209 ++++++++++++- public_html/view/admin.php | 36 ++- public_html/view/groups.php | 4 +- public_html/view/js/groups.js | 2 +- public_html/view/warehouse.php | 5 +- 16 files changed, 586 insertions(+), 249 deletions(-) mode change 100755 => 100644 build/viewer/view/group/group_membersChoice.php create mode 100644 build/viewer/view/group/group_membersChoice.twig diff --git a/build/viewer/view/group/group_groupChoice.php b/build/viewer/view/group/group_groupChoice.php index bf0fb93..ec0aaac 100755 --- a/build/viewer/view/group/group_groupChoice.php +++ b/build/viewer/view/group/group_groupChoice.php @@ -4,7 +4,6 @@ use \api\core\ModuleRequest; use \error\core\Error; use \api\core\Authentification; - use \manager\repo\cluster as clusterRepo; class group_groupChoice{ diff --git a/build/viewer/view/group/group_groupChoice.twig b/build/viewer/view/group/group_groupChoice.twig index ec253bb..1bfc01d 100644 --- a/build/viewer/view/group/group_groupChoice.twig +++ b/build/viewer/view/group/group_groupChoice.twig @@ -1,4 +1,4 @@ -
+ - - - - - "; - break; - - - case 'machinelist': return " -
- @name - - - - - - - -
"; - break; - - - default: return " - Modifier un autre groupe

-
- - - -
- @header - Membre de @name -
- - @members -
"; - break; - - } - } - - public static function view($params){ - /* [0] Initialisation + public static function render($params){ + var_dump('membersChoice'); + debug(); + /* [1] On vérifie le type de groupe (user/machine) =========================================================*/ /* (1) On vérifie les paramètres */ if( !isset($params['id_cluster']) || !is_numeric($params['id_cluster']) || !isset($params['class']) || !is_numeric($params['class']) ) return Viewer::$htmlError; - /* (2) On initialise les vues */ - $view = ''; - $members_view = ''; - $header = ''; - - - - /* [1] On vérifie le type de groupe (user/machine) - =========================================================*/ - /* (1) On récupère le groupe */ + /* (2) On récupère le groupe */ $checktypeRequest = new ModuleRequest('clusterDefault/getById', [ 'id_cluster' => $params['id_cluster'], 'class' => $params['class'] ]); $checktypeResponse = $checktypeRequest->dispatch(); - /* (2) Si on ne le trouve pas, on retourne une erreur */ + /* (3) Si on ne le trouve pas, on retourne une erreur */ if( $checktypeResponse->error != Error::Success ) return Viewer::$htmlError; - /* (3) On récupère les données du groupe */ + /* (4) On récupère les données du groupe */ $currentCluster = $checktypeResponse->get('cluster'); - - /* [2] On récupère les membres du groupe + /* [2] Init Twig =========================================================*/ - /* (1) On exécute la requête */ - $getmembersRequest = new ModuleRequest('clusterDefault/getMembers', [ - 'id_cluster' => $params['id_cluster'], - 'class' => $params['class'] + $loader = new \Twig_Loader_Filesystem(__BUILD__.'/viewer/view'); + $twig = new \Twig_Environment($loader, []); + + + /* [3] Store variables + =========================================================*/ + $variables = [ + 'p_id_cluster' => $params['id_cluster'], + 'p_class' => $params['class'], + 'p_name' => $currentCluster['name'], + 'p_theme' => $_SESSION['WAREHOUSE']['theme'] + ]; + + /* [4] Store functions + =========================================================*/ + $twig->addFunction(new \Twig_Function('f_members', function($id_cluster, $class){ + /* [1] On récupère les membres + =========================================================*/ + + /* (1) On exécute la requête */ + $getmembersRequest = new ModuleRequest('clusterDefault/getMembers', [ + 'id_cluster' => $id_cluster, + 'class' => $class + ]); + $getmembersResponse = $getmembersRequest->dispatch(); + + /* (2) Si erreur, on retourne rien par défaut */ + if( $getmembersResponse->error != Error::Success ) + return []; + + /* (3) On récupère la liste des UID uniquement */ + $members_ids = []; + foreach($getmembersResponse->get('members') as $member) + $members_ids[] = ($class==0) ? $member['id_user'] : $member['id_machine']; + + + /* [2] On récupère les utilisateurs non membres + =========================================================*/ + /* (1) On récupère les utilisateurs */ + if( $class == 0 ){ + + /* (2) On exécute la requête */ + $getusersRequest = new ModuleRequest('userDefault/getAll'); + // On recupere la reponse + $getusersResponse = $getusersRequest->dispatch(); + + /* (3) si erreur, on affiche l'explicitation */ + if( $getusersResponse->error != Error::Success ) + return []; + + /* (4) On récupère la liste des utilisateurs */ + $users = $getusersResponse->get('users'); + + /* (5) On ajoute s'ils sont dans le groupe ou non */ + foreach($users as $u=>$user) + $users[$u]['already'] = in_array($user['id_user'], $members_ids); + return $users; + + + /* [3] On récupère les machines non membres + =========================================================*/ + /* (1) On récupère les machines */ + }else{ + + /* (2) On exécute la requête */ + $getmachinesRequest = new ModuleRequest('machineDefault/getAll'); + // On recupere la reponse + $getmachinesResponse = $getmachinesRequest->dispatch(); + + /* (3) si erreur, on affiche l'explicitation */ + if( $getmachinesResponse->error != Error::Success ) + return []; + + /* (4) On récupère la liste des machines */ + $machines = $getmachinesResponse->get('machines'); + + /* (5) On ajoute s'ils sont dans le groupe ou non */ + foreach($machines as $u=>$machine) + $machines[$u]['already'] = in_array($machine['id_machine'], $members_ids); + + return $machines; + } + + + })); + + + + /* [5] Build the whole stuff + =========================================================*/ + return $twig->render('group/group_membersChoice.twig', [ + 'p_class' => $variables['p_class'], + 'p_name' => $variables['p_name'], + 'p_id_cluster' => $variables['p_id_cluster'], + 'p_theme' => $variables['p_theme'] ]); - $getmembersResponse = $getmembersRequest->dispatch(); - - /* (2) Si erreur, on retourne l'erreur */ - if( $getmembersResponse->error != Error::Success ) - return Viewer::$htmlError; - - /* (3) On récupère la liste des UID uniquement */ - $members_id = []; - foreach($getmembersResponse->get('members') as $member) - $members_id[] = ($params['class']==0) ? $member['id_user'] : $member['id_machine']; - - - - /* [3] SI GROUPE D'UTILISATEURS -> On récupère les utilisateurs - =========================================================*/ - if( $params['class'] == 0 ){ - - /* (1) On récupère les utilisateurs - ---------------------------------------------------------*/ - /* (1) On exécute la requête */ - $getusersRequest = new ModuleRequest('userDefault/getAll'); // On utilise la methode 'getAll' du module 'userDefault' - $getusersResponse = $getusersRequest->dispatch(); // On recupere la reponse - - /* (2) si erreur, on affiche l'explicitation */ - if( $getusersResponse->error != Error::Success ) - return Viewer::$htmlError; - - /* (3) On récupère la liste des utilisateurs */ - $USERLIST = $getusersResponse->get('users'); - - - /* (2) On gère l'affichage des utilisateurs - ---------------------------------------------------------*/ - /* (1) On gère l'état 'membre' ou non */ - foreach($USERLIST as $u=>$user) - $USERLIST[$u]['already_in'] = in_array($user['id_user'], $members_id) ? 'checked' : ''; - - /* (2) On génère la vue */ - $header = self::template('userheader'); - - $members_view = Viewer::replaceMultiple( - self::template('userlist'), - $USERLIST - ); - - - /* [4] SI GROUPE DE MACHINES -> On récupère les machines - =========================================================*/ - }else{ - - /* (1) On récupère les machines - ---------------------------------------------------------*/ - /* (1) On exécute la requête */ - $getmachinesRequest = new ModuleRequest('machineDefault/getAll'); // On utilise la methode 'getAll' du module 'machineDefault' - $getmachinesResponse = $getmachinesRequest->dispatch(); // On recupere la reponse - - /* (2) si erreur, on affiche l'explicitation */ - if( $getmachinesResponse->error != Error::Success ) - return Viewer::$htmlError; - - /* (3) On récupère la liste des machines */ - $MACHINELIST = $getmachinesResponse->get('machines'); - - - /* (2) On gère l'affichage des machines - ---------------------------------------------------------*/ - /* (1) On gère l'état 'membre' ou non */ - foreach($MACHINELIST as $m=>$machine) - $MACHINELIST[$m]['already_in'] = in_array($machine['id_machine'], $members_id) ? 'checked' : ''; - - /* (2) On génère la vue */ - $header = self::template('machineheader'); - - $members_view = Viewer::replaceMultiple( - self::template('machinelist'), - $MACHINELIST - ); - - } - - - - return Viewer::replaceSingle( - self::template(), [ - 'id_cluster' => $params['id_cluster'], - 'class' => $params['class'], - 'name' => $currentCluster['name'], - 'clustertype' => ($params['class']==0) ? 'utilisateurs' : 'machines', - 'members' => $members_view, - 'header' => $header - ] - ); } - - - - - - } diff --git a/build/viewer/view/group/group_membersChoice.twig b/build/viewer/view/group/group_membersChoice.twig new file mode 100644 index 0000000..859bdf3 --- /dev/null +++ b/build/viewer/view/group/group_membersChoice.twig @@ -0,0 +1,50 @@ +Modifier un autre groupe +

+ +
+ + + +
+ + {# USER HEADER #} + {% if p_class == 0 %} + Identifiant + Nom + Code RFID + {# MACHINE HEADER #} + {% else %} + Nom + {% endif %} + Membre de {{ p_name }} +
+ + + {% for member in f_members(p_id_cluster, p_class) %} + + {# USER ENTRIES #} + {% if p_class == 0 %} +
+ {{ member.username }} + {{ member.firstname }} {{ member.lastname }} + {{ member.code }} + + + + + +
+ {# MACHINE ENTRIES #} + {% else %} +
+ {{ member.name }} + + + + + +
+ {% endif %} + + {% endfor %} +
diff --git a/public_html/css/layout.scss b/public_html/css/layout.scss index e5fbaa8..8aa7888 100755 --- a/public_html/css/layout.scss +++ b/public_html/css/layout.scss @@ -10,7 +10,7 @@ background-color: #edf0f5; - font-family: 'Open Sans', 'Ubuntu'; + font-family: 'Open Sans', 'Ubuntu', 'Verdana', 'Arial'; /* [1] Header de la page diff --git a/public_html/css/min/layout.css b/public_html/css/min/layout.css index f20e339..c4758fb 100755 --- a/public_html/css/min/layout.css +++ b/public_html/css/min/layout.css @@ -1,3 +1,59 @@ -#WRAPPER{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#edf0f5;font-family:'Open Sans', 'Ubuntu'}#WRAPPER>#HEADER{display:block;position:absolute;top:0;left:0;width:100%;height:calc( 4em - 1px);border-bottom:1px solid #c23f05;background-color:#f44f06;z-index:10}#WRAPPER>#MENU-SIDE{display:block;position:absolute;top:4em;left:0;width:4em;height:100%;box-shadow:2px 1px 3px #ddd;background-color:#fff;transition:all .3s;z-index:9}#WRAPPER>#CONTAINER{display:flex;position:absolute;top:4em;left:4em;width:calc( 100% - 4em - 2*1em);height:calc( 100% - 4em - 2*1em);padding:1em;flex-direction:row;justify-content:space-between;overflow-x:none;overflow-y:auto} +/* COULEUR DU THEME */ +/* COULEUR DU SOUS-MENU */ +/* COULEUR DES ERREURS */ +/* FORMULAIRES */ +/* GESTION DES LONGUEURS */ +#WRAPPER { + display: block; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #edf0f5; + font-family: 'Open Sans', 'Ubuntu', 'Verdana', 'Arial'; + /* [1] Header de la page + ==========================================*/ + /* [2] Side-Menu de la page + ==========================================*/ + /* [3] Container de la page + ==========================================*/ +} +#WRAPPER > #HEADER { + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: calc( 4em - 1px ); + border-bottom: 1px solid #c23f05; + background-color: #f44f06; + z-index: 10; +} +#WRAPPER > #MENU-SIDE { + display: block; + position: absolute; + top: 4em; + left: 0; + width: 4em; + height: 100%; + box-shadow: 2px 1px 3px #ddd; + background-color: #fff; + transition: all .3s; + z-index: 9; +} +#WRAPPER > #CONTAINER { + display: flex; + position: absolute; + top: 4em; + left: 4em; + width: calc( 100% - 4em - 2*1em ); + height: calc( 100% - 4em - 2*1em ); + padding: 1em; + flex-direction: row; + justify-content: space-between; + overflow-x: none; + overflow-y: auto; +} -/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGF5b3V0LmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vbGF5b3V0LnNjc3MiLAoJCSIuLi9jb25zdGFudHMuc2NzcyIKCV0sCgkic291cmNlc0NvbnRlbnQiOiBbCgkJIkBpbXBvcnQgJ2NvbnN0YW50cyc7XG5cbiNXUkFQUEVSe1xuXHRkaXNwbGF5OiBibG9jaztcblx0cG9zaXRpb246IGZpeGVkO1xuXHRcdHRvcDogMDtcblx0XHRsZWZ0OiAwO1xuXHRcdHdpZHRoOiAxMDAlO1xuXHRcdGhlaWdodDogMTAwJTtcblxuXHRiYWNrZ3JvdW5kLWNvbG9yOiAjZWRmMGY1O1xuXG5cdGZvbnQtZmFtaWx5OiAnT3BlbiBTYW5zJywgJ1VidW50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dCQUFnQixDQUFFLElBQUssQ0FFdkIsVUFBVSxDQUFFLE9BQVEsQ0FFcEIsT0FBTyxDQUFFLENBQUUsQ0FDWCxBQWxERixBQXVESyxRQXZERyxDQXVESCxVQUFVLEFBQUEsQ0FDYixPQUFPLENBQUUsSUFBSyxDQUNkLFFBQVEsQ0FBRSxRQUFTLENBQ2xCLEdBQUcsQ0MzQ1ksR0FBRyxDRDRDbEIsSUFBSSxDQzVDVyxHQUFHLENENkNsQixLQUFLLENBQUUseUJBQUksQ0FDWCxNQUFNLENBQUUseUJBQUksQ0FDYixPQUFPLENBQUUsR0FBSSxDQUdiLGNBQWMsQ0FBRSxHQUFJLENBQ3BCLGVBQWUsQ0FBRSxhQUFjLENBRS9CLFVBQVUsQ0FBRSxJQUFLLENBQ2pCLFVBQVUsQ0FBRSxJQUFLLENBQ2pCIiwKCSJuYW1lcyI6IFtdCn0= */ \ No newline at end of file +/*# sourceMappingURL=layout.css.map */ diff --git a/public_html/css/min/reset.css b/public_html/css/min/reset.css index 7248ac2..4fc9a1f 100755 --- a/public_html/css/min/reset.css +++ b/public_html/css/min/reset.css @@ -1,3 +1,129 @@ -/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +/** 1. Set default font family to sans-serif. 2. Prevent iOS and IE text size adjust after device orientation change, without disabling user zoom. */ +html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } -/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAicmVzZXQuY3NzIiwKCSJzb3VyY2VzIjogWwoJCSIuLi9yZXNldC5zY3NzIgoJXSwKCSJzb3VyY2VzQ29udGVudCI6IFsKCQkiLyohIG5vcm1hbGl6ZS5jc3MgdjMuMC4zIHwgTUlUIExpY2Vuc2UgfCBnaXRodWIuY29tL25lY29sYXMvbm9ybWFsaXplLmNzcyAqL1xuXG4vKipcbiAqIDEuIFNldCBkZWZhdWx0IGZvbnQgZmFtaWx5IHRvIHNhbnMtc2VyaWYuXG4gKiAyLiBQcmV2ZW50IGlPUyBhbmQgSUUgdGV4dCBzaXplIGFkanVzdCBhZnRlciBkZXZpY2Ugb3JpZW50YXRpb24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BLElBQUMsQ0FBSyxRQUFRLEFBQWIsQ0FBYyw4QkFBOEIsQ0FDbEQsQUFBb0IsS0FBZixDQUFBLEFBQUEsSUFBQyxDQUFLLFFBQVEsQUFBYixDQUFjLDJCQUEyQixBQUFDLENBQzlDLGtCQUFrQixDQUFFLElBQUssQ0FDMUIsQUFNRCxBQUFBLFFBQVEsQUFBQyxDQUNQLE1BQU0sQ0FBRSxpQkFBa0IsQ0FDMUIsTUFBTSxDQUFFLEtBQU0sQ0FDZCxPQUFPLENBQUUscUJBQXNCLENBQ2hDLEFBT0QsQUFBQSxNQUFNLEFBQUMsQ0FDTCxNQUFNLENBQUUsQ0FBRSxDQUNWLE9BQU8sQ0FBRSxDQUFFLENBQ1osQUFNRCxBQUFBLFFBQVEsQUFBQyxDQUNQLFFBQVEsQ0FBRSxJQUFLLENBQ2hCLEFBT0QsQUFBQSxRQUFRLEFBQUMsQ0FDUCxXQUFXLENBQUUsSUFBSyxDQUNuQixBQVNELEFBQUEsS0FBSyxBQUFDLENBQ0osZUFBZSxDQUFFLFFBQVMsQ0FDMUIsY0FBYyxDQUFFLENBQUUsQ0FDbkIsQUFFRCxBQUFBLEVBQUUsQ0FDRixBQUFBLEVBQUUsQUFBQyxDQUNELE9BQU8sQ0FBRSxDQUFFLENBQ1oiLAoJIm5hbWVzIjogW10KfQ== */ \ No newline at end of file +/** Remove default margin. */ +body { margin: 0; font-family: 'Open Sans', 'Ubuntu', 'Verdana', 'Arial'; } + +/* HTML5 display definitions ========================================================================== */ +/** Correct `block` display not defined for any HTML5 element in IE 8/9. Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. Correct `block` display not defined for `main` in IE 11. */ +article, aside, details, figcaption, figure, footer, header, main, menu, nav, section, summary { display: block; } + +/** 1. Correct `inline-block` display not defined in IE 8/9. 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. */ +audio, canvas, progress, video { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } + +/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ +audio:not([controls]) { display: none; height: 0; } + +/** Address `[hidden]` styling not present in IE 8/9/10. Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. */ +[hidden], template { display: none; } + +/* Links ========================================================================== */ +/** Remove the gray background color from active links in IE 10. */ +a { background-color: transparent; } + +/** Improve readability of focused elements when they are also in an active/hover state. */ +a:active, a:hover { outline: 0; } + +/* Text-level semantics ========================================================================== */ +/** Address inconsistent styling of `abbr[title]`. 1. Correct styling in Firefox 39 and Opera 12. 2. Correct missing styling in Chrome, Edge, IE, Opera, and Safari. */ +abbr[title] { border-bottom: none; /* 1 */ text-decoration: underline; /* 2 */ text-decoration: underline dotted; /* 2 */ } + +/** Address inconsistent styling of b and strong. 1. Correct duplicate application of `bolder` in Safari 6.0.2. 2. Correct style set to `bold` in Edge 12+, Safari 6.2+, and Chrome 18+. */ +b, strong { font-weight: inherit; /* 1 */ } + +b, strong { font-weight: bolder; /* 2 */ } + +/** Address styling not present in Safari and Chrome. */ +dfn { font-style: italic; } + +/** Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari, and Chrome. */ +h1 { font-size: 2em; margin: 0.67em 0; } + +/** Address styling not present in IE 8/9. */ +mark { background-color: #ff0; color: #000; } + +/** Address inconsistent and variable font size in all browsers. */ +small { font-size: 80%; } + +/** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } + +sup { top: -0.5em; } + +sub { bottom: -0.25em; } + +/* Embedded content ========================================================================== */ +/** Remove border when inside `a` element in IE 8/9/10. */ +img { border: 0; } + +/** Correct overflow not hidden in IE 9/10/11. */ +svg:not(:root) { overflow: hidden; } + +/* Grouping content ========================================================================== */ +/** Address margin not present in IE 8/9 and Safari. */ +figure { margin: 1em 40px; } + +/** Address inconsistent styling of `hr`. 1. Correct `box-sizing` set to `border-box` in Firefox. 2. Correct `overflow` set to `hidden` in IE 8/9/10/11 and Edge 12. */ +hr { box-sizing: content-box; /* 1 */ height: 0; /* 1 */ overflow: visible; /* 2 */ } + +/** Contain overflow in all browsers. */ +pre { overflow: auto; } + +/** 1. Correct inheritance and scaling of font-size for preformatted text. 2. Address odd `em`-unit font size rendering in all browsers. */ +code, kbd, pre, samp { font-family: monospace, monospace; /* 1 */ font-size: 1em; /* 2 */ } + +/* Forms ========================================================================== */ +/** Known limitation: by default, Chrome and Safari on OS X allow very limited styling of `select`, unless a `border` property is set. */ +/** 1. Correct font properties not being inherited. 2. Address margins set differently in Firefox 4+, Safari, and Chrome. */ +button, input, optgroup, select, textarea { font: inherit; /* 1 */ margin: 0; /* 2 */ } + +/** Address `overflow` set to `hidden` in IE 8/9/10/11. */ +button { overflow: visible; } + +/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. Correct `select` style inheritance in Firefox. */ +button, select { text-transform: none; } + +/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. */ +button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } + +/** Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { cursor: default; } + +/** Remove inner padding and border in Firefox 4+. */ +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/** Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ +input { line-height: normal; } + +/** It's recommended that you don't attempt to style these elements. Firefox's implementation doesn't respect box-sizing, padding, or width. 1. Address box sizing set to `content-box` in IE 8/9/10. 2. Remove excess padding in IE 8/9/10. */ +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } + +/** Fix the cursor style for Chrome's increment/decrement buttons. For certain `font-size` values of the `input`, it causes the cursor style of the decrement button to change from `default` to `text`. */ +input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } + +/** Address `appearance` set to `searchfield` in Safari and Chrome. */ +input[type="search"] { -webkit-appearance: textfield; } + +/** Remove inner padding and search cancel button in Safari and Chrome on OS X. Safari (but not Chrome) clips the cancel button when the search input has padding (and `textfield` appearance). */ +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/** Define consistent border, margin, and padding. */ +fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } + +/** 1. Correct `color` not being inherited in IE 8/9/10/11. 2. Remove padding so people aren't caught out if they zero out fieldsets. */ +legend { border: 0; /* 1 */ padding: 0; /* 2 */ } + +/** Remove default vertical scrollbar in IE 8/9/10/11. */ +textarea { overflow: auto; } + +/** Don't inherit the `font-weight` (applied by a rule above). NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ +optgroup { font-weight: bold; } + +/* Tables ========================================================================== */ +/** Remove most spacing between table cells. */ +table { border-collapse: collapse; border-spacing: 0; } + +td, th { padding: 0; } + +/*# sourceMappingURL=reset.css.map */ diff --git a/public_html/css/reset.scss b/public_html/css/reset.scss index 4642136..bde343c 100755 --- a/public_html/css/reset.scss +++ b/public_html/css/reset.scss @@ -19,6 +19,7 @@ html { body { margin: 0; // font-size: 12px; + font-family: 'Open Sans', 'Ubuntu', 'Verdana', 'Arial'; } /* HTML5 display definitions diff --git a/public_html/js/action-script.js b/public_html/js/action-script.js index d1d0342..2ff51ea 100755 --- a/public_html/js/action-script.js +++ b/public_html/js/action-script.js @@ -66,7 +66,7 @@ function navSubMenu(subsection){ var page = null; // Si erreur, on retourne FALSE - if( !target.getData('sublink') ) return false + if( !target.getData('sublink') ) return false; var mustRefresh = pageManager.vars[0] != target.getData('sublink'); @@ -103,7 +103,7 @@ function navMenu(section, persistence){ target = (typeof section == 'string') ? document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+section+'"]') : target; // Si rien trouve, on prend le premier element correspondant a la premiere page - target = (target == null) ? document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]') : target; + target = target || document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]'); // Si le param n'est toujours pas bon, on retourne une erreur if( target == null ) return false; @@ -114,18 +114,16 @@ function navMenu(section, persistence){ /* [2] Gestion de l'affichage de l'element ------------------------------------------------*/ // On desactive l'element courant - if( current != null ) - current.remClass('active'); + current && current.remClass('active'); // On active le nouveau - if( target != null ) - target.addClass('active'); + target && target.addClass('active'); /* [3] Gestion de pageManager ------------------------------------------------*/ // Si element, on recupere le data-link var page = null; - // SI on change de menu, on efface les données URL + // Si on change de menu, on efface les données URL if( !persistence && current != target ) pageManager.vars = []; @@ -134,12 +132,11 @@ function navMenu(section, persistence){ if( target.getData('link') ){ DOM.HEADER.addClass('loading'); // Animation de chargement - pageManager.setPage( target.getData('link') ); - pageManager.activeXHR.addEventListener('loadend', function(){ + //pageManager.activeXHR.addEventListener('loadend', + + var handlerX = function(){ - // On retire l'icone de chargement - DOM.HEADER.remClass('loading'); // On gere la navigation du sous-menu (si defini, utilise) var subSectionExists = pageManager.vars.length > 0 && document.querySelector('#CONTAINER > .sub-menu-side > [data-sublink="'+pageManager.vars[0]+'"]') != null; @@ -160,7 +157,14 @@ function navMenu(section, persistence){ navSubMenu(target); }, false); - }, false); + }; + + /* (x) Si première ou changement de page, on charge la nouvelle */ + pageManager.page != target.getData('link') && pageManager.setPage( target.getData('link') ); + + /* (x) Si on a `pageManager.activeXHR`, on met le handler, sinon on lance */ + pageManager.activeXHR ? pageManager.activeXHR.addEventListener('loadend', handlerX, false) : handlerX.call(); + } }navMenu(pageManager.page); diff --git a/public_html/js/lib/min/page-manager.js b/public_html/js/lib/min/page-manager.js index b1080fe..06ddc9a 100755 --- a/public_html/js/lib/min/page-manager.js +++ b/public_html/js/lib/min/page-manager.js @@ -127,9 +127,8 @@ pageManagerClass.prototype = { // si pageList est correct et que l'URL correspond à un schéma de page => continue [sinon] return null if( this.pagelist != null && /^(?:(?:https?:\/\/)?[^\/]+)\/([a-z0-9_]+)(?:\/|((?:\/\w+)+)\/?)?(#.*)?$/i.test(url_data) ){ // si la page récupérée dans l'url est dans la liste => renvoi de l'objet [sinon] null - var vars = RegExp.$2.split('/'); // on supprime la première entrée vide - vars = vars.slice(1); + var vars = RegExp.$2.split('/').slice(1); return ( this.pagelist.indexOf(RegExp.$1) > -1 ) ? {page: RegExp.$1, var: vars} : null; }else @@ -310,16 +309,11 @@ pageManagerClass.prototype = { */ refresh: function(refresher){ if( refresher instanceof Function ){ - this.refresher = refresher; return; - - }else{ - + }else return this.setPage(true); - } - } }; diff --git a/public_html/js/lib/page-manager.js b/public_html/js/lib/page-manager.js index 7450141..06ddc9a 100755 --- a/public_html/js/lib/page-manager.js +++ b/public_html/js/lib/page-manager.js @@ -129,7 +129,6 @@ pageManagerClass.prototype = { // si la page récupérée dans l'url est dans la liste => renvoi de l'objet [sinon] null // on supprime la première entrée vide var vars = RegExp.$2.split('/').slice(1); - console.log(vars); return ( this.pagelist.indexOf(RegExp.$1) > -1 ) ? {page: RegExp.$1, var: vars} : null; }else @@ -310,16 +309,11 @@ pageManagerClass.prototype = { */ refresh: function(refresher){ if( refresher instanceof Function ){ - this.refresher = refresher; return; - - }else{ - + }else return this.setPage(true); - } - } }; diff --git a/public_html/js/min/action-script.js b/public_html/js/min/action-script.js index 4dc7a4a..2ff51ea 100755 --- a/public_html/js/min/action-script.js +++ b/public_html/js/min/action-script.js @@ -1,6 +1,203 @@ -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 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")&& -(DOM.HEADER.addClass("loading"),pageManager.setPage(c.getData("link")),pageManager.activeXHR.addEventListener("loadend",function(){DOM.HEADER.remClass("loading");0 .sub-menu-side > [data-sublink="'+pageManager.vars[0]+'"]')?navSubMenu(pageManager.vars[0]):navSubMenu(null);document.querySelector("#CONTAINER > .sub-menu-side").addEventListener("click",function(a){for(a=a.target;a!=document.body&&!a.getData("sublink");)a=a.parentNode; -a.getData("sublink")&&navSubMenu(a)},!1)},!1))}navMenu(pageManager.page);DOM.MENUSIDE.addEventListener("click",function(a){for(a=a.target;a!=document.body&&!a.getData("link");)a=a.parentNode;a.getData("link")&&navMenu(a.getData("link"))},!1); +// TODO: Attendre que API soit chargée, sinon erreur: le CONTAINER prend comme contenu la dépendance JS +DOM = { + WRAPPER: $('WRAPPER'), + HEADER: $('HEADER'), + MENUSIDE: $('MENU-SIDE'), + CONTAINER: $('CONTAINER') +}; + + +/* [0] Instanciation +===========================================*/ +var pageManager = new pageManagerClass(); +pageManager.setPage(null, '/view', DOM.CONTAINER, ['history', 'profile', 'machines', 'users', 'groups', 'analytics', 'settings'] ); + +var api = new APIClass('/api/'); + + +/* [1] Toggle du sub-menu-side <-> navigation +===========================================*/ +function navSubMenu(subsection){ + /* [1] Format du param + ------------------------------------------------*/ + // Contient l'element courant + var current = document.querySelector('#CONTAINER > .sub-menu-side > 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('#CONTAINER > .sub-menu-side > span[data-sublink="'+subsection+'"]') : target; + + // Si rien trouve, on prend le premier element correspondant a la premiere page + target = (target == null) ? document.querySelector('#CONTAINER > .sub-menu-side > 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(); + +} + + + + + + +/* [2] Toggle du side-menu <-> navigation +===========================================*/ +function navMenu(section, persistence){ + + /* [1] Format du param + ------------------------------------------------*/ + // Contient l'element courant + var current = document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.page+'"]'); + + // Contiendra l'element cible + var target = null; + + // si @section est un element, on le prends + target = (section instanceof Element) ? section : null; + + // Si string, on trouve l'element correspondant + target = (typeof section == 'string') ? document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+section+'"]') : target; + + // Si rien trouve, on prend le premier element correspondant a la premiere page + target = target || document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]'); + + // Si le param n'est toujours pas bon, on retourne une erreur + if( target == null ) return false; + + // Persistence de pageManager.vars (OPTIONNEL) + persistence = (persistence===true) ? true : false; + + /* [2] Gestion de l'affichage de l'element + ------------------------------------------------*/ + // On desactive l'element courant + current && current.remClass('active'); + // On active le nouveau + target && target.addClass('active'); + + /* [3] Gestion de pageManager + ------------------------------------------------*/ + // Si element, on recupere le data-link + var page = null; + + // Si on change de menu, on efface les données URL + if( !persistence && current != target ) + pageManager.vars = []; + + + // On charge la page si data-link trouve + if( target.getData('link') ){ + DOM.HEADER.addClass('loading'); // Animation de chargement + + + //pageManager.activeXHR.addEventListener('loadend', + + var handlerX = function(){ + + + // On gere la navigation du sous-menu (si defini, utilise) + var subSectionExists = pageManager.vars.length > 0 && document.querySelector('#CONTAINER > .sub-menu-side > [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 + document.querySelector('#CONTAINER > .sub-menu-side').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); + + }; + + /* (x) Si première ou changement de page, on charge la nouvelle */ + pageManager.page != target.getData('link') && pageManager.setPage( target.getData('link') ); + + /* (x) Si on a `pageManager.activeXHR`, on met le handler, sinon on lance */ + pageManager.activeXHR ? pageManager.activeXHR.addEventListener('loadend', handlerX, false) : handlerX.call(); + + } + +}navMenu(pageManager.page); + + + + + + + + + + + + + + + + + + + + +/* [4] Gestion de la navigation (physique) +===========================================*/ +DOM.MENUSIDE.addEventListener('click', function(e){ + var target = e.target; + + // On remonte dans les parents au bon niveau + while( target != document.body && !target.getData('link') ) + target = target.parentNode; + + // Si on a trouve l'element, on l'utilise pour la page + if( target.getData('link') ) + navMenu(target.getData('link')); +}, false); diff --git a/public_html/view/admin.php b/public_html/view/admin.php index 8978051..0e40a74 100755 --- a/public_html/view/admin.php +++ b/public_html/view/admin.php @@ -10,7 +10,8 @@ - + + @@ -21,25 +22,23 @@