mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-30 11:06:55 +00:00
Restore support for modes for subcategories in Special:CategoryTree
This feature was lost inc839756b
. Beforec839756b
on Special:CategoryTree the mode was transfered via the individual global JavaScript variable wgCategoryTreePageCategoryOptions.c839756b
removed the possibility to set the global JavaScript variable to a page individual value. Now Special:CategoryTree uses the HTML attribute to transfer the individual options to JavaScript like at a <categorytree> tag. Bug: T289997 Change-Id: I706c0ca89d84e3583eeee27a411f734c6969a8b7
This commit is contained in:
parent
76f386c901
commit
5e61b40ee0
|
@ -128,7 +128,11 @@ class CategoryTreePage extends SpecialPage {
|
|||
|
||||
$output->addHTML( Xml::closeElement( 'div' ) );
|
||||
|
||||
$output->addHTML( Xml::openElement( 'div', [ 'class' => 'CategoryTreeResult' ] ) );
|
||||
$output->addHTML( Xml::openElement( 'div', [
|
||||
'class' => 'CategoryTreeResult CategoryTreeTag',
|
||||
'data-ct-mode' => $this->tree->getOption( 'mode' ),
|
||||
'data-ct-options' => $this->tree->getOptionsAsJsStructure(),
|
||||
] ) );
|
||||
$output->addHTML( $this->tree->renderNode( $title, 1 ) );
|
||||
$output->addHTML( Xml::closeElement( 'div' ) );
|
||||
} else {
|
||||
|
|
|
@ -161,15 +161,15 @@
|
|||
font-style: italic;
|
||||
}
|
||||
|
||||
.CategoryTreeResult {
|
||||
margin-top: 1.5ex;
|
||||
}
|
||||
|
||||
.CategoryTreeTag {
|
||||
margin-top: 0.5ex;
|
||||
margin-bottom: 0.5ex;
|
||||
}
|
||||
|
||||
.CategoryTreeResult {
|
||||
margin-top: 1.5ex;
|
||||
}
|
||||
|
||||
.CategoryTreeNotice {
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue