Skip to content
Snippets Groups Projects
Commit f523fef5 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

ACL Manager: correctly highlight when page and namespace are named the same

darcs-hash:20081216163754-7ad00-a66381e543006ace0a4ff3747034290652b758fc.gz
parent 0ef43815
No related branches found
No related tags found
No related merge requests found
......@@ -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'){
......
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment