return '';
}
+ /** @return string HTML */
function formatRow( $row ) {
// Do all the normal stuff
$s = parent::formatRow( $row );
return $s;
}
- function getRowAttrs( $row, $isSecond = false ) {
- $arr = [];
-
- if ( $row->am_customised ) {
- $arr['class'] = 'allmessages-customised';
- }
-
- return $arr;
+ function getRowAttrs( $row ) {
+ return [];
}
+ /** @return array HTML attributes */
function getCellAttrs( $field, $value ) {
- if ( $this->mCurrentRow->am_customised && $field === 'am_title' ) {
- return [ 'rowspan' => '2', 'class' => $field ];
- } elseif ( $field === 'am_title' ) {
- return [ 'class' => $field ];
+ $attr = [];
+ if ( $field === 'am_title' ) {
+ if ( $this->mCurrentRow->am_customised ) {
+ $attr += [ 'rowspan' => '2' ];
+ }
} else {
- return [
+ $attr += [
'lang' => $this->lang->getHtmlCode(),
'dir' => $this->lang->getDir(),
- 'class' => $field
];
+ if ( $this->mCurrentRow->am_customised ) {
+ // CSS class: am_default, am_actual
+ $attr += [ 'class' => $field ];
+ }
}
+ return $attr;
}
// This is not actually used, as getStartBody is overridden above
/* Special:AllMessages */
-#mw-allmessagestable .allmessages-customised .am_default {
+#mw-allmessagestable .am_default {
background-color: #fcffc4;
}
-#mw-allmessagestable .allmessages-customised:hover .am_default {
+#mw-allmessagestable tr:hover .am_default {
background-color: #faff90;
}
background-color: #e2ffe2;
}
-#mw-allmessagestable .allmessages-customised:hover + .allmessages-customised .am_actual {
+#mw-allmessagestable tr:hover + tr .am_actual {
background-color: #b1ffb1;
}