Cleaned machines.js on the model of users.js (last commit)

This commit is contained in:
xdrm-brackets 2017-01-09 14:51:42 +01:00
parent a6b1d4d1f8
commit e9b6b4186d
4 changed files with 40 additions and 34 deletions

View File

@ -690,8 +690,7 @@ if( section.groups.element != null ){
for( i = 0 ; i < section.groups.link.edit.length ; i++ ){
section.groups.link.edit[i].addEventListener('click', function(e){
pageManager.vars[0] = 'edit';
pageManager.vars[1] = 'm'+e.target.getData('cluster');
pageManager.vars = [ 'edit', 'm'+e.target.getData('cluster') ];
navMenu('groups', true);
}, false);
@ -701,8 +700,7 @@ if( section.groups.element != null ){
for( i = 0 ; i < section.groups.link.remove.length ; i++ ){
section.groups.link.remove[i].addEventListener('click', function(e){
pageManager.vars[0] = 'remove';
pageManager.vars[1] = 'm'+e.target.getData('cluster');
pageManager.vars = [ 'remove', 'm'+e.target.getData('cluster') ];
navMenu('groups', true);
}, false);
@ -740,8 +738,7 @@ if( section.groups.element != null ){
for( i = 0 ; i < section.groups.group.add.length ; i++ ){
section.groups.group.add[i].addEventListener('click', function(e){
pageManager.vars[0] = 'members';
pageManager.vars[1] = 'm'+e.target.getData('cluster');
pageManager.vars = [ 'members', 'm'+e.target.getData('cluster') ];
navMenu('groups', true);
}, false);

View File

@ -1,22 +1,34 @@
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<pageManager.vars.length&&!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-machine]"),remove:document.querySelectorAll(section.view.text+".link_remove[data-machine]")};section.view.group={rem:document.querySelectorAll(section.view.text+".rem-group[data-machine][data-group]"),
add:document.querySelectorAll(section.view.text+".add-group[data-machine]")};section.view.searchbar.addEventListener("keyup",function(a){api.send({path:"machineDefault/search",keywords:section.view.searchbar.value},function(a){if(0==a.ModuleError){for(var d=[],c=0;c<a.machines.length;c++)d.push(a.machines[c].id_machine);a=document.querySelectorAll(section.view.text+"> article.inline-box[id]");for(c=0;c<a.length;c++)-1<d.indexOf(parseInt(a[c].id))?a[c].remClass("hidden"):a[c].addClass("hidden")}})},
!1);for(var i=0;i<section.view.link.edit.length;i++)section.view.link.edit[i].addEventListener("click",function(a){pageManager.vars[1]=a.target.getData("machine");navSubMenu("edit");document.location=""},!1);for(i=0;i<section.view.link.remove.length;i++)section.view.link.remove[i].addEventListener("click",function(a){pageManager.vars[1]=a.target.getData("machine");navSubMenu("remove");document.location=""},!1);for(i=0;i<section.view.group.rem.length;i++)section.view.group.rem[i].addEventListener("click",
function(a){var b={path:"machineDefault/unlink",id_machine:a.target.getData("machine"),id_cluster:a.target.getData("group")};api.send(b,function(b){if(0!=b.ModuleError)return!1;a.target.parentNode.parentNode.removeChild(a.target.parentNode)})},!1)}
null!=section.create.element&&(section.create.input={name:document.querySelector(section.create.text+"#create_name"),submit:document.querySelector(section.create.text+"#create_submit")},section.create.input.submit.addEventListener("click",function(a){a.preventDefault();api.send({path:"machineDefault/create",name:section.create.input.name.value},function(a){0==a.ModuleError&&(console.log("Machine cree!"),section.create.input.name.value="",section.create.input.submit.anim("active",1500))})},!1));
if(null!=section.remove.element){var autofill_remove=function(){var a="",b="",d=!0;null==found_remove[searchindex_remove]?searchindex_remove=section.remove.input.search.num.innerHTML=0:(a=found_remove[searchindex_remove].id_machine,b=found_remove[searchindex_remove].name,d=!1,section.remove.input.search.num.innerHTML=searchindex_remove+1);section.remove.input.search.id.value=a;section.remove.input.name.value=b;section.remove.input.submit.disabled=d};section.remove.input={search:{view:document.querySelector(section.remove.text+
".remove_search_view"),num:document.querySelector(section.remove.text+".remove_search_num"),sum:document.querySelector(section.remove.text+".remove_search_sum"),keyword:document.querySelector(section.remove.text+"#remove_search_keyword"),id:document.querySelector(section.remove.text+"#remove_search_id"),submit:document.querySelector(section.remove.text+"#remove_search_submit")},name:document.querySelector(section.remove.text+"#remove_name"),submit:document.querySelector(section.remove.text+"#remove_submit")};
var lastkeywords_remove="",found_remove=[],searchindex_remove=0;2<=pageManager.vars.length&&!isNaN(pageManager.vars[1])&&api.send({path:"machineDefault/getById",id_machine:pageManager.vars[1]},function(a){0==a.ModuleError&&(found_remove=[a.machine],searchindex_remove=0,autofill_remove())});section.remove.input.search.submit.addEventListener("click",function(a){a.preventDefault();if(""!=section.remove.input.search.keyword.value)if(section.remove.input.search.keyword.value==lastkeywords_remove)searchindex_remove=
(searchindex_remove+1)%found_remove.length,autofill_remove();else{var b={path:"machineDefault/search",keywords:section.remove.input.search.keyword.value};api.send(b,function(a){0==a.ModuleError&&(section.remove.input.search.submit.anim("active",1E3),searchindex_remove=0,found_remove=a.machines,section.remove.input.search.sum.innerHTML=found_remove.length,autofill_remove());lastkeywords_remove=b.keywords})}},!1);section.remove.input.submit.addEventListener("click",function(a){a.preventDefault();""!=
section.remove.input.search.id.value&&api.send({path:"machineDefault/delete",id_machine:section.remove.input.search.id.value},function(a){0==a.ModuleError&&1==a.status?(console.log("Machine supprimee!"),section.remove.input.submit.anim("active",1500),0==section.remove.input.search.keyword.value.length?(found_remove=[],searchindex_remove=0):api.send({path:"machineDefault/search",keywords:section.remove.input.search.keyword.value},function(a){0==a.ModuleError&&(searchindex_remove=0,found_remove=a.machines,
section.remove.input.search.sum.innerHTML=found_remove.length)}),autofill_remove()):console.error("ModuleError::"+a.ModuleError)})},!1)}
if(null!=section.edit.element){var autofill_edit=function(){var a="",b="",d=!0;null==found_edit[searchindex_edit]?searchindex_edit=section.edit.input.search.num.innerHTML=0:(a=found_edit[searchindex_edit].id_machine,b=found_edit[searchindex_edit].name,d=!1,section.edit.input.search.num.innerHTML=searchindex_edit+1);section.edit.input.search.id.value=a;section.edit.input.name.value=b;section.edit.input.submit.disabled=d};section.edit.input={search:{view:document.querySelector(section.edit.text+".edit_search_view"),
num:document.querySelector(section.edit.text+".edit_search_num"),sum:document.querySelector(section.edit.text+".edit_search_sum"),keyword:document.querySelector(section.edit.text+"#edit_search_keyword"),id:document.querySelector(section.edit.text+"#edit_search_id"),submit:document.querySelector(section.edit.text+"#edit_search_submit")},name:document.querySelector(section.edit.text+"#edit_name"),submit:document.querySelector(section.edit.text+"#edit_submit")};var lastkeywords_edit="",found_edit=[],
searchindex_edit=0;2<=pageManager.vars.length&&!isNaN(pageManager.vars[1])&&api.send({path:"machineDefault/getById",id_machine:pageManager.vars[1]},function(a){0==a.ModuleError&&(found_edit=[a.machine],searchindex_edit=0,autofill_edit())});section.edit.input.search.submit.addEventListener("click",function(a){a.preventDefault();if(""!=section.edit.input.search.keyword.value)if(section.edit.input.search.keyword.value==lastkeywords_edit)searchindex_edit=(searchindex_edit+1)%found_edit.length,autofill_edit();
else{var b={path:"machineDefault/search",keywords:section.edit.input.search.keyword.value};api.send(b,function(a){0==a.ModuleError&&(section.edit.input.search.submit.anim("active",1E3),searchindex_edit=0,found_edit=a.machines,section.edit.input.search.sum.innerHTML=found_edit.length,autofill_edit());lastkeywords_edit=b.keywords})}},!1);section.edit.input.submit.addEventListener("click",function(a){a.preventDefault();if(""!=section.edit.input.search.id.value){var b={path:"machineDefault/edit",id_machine:section.edit.input.search.id.value,
name:section.edit.input.name.value};api.send(b,function(a){0==a.ModuleError&&1==a.status?(console.log("Machine modifiee!"),section.edit.input.submit.anim("active",1500),api.send({path:"machineDefault/getById",id_machine:b.id_machine},function(a){0==a.ModuleError&&(found_edit[searchindex_edit]=a.machine,autofill_edit())})):console.error("ModuleError::"+a.ModuleError)})}},!1)}
if(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(a){api.send({path:"clusterDefault/search",
keywords:section.groups.searchbar.value,"class":1},function(a){if(0==a.ModuleError){for(var d=[],c=0;c<a.clusters.length;c++)d.push(a.clusters[c].id_machine_cluster);a=document.querySelectorAll(section.groups.text+"> article.inline-box[id]");for(c=0;c<a.length;c++)-1<d.indexOf(parseInt(a[c].id))?a[c].remClass("hidden"):a[c].addClass("hidden")}})},!1);for(i=0;i<section.groups.link.edit.length;i++)section.groups.link.edit[i].addEventListener("click",function(a){pageManager.vars[0]="edit";pageManager.vars[1]=
"m"+a.target.getData("cluster");navMenu("groups",!0)},!1);for(i=0;i<section.groups.link.remove.length;i++)section.groups.link.remove[i].addEventListener("click",function(a){pageManager.vars[0]="remove";pageManager.vars[1]="m"+a.target.getData("cluster");navMenu("groups",!0)},!1);for(i=0;i<section.groups.group.rem.length;i++)section.groups.group.rem[i].addEventListener("click",function(a){var b={path:"machineDefault/unlink",id_cluster:a.target.getData("cluster"),id_machine:a.target.getData("member")};
api.send(b,function(b){if(0!=b.ModuleError)return!1;a.target.parentNode.parentNode.removeChild(a.target.parentNode)})},!1);for(i=0;i<section.groups.group.add.length;i++)section.groups.group.add[i].addEventListener("click",function(a){pageManager.vars[0]="members";pageManager.vars[1]="m"+a.target.getData("cluster");navMenu("groups",!0)},!1)};
// On referencie toutes les sections
// gestion automatique au chargement de la page si id_user dans url "/machines/.+/:id_machine:"
function autofill_remove(){var e={id_machine:"",name:"",disable_input:!0}
null==found_remove[searchindex_remove]?(section.remove.input.search.num.innerHTML=0,searchindex_remove=0):(e={id_machine:found_remove[searchindex_remove].id_machine,name:found_remove[searchindex_remove].name,disable_input:!1},section.remove.input.search.num.innerHTML=searchindex_remove+1),section.remove.input.search.id.value=e.id_machine,section.remove.input.name.value=e.name,section.remove.input.submit.disabled=e.disable_input}function autofill_edit(){var e={id_machine:"",name:"",disable_input:!0}
null==found_edit[searchindex_edit]?(section.edit.input.search.num.innerHTML=0,searchindex_edit=0):(e={id_machine:found_edit[searchindex_edit].id_machine,name:found_edit[searchindex_edit].name,disable_input:!1},section.edit.input.search.num.innerHTML=searchindex_edit+1),section.edit.input.search.id.value=e.id_machine,section.edit.input.name.value=e.name,section.edit.input.submit.disabled=e.disable_input}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){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-machine]"),remove:document.querySelectorAll(section.view.text+".link_remove[data-machine]")},section.view.group={rem:document.querySelectorAll(section.view.text+".rem-group[data-machine][data-group]"),add:document.querySelectorAll(section.view.text+".add-group[data-machine]")},section.view.searchbar.addEventListener("keyup",function(e){var t={path:"machineDefault/search",keywords:section.view.searchbar.value}
api.send(t,function(e){if(0==e.ModuleError){for(var t=[],i=0;i<e.machines.length;i++)t.push(e.machines[i].id_machine)
for(var n=document.querySelectorAll(section.view.text+"> article.inline-box[id]"),i=0;i<n.length;i++)t.indexOf(parseInt(n[i].id))>-1?n[i].remClass("hidden"):n[i].addClass("hidden")}})},!1)
for(var i=0;i<section.view.link.edit.length;i++)section.view.link.edit[i].addEventListener("click",function(e){pageManager.vars=["edit",e.target.getData("machine")],pageManager.refresh()},!1)
for(var i=0;i<section.view.link.remove.length;i++)section.view.link.remove[i].addEventListener("click",function(e){pageManager.vars=["remove",e.target.getData("machine")],pageManager.refresh()},!1)
for(var i=0;i<section.view.group.rem.length;i++)section.view.group.rem[i].addEventListener("click",function(e){var t={path:"machineDefault/unlink",id_machine:e.target.getData("machine"),id_cluster:e.target.getData("group")}
api.send(t,function(t){return 0==t.ModuleError&&void e.target.parentNode.parentNode.removeChild(e.target.parentNode)})},!1)}if(null!=section.create.element&&(section.create.input={name:document.querySelector(section.create.text+"#create_name"),submit:document.querySelector(section.create.text+"#create_submit")},section.create.input.submit.addEventListener("click",function(e){e.preventDefault()
var t={path:"machineDefault/create",name:section.create.input.name.value}
api.send(t,function(e){0==e.ModuleError&&(console.log("Machine cree!"),section.create.input.name.value="",section.create.input.submit.anim("active",1500))})},!1)),null!=section.remove.element){section.remove.input={search:{view:document.querySelector(section.remove.text+".remove_search_view"),num:document.querySelector(section.remove.text+".remove_search_num"),sum:document.querySelector(section.remove.text+".remove_search_sum"),keyword:document.querySelector(section.remove.text+"#remove_search_keyword"),id:document.querySelector(section.remove.text+"#remove_search_id"),submit:document.querySelector(section.remove.text+"#remove_search_submit")},name:document.querySelector(section.remove.text+"#remove_name"),submit:document.querySelector(section.remove.text+"#remove_submit")}
var lastkeywords_remove="",found_remove=[],searchindex_remove=0
section.remove.input.search.submit.addEventListener("click",function(e){if(e.preventDefault(),""!=section.remove.input.search.keyword.value)if(section.remove.input.search.keyword.value==lastkeywords_remove)searchindex_remove=(searchindex_remove+1)%found_remove.length,autofill_remove()
else{var t={path:"machineDefault/search",keywords:section.remove.input.search.keyword.value}
api.send(t,function(e){0==e.ModuleError&&(section.remove.input.search.submit.anim("active",1e3),searchindex_remove=0,found_remove=e.machines,section.remove.input.search.sum.innerHTML=found_remove.length,autofill_remove()),lastkeywords_remove=t.keywords})}},!1),section.remove.input.submit.addEventListener("click",function(e){if(e.preventDefault(),""!=section.remove.input.search.id.value){var t={path:"machineDefault/delete",id_machine:section.remove.input.search.id.value}
api.send(t,function(e){if(0==e.ModuleError&&1==e.status){if(console.log("Machine supprimee!"),section.remove.input.submit.anim("active",1500),0==section.remove.input.search.keyword.value.length)found_remove=[],searchindex_remove=0
else{var t={path:"machineDefault/search",keywords:section.remove.input.search.keyword.value}
api.send(t,function(e){0==e.ModuleError&&(searchindex_remove=0,found_remove=e.machines,section.remove.input.search.sum.innerHTML=found_remove.length)})}autofill_remove()}else console.error("ModuleError::"+e.ModuleError)})}},!1)}if(null!=section.edit.element){section.edit.input={search:{view:document.querySelector(section.edit.text+".edit_search_view"),num:document.querySelector(section.edit.text+".edit_search_num"),sum:document.querySelector(section.edit.text+".edit_search_sum"),keyword:document.querySelector(section.edit.text+"#edit_search_keyword"),id:document.querySelector(section.edit.text+"#edit_search_id"),submit:document.querySelector(section.edit.text+"#edit_search_submit")},name:document.querySelector(section.edit.text+"#edit_name"),submit:document.querySelector(section.edit.text+"#edit_submit")}
var lastkeywords_edit="",found_edit=[],searchindex_edit=0
section.edit.input.search.submit.addEventListener("click",function(e){if(e.preventDefault(),""!=section.edit.input.search.keyword.value)if(section.edit.input.search.keyword.value==lastkeywords_edit)searchindex_edit=(searchindex_edit+1)%found_edit.length,autofill_edit()
else{var t={path:"machineDefault/search",keywords:section.edit.input.search.keyword.value}
api.send(t,function(e){0==e.ModuleError&&(section.edit.input.search.submit.anim("active",1e3),searchindex_edit=0,found_edit=e.machines,section.edit.input.search.sum.innerHTML=found_edit.length,autofill_edit()),lastkeywords_edit=t.keywords})}},!1),section.edit.input.submit.addEventListener("click",function(e){if(e.preventDefault(),""!=section.edit.input.search.id.value){var t={path:"machineDefault/edit",id_machine:section.edit.input.search.id.value,name:section.edit.input.name.value}
api.send(t,function(e){0==e.ModuleError&&1==e.status?(console.log("Machine modifiee!"),section.edit.input.submit.anim("active",1500),api.send({path:"machineDefault/getById",id_machine:t.id_machine},function(e){0==e.ModuleError&&(found_edit[searchindex_edit]=e.machine,autofill_edit())})):console.error("ModuleError::"+e.ModuleError)})}},!1)}if(pageManager.vars.length>=2&&!isNaN(pageManager.vars[1])&&api.send({path:"machineDefault/getById",id_machine:pageManager.vars[1]},function(e){0==e.ModuleError&&(found_edit=[e.machine],searchindex_edit=0,autofill_edit(),found_remove=[e.machine],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:1}
api.send(t,function(e){if(0==e.ModuleError){for(var t=[],i=0;i<e.clusters.length;i++)t.push(e.clusters[i].id_machine_cluster)
for(var n=document.querySelectorAll(section.groups.text+"> article.inline-box[id]"),i=0;i<n.length;i++)t.indexOf(parseInt(n[i].id))>-1?n[i].remClass("hidden"):n[i].addClass("hidden")}})},!1)
var i
for(i=0;i<section.groups.link.edit.length;i++)section.groups.link.edit[i].addEventListener("click",function(e){pageManager.vars=["edit","m"+e.target.getData("cluster")],navMenu("groups",!0)},!1)
for(i=0;i<section.groups.link.remove.length;i++)section.groups.link.remove[i].addEventListener("click",function(e){pageManager.vars=["remove","m"+e.target.getData("cluster")],navMenu("groups",!0)},!1)
for(i=0;i<section.groups.group.rem.length;i++)section.groups.group.rem[i].addEventListener("click",function(e){var t={path:"machineDefault/unlink",id_cluster:e.target.getData("cluster"),id_machine:e.target.getData("member")}
api.send(t,function(t){return 0==t.ModuleError&&void e.target.parentNode.parentNode.removeChild(e.target.parentNode)})},!1)
for(i=0;i<section.groups.group.add.length;i++)section.groups.group.add[i].addEventListener("click",function(e){pageManager.vars=["members","m"+e.target.getData("cluster")],navMenu("groups",!0)},!1)}

