Index: trunk/extensions/CategoryTree/CategoryTree.css |
— | — | @@ -16,6 +16,12 @@ |
17 | 17 | margin-left: 1.5ex; |
18 | 18 | } |
19 | 19 | |
| 20 | + |
| 21 | +.CategoryTreeBullet { |
| 22 | + cursor: pointer; |
| 23 | + cursor: hand; /* hack for MSIE 5.0 and 5.5 */ |
| 24 | +} |
| 25 | + |
20 | 26 | .CategoryTreeBullet a, |
21 | 27 | .CategoryTreeBullet a:link, |
22 | 28 | .CategoryTreeBullet a:active, |
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -654,7 +654,7 @@ |
655 | 655 | else $count = $cat->getPageCount(); |
656 | 656 | } |
657 | 657 | |
658 | | - $linkattr= array( 'href' => $wikiLink ); |
| 658 | + $linkattr= array( ); |
659 | 659 | if ( $load ) $linkattr[ 'id' ] = $load; |
660 | 660 | |
661 | 661 | $linkattr[ 'class' ] = "CategoryTreeToggle"; |
— | — | @@ -665,21 +665,22 @@ |
666 | 666 | } |
667 | 667 | else*/ |
668 | 668 | if ( $children == 0 || $loadchildren ) { |
669 | | - $tag = 'a'; |
| 669 | + $tag = 'span'; |
670 | 670 | if ( $count === 0 ) $txt = wfMsgNoTrans( 'categorytree-empty-bullet' ); |
671 | 671 | else $txt = wfMsgNoTrans( 'categorytree-expand-bullet' ); |
672 | | - $linkattr[ 'onclick' ] = "this.href='javascript:void(0)'; categoryTreeExpandNode('".Xml::escapeJsString($key)."',".$this->getOptionsAsJsStructure().",this);"; |
| 672 | + $linkattr[ 'onclick' ] = "if (this.href) this.href='javascript:void(0)'; categoryTreeExpandNode('".Xml::escapeJsString($key)."',".$this->getOptionsAsJsStructure().",this);"; |
673 | 673 | # Don't load this message for ajax requests, so that we don't have to initialise $wgLang |
674 | 674 | $linkattr[ 'title' ] = $this->mIsAjaxRequest ? '##LOAD##' : wfMsgNoTrans('categorytree-expand'); |
675 | 675 | } |
676 | 676 | else { |
677 | | - $tag = 'a'; |
| 677 | + $tag = 'span'; |
678 | 678 | $txt = wfMsgNoTrans( 'categorytree-collapse-bullet' ); |
679 | | - $linkattr[ 'onclick' ] = "this.href='javascript:void(0)'; categoryTreeCollapseNode('".Xml::escapeJsString($key)."',".$this->getOptionsAsJsStructure().",this);"; |
| 679 | + $linkattr[ 'onclick' ] = "if (this.href) this.href='javascript:void(0)'; categoryTreeCollapseNode('".Xml::escapeJsString($key)."',".$this->getOptionsAsJsStructure().",this);"; |
680 | 680 | $linkattr[ 'title' ] = wfMsgNoTrans('categorytree-collapse'); |
681 | 681 | $linkattr[ 'class' ] .= ' CategoryTreeLoaded'; |
682 | 682 | } |
683 | 683 | |
| 684 | + if ( $tag == 'a' ) $linkattr[ 'href' ] = $wikiLink; |
684 | 685 | $s .= Xml::openElement( $tag, $linkattr ) . $txt . Xml::closeElement( $tag ) . ' '; |
685 | 686 | } else { |
686 | 687 | $s .= wfMsgNoTrans( 'categorytree-page-bullet' ); |