diff options
Diffstat (limited to 'lib/plugins/acl/script.js')
-rw-r--r-- | lib/plugins/acl/script.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js index f269ed2fe..b719cda58 100644 --- a/lib/plugins/acl/script.js +++ b/lib/plugins/acl/script.js @@ -123,9 +123,14 @@ acl = { return false; }, - + /** + * Handles all clicks in the tree, dispatching the right action based on the + * clicked element + */ treehandler: function(e){ - if(e.target.href){ // is it a link? + if(e.target.src){ // is it an image? + acl.treetoggle(e.target); + } else if(e.target.href){ // is it a link? // remove highlighting var obj = getElementsByClass('cur',$('acl__tree'),'a')[0]; if(obj) obj.className = obj.className.replace(/ cur/,''); @@ -144,8 +149,6 @@ acl = { } acl.loadinfo(); - }else if(e.target.src){ // is it an image? - acl.treetoggle(e.target); } e.stopPropagation(); |