mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-11 16:49:09 +00:00
Use user interface instead of content language for RTL flipping
The CSS get automatically flipped on RTL user interface language. Change-Id: I472c0fbbdaf20bd5cb3ad55d1194c99fc72ffdba
This commit is contained in:
parent
e029f1b13a
commit
192435154e
|
@ -23,7 +23,7 @@
|
|||
|
||||
table {
|
||||
float: left;
|
||||
margin-right: 3em;
|
||||
margin: 0 1em 0 0;
|
||||
border-collapse: collapse;
|
||||
|
||||
td {
|
||||
|
|
|
@ -759,12 +759,9 @@ class SpecialReplaceText extends SpecialPage {
|
|||
$numRows = count( $rows );
|
||||
// Lay out namespaces in multiple floating two-column tables so they'll
|
||||
// be arranged nicely while still accommodating different screen widths
|
||||
// Float to the right on RTL wikis
|
||||
$tableStyle = $this->contentLanguage->isRTL() ?
|
||||
'float: right; margin: 0 0 0em 1em' : 'float: left; margin: 0 1em 0em 0';
|
||||
// Build the final HTML table...
|
||||
for ( $i = 0; $i < $numRows; $i += $rowsPerTable ) {
|
||||
$tables .= Xml::openElement( 'table', [ 'style' => $tableStyle ] );
|
||||
$tables .= Xml::openElement( 'table' );
|
||||
for ( $j = $i; $j < $i + $rowsPerTable && $j < $numRows; $j++ ) {
|
||||
$tables .= "<tr>\n" . $rows[$j] . "</tr>";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue