jenkins-bot has submitted this change and it was merged.
Change subject: Reduce usage of inline <span style="white-space: nowrap">
......................................................................
Reduce usage of inline <span style="white-space: nowrap">
Inspired by T119055.
Change-Id: I6829a67fb77c00e87772983f35b884bf03fad7e3
---
M includes/logging/LogEventsList.php
M includes/specials/SpecialContributions.php
M includes/specials/SpecialProtectedpages.php
3 files changed, 32 insertions(+), 33 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/logging/LogEventsList.php
b/includes/logging/LogEventsList.php
index 4c0bd8e..df37610 100644
--- a/includes/logging/LogEventsList.php
+++ b/includes/logging/LogEventsList.php
@@ -233,7 +233,7 @@
array( 'class' => 'mw-autocomplete-user' )
);
- return '<span style="white-space: nowrap">' . $label .
'</span>';
+ return '<span class="mw-input-with-label">' . $label .
'</span>';
}
/**
@@ -249,7 +249,7 @@
$title
);
- return '<span style="white-space: nowrap">' . $label .
'</span>';
+ return '<span class="mw-input-with-label">' . $label .
'</span>';
}
/**
@@ -257,7 +257,7 @@
* @return string Checkbox
*/
private function getTitlePattern( $pattern ) {
- return '<span style="white-space: nowrap">' .
+ return '<span class="mw-input-with-label">' .
Xml::checkLabel( $this->msg( 'log-title-wildcard'
)->text(), 'pattern', 'pattern', $pattern ) .
'</span>';
}
diff --git a/includes/specials/SpecialContributions.php
b/includes/specials/SpecialContributions.php
index f0a5aa6..81668e1 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -543,7 +543,7 @@
) . ' ' .
Html::rawElement(
'span',
- array( 'style' => 'white-space: nowrap'
),
+ array( 'class' => 'mw-input-with-label'
),
Xml::checkLabel(
$this->msg( 'invert' )->text(),
'nsInvert',
@@ -555,7 +555,7 @@
)
) . ' '
) .
- 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 +572,7 @@
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 +587,7 @@
$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 +598,7 @@
);
$checkLabelNewOnly = Html::rawElement(
'span',
- array( 'style' => 'white-space: nowrap' ),
+ array( 'class' => 'mw-input-with-label' ),
Xml::checkLabel(
$this->msg( 'sp-contributions-newonly'
)->text(),
'newOnly',
diff --git a/includes/specials/SpecialProtectedpages.php
b/includes/specials/SpecialProtectedpages.php
index 00e56c1..6859310 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -100,17 +100,16 @@
Xml::openElement( 'fieldset' ) .
Xml::element( 'legend', array(), $this->msg(
'protectedpages' )->text() ) .
Html::hidden( 'title', $title->getPrefixedDBkey() ) .
"\n" .
- $this->getNamespaceMenu( $namespace ) . " \n" .
- $this->getTypeMenu( $type ) . " \n" .
- $this->getLevelMenu( $level ) . " \n" .
- "<br /><span style='white-space: nowrap'>" .
- $this->getExpiryCheck( $indefOnly ) . " \n" .
- $this->getCascadeCheck( $cascadeOnly ) . " \n" .
- $this->getRedirectCheck( $noRedirect ) . " \n" .
- "</span><br /><span style='white-space: nowrap'>" .
- $this->getSizeLimit( $sizetype, $size ) . " \n" .
- "</span>" .
- " " . Xml::submitButton( $this->msg(
'allpagessubmit' )->text() ) . "\n" .
+ $this->getNamespaceMenu( $namespace ) . "\n" .
+ $this->getTypeMenu( $type ) . "\n" .
+ $this->getLevelMenu( $level ) . "\n" .
+ "<br />\n" .
+ $this->getExpiryCheck( $indefOnly ) . "\n" .
+ $this->getCascadeCheck( $cascadeOnly ) . "\n" .
+ $this->getRedirectCheck( $noRedirect ) . "\n" .
+ "<br />\n" .
+ $this->getSizeLimit( $sizetype, $size ) . "\n" .
+ Xml::submitButton( $this->msg( 'allpagessubmit'
)->text() ) . "\n" .
Xml::closeElement( 'fieldset' ) .
Xml::closeElement( 'form' );
}
@@ -123,7 +122,7 @@
* @return string
*/
protected function getNamespaceMenu( $namespace = null ) {
- return Html::rawElement( 'span', array( 'style' =>
'white-space: nowrap;' ),
+ return Html::rawElement( 'span', array( 'class' =>
'mw-input-with-label' ),
Html::namespaceSelector(
array(
'selected' => $namespace,
@@ -143,12 +142,12 @@
* @return string Formatted HTML
*/
protected function getExpiryCheck( $indefOnly ) {
- return Xml::checkLabel(
+ return '<span class="mw-input-with-label">' . Xml::checkLabel(
$this->msg( 'protectedpages-indef' )->text(),
'indefonly',
'indefonly',
$indefOnly
- ) . "\n";
+ ) . "</span>\n";
}
/**
@@ -156,12 +155,12 @@
* @return string Formatted HTML
*/
protected function getCascadeCheck( $cascadeOnly ) {
- return Xml::checkLabel(
+ return '<span class="mw-input-with-label">' . Xml::checkLabel(
$this->msg( 'protectedpages-cascade' )->text(),
'cascadeonly',
'cascadeonly',
$cascadeOnly
- ) . "\n";
+ ) . "</span>\n";
}
/**
@@ -169,12 +168,12 @@
* @return string Formatted HTML
*/
protected function getRedirectCheck( $noRedirect ) {
- return Xml::checkLabel(
+ return '<span class="mw-input-with-label">' . Xml::checkLabel(
$this->msg( 'protectedpages-noredirect' )->text(),
'noredirect',
'noredirect',
$noRedirect
- ) . "\n";
+ ) . "</span>\n";
}
/**
@@ -185,14 +184,14 @@
protected function getSizeLimit( $sizetype, $size ) {
$max = $sizetype === 'max';
- return Xml::radioLabel(
+ return '<span class="mw-input-with-label">' . Xml::radioLabel(
$this->msg( 'minimum-size' )->text(),
'sizetype',
'min',
'wpmin',
!$max
) .
- ' ' .
+ ' ' .
Xml::radioLabel(
$this->msg( 'maximum-size' )->text(),
'sizetype',
@@ -200,10 +199,10 @@
'wpmax',
$max
) .
- ' ' .
+ ' ' .
Xml::input( 'size', 9, $size, array( 'id' => 'wpsize' )
) .
- ' ' .
- Xml::label( $this->msg( 'pagesize' )->text(), 'wpsize'
);
+ ' ' .
+ Xml::label( $this->msg( 'pagesize' )->text(), 'wpsize'
) . "</span>\n";
}
/**
@@ -228,7 +227,7 @@
$options[] = Xml::option( $text, $type, $selected ) .
"\n";
}
- return "<span style='white-space: nowrap'>" .
+ return '<span class="mw-input-with-label">' .
Xml::label( $this->msg( 'restriction-type' )->text(),
$this->IdType ) . ' ' .
Xml::tags( 'select',
array( 'id' => $this->IdType, 'name' =>
$this->IdType ),
@@ -260,7 +259,7 @@
$options[] = Xml::option( $text, $type, $selected );
}
- return "<span style='white-space: nowrap'>" .
+ return '<span class="mw-input-with-label">' .
Xml::label( $this->msg( 'restriction-level' )->text(),
$this->IdLevel ) . ' ' .
Xml::tags( 'select',
array( 'id' => $this->IdLevel, 'name' =>
$this->IdLevel ),
--
To view, visit https://gerrit.wikimedia.org/r/254268
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6829a67fb77c00e87772983f35b884bf03fad7e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits