From a6b1d4d1f8825e6635b978add4a67a8c1be1a28f Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 9 Jan 2017 14:49:00 +0100 Subject: [PATCH] Fixed user_groups.twig because it was `id_cluster` instead of `id_user_cluster` --- build/viewer/view/user/user_groups.twig | 14 +++--- public_html/view/js/min/users.js | 61 ++++++++++++++----------- public_html/view/js/users.js | 12 ++--- 3 files changed, 48 insertions(+), 39 deletions(-) diff --git a/build/viewer/view/user/user_groups.twig b/build/viewer/view/user/user_groups.twig index 7122e24..c2424f8 100644 --- a/build/viewer/view/user/user_groups.twig +++ b/build/viewer/view/user/user_groups.twig @@ -1,31 +1,31 @@ {% for cluster in f_clusters() %} -
+
{{ cluster.name }} - {{ p_icon.remove | raw }} + {{ p_icon.remove | raw }} - {{ p_icon.edit | raw }} + {{ p_icon.edit | raw }} {{ p_icon.type | raw }} - {{ f_users(cluster.id_cluster) | length }} utilisateurs + {{ f_users(cluster.id_user_cluster) | length }} utilisateurs {{ p_icon.group | raw }} - {% for user in f_users(cluster.id_cluster) %} + {% for user in f_users(cluster.id_user_cluster) %} {{ user.username }} - + {% endfor %} - + + +
diff --git a/public_html/view/js/min/users.js b/public_html/view/js/min/users.js index 5b814d8..1330973 100755 --- a/public_html/view/js/min/users.js +++ b/public_html/view/js/min/users.js @@ -1,26 +1,35 @@ -var section={view:{text:'#CONTAINER > section[data-sublink="view"] ',element:document.querySelector('#CONTAINER > section[data-sublink="view"]'),searchbar:document.querySelector('#CONTAINER > section[data-sublink="view"] > .searchbar')},create:{text:'#CONTAINER > section[data-sublink="create"] ',element:document.querySelector('#CONTAINER > section[data-sublink="create"]')},remove:{text:'#CONTAINER > section[data-sublink="remove"] ',element:document.querySelector('#CONTAINER > section[data-sublink="remove"]')}, -edit:{text:'#CONTAINER > section[data-sublink="edit"] ',element:document.querySelector('#CONTAINER > section[data-sublink="edit"]')},groups:{text:'#CONTAINER > section[data-sublink="groups"] ',element:document.querySelector('#CONTAINER > section[data-sublink="groups"]'),searchbar:document.querySelector('#CONTAINER > section[data-sublink="groups"] > .searchbar')}}; -if(null!=section.view.element){1 article.inline-box[id]");for(b=0;b article.inline-box[id]");for(b=0;b section[data-sublink="view"] ',element:document.querySelector('#CONTAINER > section[data-sublink="view"]'),searchbar:document.querySelector('#CONTAINER > section[data-sublink="view"] > .searchbar')},create:{text:'#CONTAINER > section[data-sublink="create"] ',element:document.querySelector('#CONTAINER > section[data-sublink="create"]')},remove:{text:'#CONTAINER > section[data-sublink="remove"] ',element:document.querySelector('#CONTAINER > section[data-sublink="remove"]')},edit:{text:'#CONTAINER > section[data-sublink="edit"] ',element:document.querySelector('#CONTAINER > section[data-sublink="edit"]')},groups:{text:'#CONTAINER > section[data-sublink="groups"] ',element:document.querySelector('#CONTAINER > section[data-sublink="groups"]'),searchbar:document.querySelector('#CONTAINER > section[data-sublink="groups"] > .searchbar')}} +if(null!=section.view.element){pageManager.vars.length>1&&!isNaN(pageManager.vars[1])&&(document.location="#"+pageManager.vars[1],null!=document.getElementById(pageManager.vars[1])&&document.getElementById(pageManager.vars[1]).addClass("selected")),section.view.link={edit:document.querySelectorAll(section.view.text+".link_edit[data-user]"),remove:document.querySelectorAll(section.view.text+".link_remove[data-user]")},section.view.group={rem:document.querySelectorAll(section.view.text+".rem-group[data-user][data-group]"),add:document.querySelectorAll(section.view.text+".add-group[data-user]")},section.view.searchbar.addEventListener("keyup",function(e){var t={path:"userDefault/search",keywords:section.view.searchbar.value} +api.send(t,function(e){if(0==e.ModuleError&&(console.log(e.users.length),0==e.ModuleError)){for(var t=[],r=0;r article.inline-box[id]"),r=0;r-1?i[r].remClass("hidden"):i[r].addClass("hidden")}})},!1) +for(var i=0;i=2&&!isNaN(pageManager.vars[1])&&api.send({path:"userDefault/getById",id_user:pageManager.vars[1]},function(e){0==e.ModuleError&&(found_edit=[e.user],searchindex_edit=0,autofill_edit(),found_remove=[e.user],searchindex_remove=0,autofill_remove())}),null!=section.groups.element){section.groups.link={remove:document.querySelectorAll(section.groups.text+".link_remove[data-cluster]"),edit:document.querySelectorAll(section.groups.text+".link_edit[data-cluster]")},section.groups.group={rem:document.querySelectorAll(section.groups.text+".rem-member[data-cluster][data-member]"),add:document.querySelectorAll(section.groups.text+".add-member[data-cluster]")},section.groups.searchbar.addEventListener("keyup",function(e){var t={path:"clusterDefault/search",keywords:section.groups.searchbar.value,class:0} +api.send(t,function(e){if(0==e.ModuleError){for(var t=[],r=0;r article.inline-box[id]"),r=0;r-1?i[r].remClass("hidden"):i[r].addClass("hidden")}})},!1) +var i +for(i=0;i