if ( $userId ) {
// check if the user has an edit
$attribs = [];
+ $attribs['class'] = 'mw-usertoollinks-contribs';
if ( $redContribsWhenNoEdits ) {
if ( intval( $edits ) === 0 && $edits !== 0 ) {
$user = User::newFromId( $userId );
$edits = $user->getEditCount();
}
if ( $edits === 0 ) {
- $attribs['class'] = 'new';
+ $attribs['class'] .= ' new';
}
}
$contribsPage = SpecialPage::getTitleFor( 'Contributions', $userText );
*/
public static function userTalkLink( $userId, $userText ) {
$userTalkPage = Title::makeTitle( NS_USER_TALK, $userText );
- $userTalkLink = self::link( $userTalkPage, wfMessage( 'talkpagelinktext' )->escaped() );
+ $moreLinkAttribs['class'] = 'mw-usertoollinks-talk';
+ $userTalkLink = self::link( $userTalkPage,
+ wfMessage( 'talkpagelinktext' )->escaped(),
+ $moreLinkAttribs );
return $userTalkLink;
}
*/
public static function blockLink( $userId, $userText ) {
$blockPage = SpecialPage::getTitleFor( 'Block', $userText );
- $blockLink = self::link( $blockPage, wfMessage( 'blocklink' )->escaped() );
+ $moreLinkAttribs['class'] = 'mw-usertoollinks-block';
+ $blockLink = self::link( $blockPage,
+ wfMessage( 'blocklink' )->escaped(),
+ $moreLinkAttribs );
return $blockLink;
}
*/
public static function emailLink( $userId, $userText ) {
$emailPage = SpecialPage::getTitleFor( 'Emailuser', $userText );
- $emailLink = self::link( $emailPage, wfMessage( 'emaillink' )->escaped() );
+ $moreLinkAttribs['class'] = 'mw-usertoollinks-mail';
+ $emailLink = self::link( $emailPage,
+ wfMessage( 'emaillink' )->escaped(),
+ $moreLinkAttribs );
return $emailLink;
}
$diffLink = $this->linkRenderer->makeKnownLink(
$rc->getTitle(),
new HtmlArmor( $this->message['diff'] ),
- [],
+ [ 'class' => 'mw-changeslist-diff' ],
$query
);
}
$diffhist .= $this->linkRenderer->makeKnownLink(
$rc->getTitle(),
new HtmlArmor( $this->message['hist'] ),
- [],
+ [ 'class' => 'mw-changeslist-history' ],
[
'curid' => $rc->mAttribs['rc_cur_id'],
'action' => 'history'
*/
mw.rcfilters.ui.CapsuleItemWidget = function MwRcfiltersUiCapsuleItemWidget( controller, model, config ) {
var $popupContent = $( '<div>' )
- .addClass( 'mw-rcfilters-ui-capsuleItemWidget-popup' ),
+ .addClass( 'mw-rcfilters-ui-capsuleItemWidget-popup-content' ),
descLabelWidget = new OO.ui.LabelWidget();
// Configuration initialization
// Mixin constructors
OO.ui.mixin.PopupElement.call( this, $.extend( {
popup: {
- padded: true,
+ padded: false,
align: 'center',
$content: $popupContent
.append( descLabelWidget.$element ),
- $floatableContainer: this.$element
+ $floatableContainer: this.$element,
+ classes: [ 'mw-rcfilters-ui-capsuleItemWidget-popup' ]
}
}, config ) );