View File

@ -28,8 +28,8 @@ api.send(t,function(e){console.log(e),0==e.ModuleError&&1==e.status?(console.log
api.send(t,function(e){if(0==e.ModuleError){for(var t=[],r=0;r<e.clusters.length;r++)t.push(e.clusters[r].id_user_cluster)
for(var i=document.querySelectorAll(section.groups.text+"> article.inline-box[id]"),r=0;r<i.length;r++)t.indexOf(parseInt(i[r].id))>-1?i[r].remClass("hidden"):i[r].addClass("hidden")}})},!1)
var i
for(i=0;i<section.groups.link.edit.length;i++)section.groups.link.edit[i].addEventListener("click",function(e){pageManager.vars=["edit","u"+e.target.getData("cluster")],console.warn("edit",pageManager.vars),navMenu("groups",!0)},!1)
for(i=0;i<section.groups.link.remove.length;i++)section.groups.link.remove[i].addEventListener("click",function(e){pageManager.vars=["remove","u"+e.target.getData("cluster")],console.warn("remove",pageManager.vars),navMenu("groups",!0)},!1)
for(i=0;i<section.groups.link.edit.length;i++)section.groups.link.edit[i].addEventListener("click",function(e){pageManager.vars=["edit","u"+e.target.getData("cluster")],navMenu("groups",!0)},!1)
for(i=0;i<section.groups.link.remove.length;i++)section.groups.link.remove[i].addEventListener("click",function(e){pageManager.vars=["remove","u"+e.target.getData("cluster")],navMenu("groups",!0)},!1)
for(i=0;i<section.groups.group.rem.length;i++)section.groups.group.rem[i].addEventListener("click",function(e){var t={path:"userDefault/unlink",id_cluster:e.target.getData("cluster"),id_user:e.target.getData("member")}
api.send(t,function(t){return 0==t.ModuleError&&void e.target.parentNode.parentNode.removeChild(e.target.parentNode)})},!1)
for(i=0;i<section.groups.group.add.length;i++)section.groups.group.add[i].addEventListener("click",function(e){pageManager.vars=["members","u"+e.target.getData("cluster")],console.warn("members",pageManager.vars),navMenu("groups",!0)},!1)}
for(i=0;i<section.groups.group.add.length;i++)section.groups.group.add[i].addEventListener("click",function(e){pageManager.vars=["members","u"+e.target.getData("cluster")],navMenu("groups",!0)},!1)}

View File

@ -733,7 +733,6 @@ if( section.groups.element != null ){
section.groups.link.edit[i].addEventListener('click', function(e){
pageManager.vars = [ 'edit', 'u'+e.target.getData('cluster') ];
console.warn('edit', pageManager.vars);
navMenu('groups', true);
}, false);
@ -744,7 +743,6 @@ if( section.groups.element != null ){
section.groups.link.remove[i].addEventListener('click', function(e){
pageManager.vars = [ 'remove', 'u'+e.target.getData('cluster') ];
console.warn('remove', pageManager.vars, e.target);
navMenu('groups', true);
}, false);
@ -783,7 +781,6 @@ if( section.groups.element != null ){
section.groups.group.add[i].addEventListener('click', function(e){
pageManager.vars = [ 'members', 'u'+e.target.getData('cluster') ];
console.warn('members', pageManager.vars);
navMenu('groups', true);
}, false);