mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-09-23 18:38:14 +00:00
Fixing the category tree margin in RTL.
This commit is contained in:
parent
1ae3ec0d4d
commit
a043a75238
8
CategoryTree.rtl.css
Normal file
8
CategoryTree.rtl.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* Stylesheet to fix the RTL view of the category tree.
|
||||
*/
|
||||
|
||||
.CategoryTreeChildren {
|
||||
margin-left: 0px;
|
||||
margin-right: 1.5ex;
|
||||
}
|
|
@ -24,7 +24,7 @@ class CategoryTree {
|
|||
* @param OutputPage $outputPage
|
||||
*/
|
||||
static function setHeaders( &$outputPage ) {
|
||||
global $wgJsMimeType, $wgScriptPath;
|
||||
global $wgJsMimeType, $wgScriptPath, $wgContLang;
|
||||
efInjectCategoryTreeMessages();
|
||||
|
||||
# Register css file for CategoryTree
|
||||
|
@ -36,6 +36,17 @@ class CategoryTree {
|
|||
)
|
||||
);
|
||||
|
||||
# Register css RTL file for CategoryTree
|
||||
if( $wgContLang->isRTL() ) {
|
||||
$outputPage->addLink(
|
||||
array(
|
||||
'rel' => 'stylesheet',
|
||||
'type' => 'text/css',
|
||||
'href' => $wgScriptPath . '/extensions/CategoryTree/CategoryTree.rtl.css'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
# Register main js file for CategoryTree
|
||||
$outputPage->addScript(
|
||||
"<script type=\"{$wgJsMimeType}\" src=\"{$wgScriptPath}/extensions/CategoryTree/CategoryTree.js\">" .
|
||||
|
|
Loading…
Reference in a new issue