From 9fe1bf307215b7302ec2619f254e9d23a90a8f6a Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 23 Sep 2017 19:40:37 +0200 Subject: [PATCH] 'extension' renamed to 'option' + showed in machine_cluster lists (machine/groups + groups/view) + module in term of design / option in term of user explanation --- build/viewer/view/extension/view.php | 72 -------- build/viewer/view/extension/view.twig | 42 ----- build/viewer/view/group/view.php | 23 ++- build/viewer/view/group/view.twig | 18 +- build/viewer/view/machine/groups.php | 24 ++- build/viewer/view/machine/groups.twig | 14 +- public_html/css/container.scss | 8 +- public_html/css/min/container.css | 157 ++++++++++++++++-- public_html/index.php | 2 +- public_html/js/action-script.js | 2 +- public_html/js/min/action-script.js | 2 +- .../container/{extension.svg => option.svg} | 0 .../menu-side/{extensions.svg => options.svg} | 0 .../view/js/min/{extensions.js => options.js} | 0 .../view/js/{extensions.js => options.js} | 0 .../view/{extensions.php => options.php} | 7 +- public_html/view/view.php | 2 +- 17 files changed, 225 insertions(+), 148 deletions(-) delete mode 100644 build/viewer/view/extension/view.php delete mode 100644 build/viewer/view/extension/view.twig rename public_html/src/static/container/{extension.svg => option.svg} (100%) rename public_html/src/static/menu-side/{extensions.svg => options.svg} (100%) rename public_html/view/js/min/{extensions.js => options.js} (100%) rename public_html/view/js/{extensions.js => options.js} (100%) rename public_html/view/{extensions.php => options.php} (95%) diff --git a/build/viewer/view/extension/view.php b/build/viewer/view/extension/view.php deleted file mode 100644 index 828ce5d..0000000 --- a/build/viewer/view/extension/view.php +++ /dev/null @@ -1,72 +0,0 @@ - [ - 'group' => file_get_contents( __PUBLIC__.'/src/static/container/extension.svg' ) - ], - - 'p_theme' => $_SESSION['WAREHOUSE']['theme'] - ]; - - /* [3] Store functions - =========================================================*/ - $twig->addFunction(new \Twig_Function('f_clusters', function(){ - $request = new Request('clusterDefault/getAll', [ - 'class' => 1 - ]); - - $answer = $request->dispatch(); - - // si erreur, on affiche rien par défaut - if( $answer->error->get() != Err::Success ) - return []; - - return $answer->get('clusters'); - - })); - - $twig->addFunction(new \Twig_Function('f_modules', function($id_cluster){ - $extReq = new Request('clusterDefault/getModules', [ - 'id_cluster' => (int) $id_cluster - ]); - - $extRes = $extReq->dispatch(); - // si erreur, on affiche rien par défaut - if( $extRes->error->get() != Err::Success ) - return []; - - return $extRes->get('modules'); - })); - - - /* [4] Build the whole stuff - =========================================================*/ - return $twig->render('extension/view.twig', [ - 'p_icon' => $variables['p_icon'], - 'p_theme' => $variables['p_theme'] - ]); - } - - - } - - -?> diff --git a/build/viewer/view/extension/view.twig b/build/viewer/view/extension/view.twig deleted file mode 100644 index edede42..0000000 --- a/build/viewer/view/extension/view.twig +++ /dev/null @@ -1,42 +0,0 @@ - - -{% for cluster in f_clusters() %} -
- - {% set modulelist = f_modules(cluster.id_machine_cluster) %} - - {{ cluster.name }} - {{ p_icon.remove | raw }} - - {{ p_icon.edit | raw }} - - - {{ p_icon.device | raw }} - {{ modulelist | length }} modules - - - - {{ p_icon.group | raw }} - - - {% for module in modulelist %} - - {{ module.name }} - - - {% endfor %} - - - + - - -
- -{# if no result #} -{% else %} - -
- Aucun groupe trouvé. -
- -{% endfor %} diff --git a/build/viewer/view/group/view.php b/build/viewer/view/group/view.php index b704f0f..304c6cf 100755 --- a/build/viewer/view/group/view.php +++ b/build/viewer/view/group/view.php @@ -13,7 +13,7 @@ =========================================================*/ $loader = new \Twig_Loader_Filesystem(__BUILD__.'/viewer/view'); $twig = new \Twig_Environment($loader, []); - + /* [2] Store variables =========================================================*/ @@ -21,8 +21,10 @@ 'p_icon' => [ 'remove' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/remove.svg' ), 'edit' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/edit.svg' ), - 'type' => file_get_contents( __PUBLIC__.'/src/static/menu-side/type.svg' ), - 'group' => file_get_contents( __PUBLIC__.'/src/static/container/group.svg' ) + 'device' => file_get_contents( __PUBLIC__.'/src/static/menu-side/device.svg' ), + 'user' => file_get_contents( __PUBLIC__.'/src/static/menu-side/users.svg' ), + 'group' => file_get_contents( __PUBLIC__.'/src/static/container/group.svg' ), + 'option' => file_get_contents( __PUBLIC__.'/src/static/container/option.svg' ) ], 'p_theme' => $_SESSION['WAREHOUSE']['theme'] @@ -48,7 +50,7 @@ 'id_cluster' => (int) $id_cluster, 'class' => $class ]); - + $membersRes = $membersReq->dispatch(); // // si erreur, on affiche rien par défaut @@ -58,6 +60,19 @@ return $membersRes->get('members'); })); + $twig->addFunction(new \Twig_Function('f_options', function($id_cluster){ + $modReq = new Request('clusterDefault/getModules', [ + 'id_cluster' => (int) $id_cluster + ]); + + $modRes = $modReq->dispatch(); + // si erreur, on affiche rien par défaut + if( $modRes->error->get() != Err::Success ) + return []; + + return $modRes->get('modules'); + })); + /* [4] Build the whole stuff =========================================================*/ diff --git a/build/viewer/view/group/view.twig b/build/viewer/view/group/view.twig index be431d4..7887d17 100755 --- a/build/viewer/view/group/view.twig +++ b/build/viewer/view/group/view.twig @@ -5,7 +5,7 @@ {% for user_cluster in f_clusters(0) %} {% set noresult = false %} - + {% set id_user_cluster = 'u' ~ user_cluster.id_user_cluster %} {% set memlen = f_members(user_cluster.id_user_cluster,0) | length %} @@ -17,10 +17,11 @@ {{ p_icon.edit | raw }} - {{ p_icon.type | raw }} + {{ p_icon.user | raw }} {{ memlen }} utilisateur{% if memlen > 1 %}s{% endif %} + {{ p_icon.group | raw }} @@ -55,10 +56,21 @@ {{ p_icon.edit | raw }} - {{ p_icon.type | raw }} + {{ p_icon.device | raw }} {{ memlen }} machine{% if memlen > 1 %}s{% endif %} + + {{ p_icon.option | raw }} + {% for option in f_options(id_machine_cluster) %} + + {{ option.name }} + + {% else %} + Aucune option + {% endfor %} + + {{ p_icon.group | raw }} diff --git a/build/viewer/view/machine/groups.php b/build/viewer/view/machine/groups.php index 4855de6..99fd598 100755 --- a/build/viewer/view/machine/groups.php +++ b/build/viewer/view/machine/groups.php @@ -14,7 +14,7 @@ =========================================================*/ $loader = new \Twig_Loader_Filesystem(__BUILD__.'/viewer/view'); $twig = new \Twig_Environment($loader, []); - + /* [2] Store variables =========================================================*/ @@ -22,8 +22,9 @@ 'p_icon' => [ 'remove' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/remove.svg' ), 'edit' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/edit.svg' ), - 'device' => file_get_contents( __PUBLIC__.'/src/static/menu-side/device.svg' ), - 'group' => file_get_contents( __PUBLIC__.'/src/static/container/group.svg' ) + 'device' => file_get_contents( __PUBLIC__.'/src/static/menu-side/device.svg' ), + 'group' => file_get_contents( __PUBLIC__.'/src/static/container/group.svg' ), + 'option' => file_get_contents( __PUBLIC__.'/src/static/container/option.svg' ) ], 'p_theme' => $_SESSION['WAREHOUSE']['theme'] @@ -35,7 +36,7 @@ $request = new Request('clusterDefault/getAll', [ 'class' => 1 ]); - + $answer = $request->dispatch(); // si erreur, on affiche rien par défaut @@ -51,7 +52,7 @@ 'id_cluster' => (int) $id_cluster, 'class' => 1 ]); - + $usersRes = $usersReq->dispatch(); // si erreur, on affiche rien par défaut if( $usersRes->error->get() != Err::Success ) @@ -60,6 +61,19 @@ return $usersRes->get('members'); })); + $twig->addFunction(new \Twig_Function('f_options', function($id_cluster){ + $modReq = new Request('clusterDefault/getModules', [ + 'id_cluster' => (int) $id_cluster + ]); + + $modRes = $modReq->dispatch(); + // si erreur, on affiche rien par défaut + if( $modRes->error->get() != Err::Success ) + return []; + + return $modRes->get('modules'); + })); + /* [4] Build the whole stuff =========================================================*/ diff --git a/build/viewer/view/machine/groups.twig b/build/viewer/view/machine/groups.twig index 35fd991..28011d1 100755 --- a/build/viewer/view/machine/groups.twig +++ b/build/viewer/view/machine/groups.twig @@ -15,6 +15,18 @@ {{ machinelist | length }} machines + + + {{ p_icon.option | raw }} + {% for option in f_options(cluster.id_machine_cluster) %} + + {{ option.name }} + + {% else %} + Aucune option + {% endfor %} + + {{ p_icon.group | raw }} @@ -26,7 +38,7 @@ {% endfor %} - + + diff --git a/public_html/css/container.scss b/public_html/css/container.scss index 0249eda..9179a6a 100755 --- a/public_html/css/container.scss +++ b/public_html/css/container.scss @@ -155,6 +155,7 @@ /* (2) Code RFID */ /* (3) Adresse mail */ .code, + .option, .mail{ display: block; margin: 1em; @@ -191,7 +192,8 @@ /* (4) Groupes */ - .groups{ + .groups, + .option{ display: block; margin: 1em; color: #333; @@ -332,6 +334,10 @@ } + .option > span.ignore > span{ + border-radius: 3px; + } + /* (5) Lien vers la modification */ .link_edit, .link_remove{ diff --git a/public_html/css/min/container.css b/public_html/css/min/container.css index a80714a..ac32ab1 100644 --- a/public_html/css/min/container.css +++ b/public_html/css/min/container.css @@ -167,8 +167,10 @@ } #WRAPPER > #CONTAINER > section > .inline-box .code, +#WRAPPER > #CONTAINER > section > .inline-box .option, #WRAPPER > #CONTAINER > section > .inline-box .mail, #WRAPPER > #CONTAINER > section > .inline-row .code, +#WRAPPER > #CONTAINER > section > .inline-row .option, #WRAPPER > #CONTAINER > section > .inline-row .mail { display: block; margin: 1em; @@ -177,8 +179,10 @@ } #WRAPPER > #CONTAINER > section > .inline-box .code svg, +#WRAPPER > #CONTAINER > section > .inline-box .option svg, #WRAPPER > #CONTAINER > section > .inline-box .mail svg, #WRAPPER > #CONTAINER > section > .inline-row .code svg, +#WRAPPER > #CONTAINER > section > .inline-row .option svg, #WRAPPER > #CONTAINER > section > .inline-row .mail svg { display: inline-block; position: relative; @@ -191,30 +195,38 @@ } #WRAPPER > #CONTAINER > section > .inline-box .code svg path#stylisable, +#WRAPPER > #CONTAINER > section > .inline-box .option svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-box .mail svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-row .code svg path#stylisable, +#WRAPPER > #CONTAINER > section > .inline-row .option svg path#stylisable, #WRAPPER > #CONTAINER > section > .inline-row .mail svg path#stylisable { fill: #333 !important; pointer-events: none; } #WRAPPER > #CONTAINER > section > .inline-box .code svg path#stroke-stylisable, +#WRAPPER > #CONTAINER > section > .inline-box .option svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-box .mail svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-row .code svg path#stroke-stylisable, +#WRAPPER > #CONTAINER > section > .inline-row .option svg path#stroke-stylisable, #WRAPPER > #CONTAINER > section > .inline-row .mail svg path#stroke-stylisable { stroke: #333 !important; pointer-events: none; } #WRAPPER > #CONTAINER > section > .inline-box .groups, -#WRAPPER > #CONTAINER > section > .inline-row .groups { +#WRAPPER > #CONTAINER > section > .inline-box .option, +#WRAPPER > #CONTAINER > section > .inline-row .groups, +#WRAPPER > #CONTAINER > section > .inline-row .option { display: block; margin: 1em; color: #333; } #WRAPPER > #CONTAINER > section > .inline-box .groups svg, -#WRAPPER > #CONTAINER > section > .inline-row .groups svg { +#WRAPPER > #CONTAINER > section > .inline-box .option svg, +#WRAPPER > #CONTAINER > section > .inline-row .groups svg, +#WRAPPER > #CONTAINER > section > .inline-row .option svg { display: inline-block; position: relative; margin-left: .5em; @@ -226,15 +238,21 @@ } #WRAPPER > #CONTAINER > section > .inline-box .groups svg path, -#WRAPPER > #CONTAINER > section > .inline-row .groups svg path { +#WRAPPER > #CONTAINER > section > .inline-box .option svg path, +#WRAPPER > #CONTAINER > section > .inline-row .groups svg path, +#WRAPPER > #CONTAINER > section > .inline-row .option svg path { fill: #333 !important; pointer-events: none; } #WRAPPER > #CONTAINER > section > .inline-box .groups > span:not(.ignore), #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore), +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore), -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore), +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span { display: inline-block; position: relative; padding: .1em .5em; @@ -253,6 +271,14 @@ #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-group, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-member, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-extension, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-group, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-member, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-extension, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-group, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-member, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-extension, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-group, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-member, @@ -260,7 +286,15 @@ #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-group, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-member, -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-group, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-member, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-extension, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-group, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-member, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-extension { border-radius: 3px; cursor: pointer; } @@ -270,6 +304,14 @@ #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-group > div.dropdown, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-member > div.dropdown, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-extension > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-permission > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-group > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-member > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-extension > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-permission > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-group > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-member > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-extension > div.dropdown, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-permission > div.dropdown, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-group > div.dropdown, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-member > div.dropdown, @@ -277,7 +319,15 @@ #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-permission > div.dropdown, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-group > div.dropdown, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-member > div.dropdown, -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension > div.dropdown { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-permission > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-group > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-member > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-extension > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-permission > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-group > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-member > div.dropdown, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-extension > div.dropdown { display: flex; flex-direction: column; flex-wrap: nowrap; @@ -301,6 +351,14 @@ #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-group > div.dropdown > span, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-member > div.dropdown > span, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-extension > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-permission > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-group > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-member > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-extension > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-permission > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-group > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-member > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-extension > div.dropdown > span, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-permission > div.dropdown > span, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-group > div.dropdown > span, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-member > div.dropdown > span, @@ -308,7 +366,15 @@ #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-permission > div.dropdown > span, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-group > div.dropdown > span, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-member > div.dropdown > span, -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension > div.dropdown > span { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-permission > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-group > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-member > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-extension > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-permission > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-group > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-member > div.dropdown > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-extension > div.dropdown > span { padding: .5em; padding-left: 1em; flex: 2em 1 1; @@ -320,6 +386,14 @@ #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-group > div.dropdown > span:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-member > div.dropdown > span:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span.add-extension > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-permission > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-group > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-member > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore).add-extension > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-permission > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-group > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-member > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span.add-extension > div.dropdown > span:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-permission > div.dropdown > span:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-group > div.dropdown > span:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore).add-member > div.dropdown > span:hover, @@ -327,7 +401,15 @@ #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-permission > div.dropdown > span:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-group > div.dropdown > span:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-member > div.dropdown > span:hover, -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension > div.dropdown > span:hover { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span.add-extension > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-permission > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-group > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-member > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore).add-extension > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-permission > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-group > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-member > div.dropdown > span:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span.add-extension > div.dropdown > span:hover { background-color: #F8F8F8; } @@ -341,6 +423,16 @@ #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.rem-permission, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.rem-member, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.rem-extension, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-group, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-member, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-extension, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-group, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-member, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-extension, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.rem-group, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.rem-permission, @@ -350,7 +442,17 @@ #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-member, -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-extension { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-extension, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-group, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-member, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-extension, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-group, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-member, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-extension { display: block; position: absolute; top: -1px; @@ -378,6 +480,16 @@ #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.rem-permission:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.rem-member:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.rem-extension:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-group:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-member:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.rem-extension:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-group:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-member:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.rem-extension:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.rem-group:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.rem-permission:hover, @@ -387,7 +499,17 @@ #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-member:hover, -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-extension:hover { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.rem-extension:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-group:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-member:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.rem-extension:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-group:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-member:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.rem-extension:hover { background-image: url("/src/static/sub-menu-side/remove@d52918.svg"); } @@ -395,16 +517,29 @@ #WRAPPER > #CONTAINER > section > .inline-box .groups > span:not(.ignore) > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.ignore > span > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span:not(.ignore) > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span:not(.ignore) > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.icon-permission, -#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.icon-permission:hover { +#WRAPPER > #CONTAINER > section > .inline-row .groups > span.ignore > span > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span:not(.ignore) > span.icon-permission:hover, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.icon-permission, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span > span.icon-permission:hover { border-color: #ddd; background-color: #eee; cursor: default; background-image: url("/src/static/sub-menu-side/permission.svg"); } +#WRAPPER > #CONTAINER > section > .inline-box .option > span.ignore > span, +#WRAPPER > #CONTAINER > section > .inline-row .option > span.ignore > span { + border-radius: 3px; +} + #WRAPPER > #CONTAINER > section > .inline-box .link_edit, #WRAPPER > #CONTAINER > section > .inline-box .link_remove, #WRAPPER > #CONTAINER > section > .inline-row .link_edit, diff --git a/public_html/index.php b/public_html/index.php index 4c138f6..048612d 100755 --- a/public_html/index.php +++ b/public_html/index.php @@ -92,7 +92,7 @@ // nomPage/arg1/arg2 -> inclusion de la page $R->get('(.*)', function($m){ // Liste des pages du site - $page_list = [ 'history', 'profile', 'machines', 'users', 'groups', 'extensions', 'settings' ]; + $page_list = [ 'history', 'profile', 'machines', 'users', 'groups', 'options', 'settings' ]; if( !preg_match('#^(?:'.implode('|', $page_list).')(?:/[\w-]+)*/?$#i', $m[0]) ) diff --git a/public_html/js/action-script.js b/public_html/js/action-script.js index 0b24853..1c42b6f 100755 --- a/public_html/js/action-script.js +++ b/public_html/js/action-script.js @@ -175,7 +175,7 @@ function navMenu(section, persistence){ // init page-manager -pageManager.setPage(null, '/view', DOM.CONTAINER, ['history', 'profile', 'machines', 'users', 'groups', 'extensions', 'settings'] ); +pageManager.setPage(null, '/view', DOM.CONTAINER, ['history', 'profile', 'machines', 'users', 'groups', 'options', 'settings'] ); // launch pageManager navMenu(pageManager.page); diff --git a/public_html/js/min/action-script.js b/public_html/js/min/action-script.js index 89fa259..3082e08 100755 --- a/public_html/js/min/action-script.js +++ b/public_html/js/min/action-script.js @@ -1 +1 @@ -function navSubMenu(e){var a=document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+pageManager.vars[0]+'"]'),n=null;if(n=e instanceof Element?e:null,n="string"==typeof e?document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+e+'"]'):n,n=null==n?document.querySelector("#CONTAINER > .sub-menu-side > span[data-sublink]"):n,null==n)return!1;null!=a&&a.remClass("active");for(var t=document.querySelectorAll("#CONTAINER > section[data-sublink].active"),r=0;r section[data-sublink="'+n.getData("sublink")+'"]');null!=u&&u.addClass("active")}if(!n.getData("sublink"))return!1;var l=pageManager.vars[0]!=n.getData("sublink");pageManager.vars[0]=n.getData("sublink"),l&&pageManager.updateURL()}function navMenu(e,a){var n=document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.page+'"]'),t=null;if(t=e instanceof Element?e:null,t="string"==typeof e?document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+e+'"]'):t,t=t||document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]'),null==t)return!1;a=a===!0?!0:!1,n&&n.remClass("active"),t&&t.addClass("active");if(a||n==t||(pageManager.vars=[]),t.getData("link")){DOM.HEADER.addClass("loading");var r=function(){var e=pageManager.vars.length>0&&null!=document.querySelector('#CONTAINER > .sub-menu-side > [data-sublink="'+pageManager.vars[0]+'"]');navSubMenu(e?pageManager.vars[0]:null),document.querySelector("#CONTAINER > .sub-menu-side").addEventListener("click",function(e){for(var a=e.target;a!=document.body&&!a.getData("sublink");)a=a.parentNode;a.getData("sublink")&&navSubMenu(a)},!1),DOM.HEADER.remClass("loading")};pageManager.page!=t.getData("link")&&pageManager.setPage(t.getData("link")),pageManager.activeXHR?pageManager.activeXHR.addEventListener("loadend",r,!1):r.call()}}DOM={WRAPPER:$("WRAPPER"),HEADER:$("HEADER"),MENUSIDE:$("MENU-SIDE"),CONTAINER:$("CONTAINER")};var pageManager=new pageManagerClass,api=new APIClass("/api/");pageManager.setPage(null,"/view",DOM.CONTAINER,["history","profile","machines","users","groups","extensions","settings"]),navMenu(pageManager.page),pageManager.refresher=function(){navSubMenu(this.vars[0]),document.querySelector("#CONTAINER > .sub-menu-side").addEventListener("click",function(e){for(var a=e.target;a!=document.body&&!a.getData("sublink");)a=a.parentNode;a.getData("sublink")&&navSubMenu(a)},!1)},DOM.MENUSIDE.addEventListener("click",function(e){for(var a=e.target;a!=document.body&&!a.getData("link");)a=a.parentNode;a.getData("link")&&navMenu(a.getData("link"))},!1); \ No newline at end of file +function navSubMenu(e){var a=document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+pageManager.vars[0]+'"]'),n=null;if(n=e instanceof Element?e:null,n="string"==typeof e?document.querySelector('#CONTAINER > .sub-menu-side > span[data-sublink="'+e+'"]'):n,n=null==n?document.querySelector("#CONTAINER > .sub-menu-side > span[data-sublink]"):n,null==n)return!1;null!=a&&a.remClass("active");for(var t=document.querySelectorAll("#CONTAINER > section[data-sublink].active"),r=0;r section[data-sublink="'+n.getData("sublink")+'"]');null!=u&&u.addClass("active")}if(!n.getData("sublink"))return!1;var l=pageManager.vars[0]!=n.getData("sublink");pageManager.vars[0]=n.getData("sublink"),l&&pageManager.updateURL()}function navMenu(e,a){var n=document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.page+'"]'),t=null;if(t=e instanceof Element?e:null,t="string"==typeof e?document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+e+'"]'):t,t=t||document.querySelector('#WRAPPER > #MENU-SIDE > span[data-link="'+pageManager.pagelist[0]+'"]'),null==t)return!1;a=a===!0?!0:!1,n&&n.remClass("active"),t&&t.addClass("active");if(a||n==t||(pageManager.vars=[]),t.getData("link")){DOM.HEADER.addClass("loading");var r=function(){var e=pageManager.vars.length>0&&null!=document.querySelector('#CONTAINER > .sub-menu-side > [data-sublink="'+pageManager.vars[0]+'"]');navSubMenu(e?pageManager.vars[0]:null),document.querySelector("#CONTAINER > .sub-menu-side").addEventListener("click",function(e){for(var a=e.target;a!=document.body&&!a.getData("sublink");)a=a.parentNode;a.getData("sublink")&&navSubMenu(a)},!1),DOM.HEADER.remClass("loading")};pageManager.page!=t.getData("link")&&pageManager.setPage(t.getData("link")),pageManager.activeXHR?pageManager.activeXHR.addEventListener("loadend",r,!1):r.call()}}DOM={WRAPPER:$("WRAPPER"),HEADER:$("HEADER"),MENUSIDE:$("MENU-SIDE"),CONTAINER:$("CONTAINER")};var pageManager=new pageManagerClass,api=new APIClass("/api/");pageManager.setPage(null,"/view",DOM.CONTAINER,["history","profile","machines","users","groups","options","settings"]),navMenu(pageManager.page),pageManager.refresher=function(){navSubMenu(this.vars[0]),document.querySelector("#CONTAINER > .sub-menu-side").addEventListener("click",function(e){for(var a=e.target;a!=document.body&&!a.getData("sublink");)a=a.parentNode;a.getData("sublink")&&navSubMenu(a)},!1)},DOM.MENUSIDE.addEventListener("click",function(e){for(var a=e.target;a!=document.body&&!a.getData("link");)a=a.parentNode;a.getData("link")&&navMenu(a.getData("link"))},!1); \ No newline at end of file diff --git a/public_html/src/static/container/extension.svg b/public_html/src/static/container/option.svg similarity index 100% rename from public_html/src/static/container/extension.svg rename to public_html/src/static/container/option.svg diff --git a/public_html/src/static/menu-side/extensions.svg b/public_html/src/static/menu-side/options.svg similarity index 100% rename from public_html/src/static/menu-side/extensions.svg rename to public_html/src/static/menu-side/options.svg diff --git a/public_html/view/js/min/extensions.js b/public_html/view/js/min/options.js similarity index 100% rename from public_html/view/js/min/extensions.js rename to public_html/view/js/min/options.js diff --git a/public_html/view/js/extensions.js b/public_html/view/js/options.js similarity index 100% rename from public_html/view/js/extensions.js rename to public_html/view/js/options.js diff --git a/public_html/view/extensions.php b/public_html/view/options.php similarity index 95% rename from public_html/view/extensions.php rename to public_html/view/options.php index b8db162..d2f155f 100755 --- a/public_html/view/extensions.php +++ b/public_html/view/options.php @@ -50,9 +50,6 @@ debug(); echo "
"; - $extensionView = new Viewer('extension.view', []); - $extensionView->view(); - echo '
'; @@ -66,7 +63,7 @@ /* (1) Modules de l'entrepot ---------------------------------------------------------*/ - echo "
Modules entrepot:\n";
+			echo "
Options entrepot:\n";
 
 			/* (1) Requete de récupération */
 			$req_mods = new Repo('warehouse/getModules', [$_SESSION['WAREHOUSE']['id']]);
@@ -85,7 +82,7 @@
 
 			/* (2) Modules par groupes de machines
 			---------------------------------------------------------*/
-			echo "Modules par groupes de machines: \n";
+			echo "Options par groupes de machines: \n";
 
 			/* (1) Requête de récupération des groupes */
 			$req_mc = new Repo('machine_cluster/getAll', [$_SESSION['WAREHOUSE']['id']]);
diff --git a/public_html/view/view.php b/public_html/view/view.php
index e0c001f..219e523 100755
--- a/public_html/view/view.php
+++ b/public_html/view/view.php
@@ -55,7 +55,7 @@
 				
 				
 				
-				
+