Special:Contribs: autofocus to 'target' if target hasn't been specified or in non...
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index f0a5aa6..5f7c587 100644 (file)
@@ -517,8 +517,13 @@ class SpecialContributions extends IncludableSpecialPage {
                                        'mw-ui-input-inline',
                                        'mw-autocomplete-user', // used by mediawiki.userSuggest
                                ),
-                       ) + ( $this->opts['target'] ? array() : array( 'autofocus' ) )
+                       ) + (
+                               // Only autofocus if target hasn't been specified or in non-newbies mode
+                               ( $this->opts['contribs'] === 'newbie' || $this->opts['target'] )
+                                       ? array() : array( 'autofocus' => true )
+                               )
                );
+
                $targetSelection = Html::rawElement(
                        'td',
                        array( 'colspan' => 2 ),
@@ -543,7 +548,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        ) . ' ' .
                                Html::rawElement(
                                        'span',
-                                       array( 'style' => 'white-space: nowrap' ),
+                                       array( 'class' => 'mw-input-with-label' ),
                                        Xml::checkLabel(
                                                $this->msg( 'invert' )->text(),
                                                'nsInvert',
@@ -555,7 +560,7 @@ class SpecialContributions extends IncludableSpecialPage {
                                                )
                                        ) . ' '
                                ) .
-                               Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
+                               Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ),
                                        Xml::checkLabel(
                                                $this->msg( 'namespace_association' )->text(),
                                                'associated',
@@ -572,7 +577,7 @@ class SpecialContributions extends IncludableSpecialPage {
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
                        $deletedOnlyCheck = Html::rawElement(
                                'span',
-                               array( 'style' => 'white-space: nowrap' ),
+                               array( 'class' => 'mw-input-with-label' ),
                                Xml::checkLabel(
                                        $this->msg( 'history-show-deleted' )->text(),
                                        'deletedOnly',
@@ -587,7 +592,7 @@ class SpecialContributions extends IncludableSpecialPage {
 
                $checkLabelTopOnly = Html::rawElement(
                        'span',
-                       array( 'style' => 'white-space: nowrap' ),
+                       array( 'class' => 'mw-input-with-label' ),
                        Xml::checkLabel(
                                $this->msg( 'sp-contributions-toponly' )->text(),
                                'topOnly',
@@ -598,7 +603,7 @@ class SpecialContributions extends IncludableSpecialPage {
                );
                $checkLabelNewOnly = Html::rawElement(
                        'span',
-                       array( 'style' => 'white-space: nowrap' ),
+                       array( 'class' => 'mw-input-with-label' ),
                        Xml::checkLabel(
                                $this->msg( 'sp-contributions-newonly' )->text(),
                                'newOnly',