From 23fafdd59843fcd5167a0a6c0031c5a68de9f046 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 9 Jan 2017 12:40:34 +0100 Subject: [PATCH] Utilisateur 1 seule instance pour revenir du choix des membres aux choix du groupe + lien vers les membres depuis --- build/viewer/view/group/group_membersChoice.twig | 2 +- public_html/view/js/groups.js | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build/viewer/view/group/group_membersChoice.twig b/build/viewer/view/group/group_membersChoice.twig index 859bdf3..e6206f1 100644 --- a/build/viewer/view/group/group_membersChoice.twig +++ b/build/viewer/view/group/group_membersChoice.twig @@ -1,4 +1,4 @@ -Modifier un autre groupe +Modifier un autre groupe

diff --git a/public_html/view/js/groups.js b/public_html/view/js/groups.js index 971d583..12f7885 100755 --- a/public_html/view/js/groups.js +++ b/public_html/view/js/groups.js @@ -158,9 +158,20 @@ if( section.view.element != null ){ /* (7) On gere la "modification" des membres d'un groupe */ for( i = 0 ; i < section.view.group.add.length ; i++ ){ + // Si bouton pour choisir un autre groupe, on l'indexe + section.view.group.change = $('members-change-group') || null; + + // on crée le lien + if( section.view.group.change !== null ) + section.view.group.change.addEventListener('click', function(e){ + pageManager.vars = [ 'members' ]; + pageManager.refresh(); + }, false); + + section.view.group.add[i].addEventListener('mouseup', function(e){ - pageManager.vars[1] = e.target.getData('cluster'); + pageManager.vars = [ 'members', e.target.getData('cluster') ]; pageManager.refresh(); }, false); @@ -753,8 +764,7 @@ if( section.members.element != null && section.members.chooser.element != null ) return; /* (2) Redirection */ - pageManager.vars[1] = data; - console.log(pageManager.vars); + pageManager.vars = [ 'members', data ]; pageManager.refresh(); }, false);