X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=blobdiff_plain;f=includes%2Fpager%2FTablePager.php;h=d94104bda9c13c626f6018e3c0ae629505ddef08;hb=632a82ec8e03ea701f257b96bc092d520385c47e;hp=8934fc2b79445c61a12ba566f5f8bc3b73835421;hpb=406fd66f025fed29d9ac496808f7b256260bd119;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/pager/TablePager.php b/includes/pager/TablePager.php index 8934fc2b79..d94104bda9 100644 --- a/includes/pager/TablePager.php +++ b/includes/pager/TablePager.php @@ -26,8 +26,10 @@ * @ingroup Pager */ abstract class TablePager extends IndexPager { + /** @var string */ protected $mSort; + /** @var stdClass */ protected $mCurrentRow; public function __construct( IContextSource $context = null ) { @@ -130,12 +132,12 @@ abstract class TablePager extends IndexPager { // We don't actually know in which direction other fields will be sorted by default… if ( $this->mDefaultDirection == IndexPager::DIR_DESCENDING ) { $linkType = 'asc'; - $class = "$sortClass TablePager_sort-descending"; + $class = "$sortClass mw-datatable-is-sorted mw-datatable-is-descending"; $query['asc'] = '1'; $query['desc'] = ''; } else { $linkType = 'desc'; - $class = "$sortClass TablePager_sort-ascending"; + $class = "$sortClass mw-datatable-is-sorted mw-datatable-is-ascending"; $query['asc'] = ''; $query['desc'] = '1'; } @@ -150,7 +152,7 @@ abstract class TablePager extends IndexPager { $tableClass = $this->getTableClass(); $ret = Html::openElement( 'table', [ - 'class' => "mw-datatable $tableClass" ] + 'class' => " $tableClass" ] ); $ret .= Html::rawElement( 'thead', [], Html::rawElement( 'tr', [], "\n" . $s . "\n" ) ); $ret .= Html::openElement( 'tbody' ) . "\n"; @@ -264,10 +266,11 @@ abstract class TablePager extends IndexPager { } /** + * TablePager relies on `mw-datatable` for styling, see T214208 * @return string */ protected function getTableClass() { - return 'TablePager'; + return 'mw-datatable'; } /**