Fixing the category tree margin in RTL.

This commit is contained in:
Rotem Liss 2006-09-02 11:11:20 +00:00
parent 1ae3ec0d4d
commit a043a75238
2 changed files with 20 additions and 1 deletions

8
CategoryTree.rtl.css Normal file
View file

@ -0,0 +1,8 @@
/*
* Stylesheet to fix the RTL view of the category tree.
*/
.CategoryTreeChildren {
margin-left: 0px;
margin-right: 1.5ex;
}

View file

@ -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\">" .