diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-12-16 17:37:54 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-12-16 17:37:54 +0100 |
commit | f523fef59b5d0adba27c3efd0cbe1af2ad902739 (patch) | |
tree | 3e87460ad7577b07e4dbe0104ad0e9bc4558264c | |
parent | 0ef438155a581b3c16f9997eb4d446d5abd3e59e (diff) | |
download | rpg-f523fef59b5d0adba27c3efd0cbe1af2ad902739.tar.gz rpg-f523fef59b5d0adba27c3efd0cbe1af2ad902739.tar.bz2 |
ACL Manager: correctly highlight when page and namespace are named the same
darcs-hash:20081216163754-7ad00-a66381e543006ace0a4ff3747034290652b758fc.gz
-rw-r--r-- | lib/plugins/acl/admin.php | 5 | ||||
-rw-r--r-- | lib/plugins/acl/script.js | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 8e0be08ce..77bd285d3 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -423,9 +423,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } // highlight? - if(($item['type']=='d' && - $item['id'] == $this->ns) || - $item['id'] == $ID) $cl = ' cur'; + if( ($item['type']=='d' && $item['id'] == $this->ns) || + ($item['type']!='d' && $item['id'] == $ID)) $cl = ' cur'; // namespace or page? if($item['type']=='d'){ diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js index 01f9d12bc..7ab83db58 100644 --- a/lib/plugins/acl/script.js +++ b/lib/plugins/acl/script.js @@ -131,8 +131,10 @@ acl = { 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/,''); + var obj = getElementsByClass('cur',$('acl__tree'),'a'); + for(var i=0; i<obj.length; i++){ + obj[i].className = obj[i].className.replace(/ cur/,''); + } // add new highlighting e.target.className += ' cur'; |