MtDu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/266064
Change subject: Replace obsolete HTML with CSS
......................................................................
Replace obsolete HTML with CSS
Bug: T108259
Change-Id: I8cd7bc04e539cf96fceeb2d6ee5513651c4e5cd9
---
M CentralNoticeBannerLogPager.php
M CentralNoticeCampaignLogPager.php
M CentralNoticePageLogPager.php
M CentralNoticePager.php
M TemplatePager.php
M special/SpecialBannerAllocation.php
M special/SpecialCentralNotice.php
M special/SpecialCentralNoticeBanners.php
M special/SpecialGlobalAllocation.php
9 files changed, 88 insertions(+), 92 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice
refs/changes/64/266064/1
diff --git a/CentralNoticeBannerLogPager.php b/CentralNoticeBannerLogPager.php
index a95bb35..1300a89 100644
--- a/CentralNoticeBannerLogPager.php
+++ b/CentralNoticeBannerLogPager.php
@@ -53,7 +53,7 @@
// Begin log entry primary row
$htmlOut = Xml::openElement( 'tr' );
- $htmlOut .= Xml::openElement( 'td', array( 'valign' => 'top' )
);
+ $htmlOut .= Xml::openElement( 'td', 'style' => 'vertical-align:
top;' );
if ( $row->tmplog_action !== 'removed' ) {
$collapsedImg = $this->getLanguage()->isRtl() ?
'collapsed-rtl.png' :
@@ -65,19 +65,19 @@
'</a>';
}
$htmlOut .= Xml::closeElement( 'td' );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$lang->date( $row->tmplog_timestamp ) . ' ' .
$lang->time( $row->tmplog_timestamp )
);
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$this->msg( 'centralnotice-user-links', $userLink,
$userTalkLink )->text()
);
// Give grep a chance to find the usages:
// centralnotice-action-created, centralnotice-action-modified,
// centralnotice-action-removed
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$this->msg( 'centralnotice-action-'.$row->tmplog_action
)->text()
);
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$bannerLink
);
@@ -86,7 +86,7 @@
htmlspecialchars( $row->tmplog_comment ) : ' ';
$htmlOut .= Xml::tags( 'td',
- array( 'valign' => 'top', 'class' => 'primary-summary'
),
+ array( 'class' => 'primary-summary', 'style' =>
'vertical-align: top;' ),
$summary
);
@@ -99,12 +99,12 @@
if ( $row->tmplog_action !== 'removed' ) {
// Begin log entry secondary row
- $htmlOut .= Xml::openElement( 'tr', array( 'id' =>
'cn-log-details-'.$row->tmplog_id, 'style' => 'display:none;' ) );
+ $htmlOut .= Xml::openElement( 'tr', array( 'id' =>
'cn-log-details-'.$row->tmplog_id, 'style' => 'display: none;' ) );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;' ),
' ' // force a table cell in older browsers
);
- $htmlOut .= Xml::openElement( 'td', array( 'valign' =>
'top', 'colspan' => '5' ) );
+ $htmlOut .= Xml::openElement( 'td', 'style' =>
'vertical-align: top; colspan: 5;' );
if ( $row->tmplog_action == 'created' ) {
$htmlOut .= $this->showInitialSettings( $row );
} elseif ( $row->tmplog_action == 'modified' ) {
@@ -121,22 +121,22 @@
function getStartBody() {
$htmlOut = '';
- $htmlOut .= Xml::openElement( 'table', array( 'id' =>
'cn-campaign-logs', 'cellpadding' => 3 ) );
+ $htmlOut .= Xml::openElement( 'table', array( 'id' =>
'cn-campaign-logs', 'style' => 'padding: 3px;' ) );
$htmlOut .= Xml::openElement( 'tr' );
$htmlOut .= Xml::element( 'th', array( 'style' => 'width:
20px;' ) );
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 130px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 130px;',
$this->msg( 'centralnotice-timestamp' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 160px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 160px;',
$this->msg( 'centralnotice-user' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 100px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 100px;',
$this->msg( 'centralnotice-action' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 160px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 160px;',
$this->msg( 'centralnotice-banner' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 250px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 250px;',
$this->msg( 'centralnotice-change-summary-heading'
)->text()
);
$htmlOut .= Xml::tags( 'td', array(),
diff --git a/CentralNoticeCampaignLogPager.php
b/CentralNoticeCampaignLogPager.php
index d62430e..c13bc7f 100644
--- a/CentralNoticeCampaignLogPager.php
+++ b/CentralNoticeCampaignLogPager.php
@@ -105,7 +105,7 @@
// Begin log entry primary row
$htmlOut = Xml::openElement( 'tr' );
- $htmlOut .= Xml::openElement( 'td', array( 'valign' => 'top' )
);
+ $htmlOut .= Xml::openElement( 'td', 'style' => 'vertical-align:
top;' );
if ( $row->notlog_action !== 'removed' ) {
$collapsedImg = $this->getLanguage()->isRtl() ?
'collapsed-rtl.png' :
@@ -117,19 +117,19 @@
'</a>';
}
$htmlOut .= Xml::closeElement( 'td' );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$lang->date( $row->notlog_timestamp ) . $this->msg(
'word-separator' )->plain() . $lang->time( $row->notlog_timestamp )
);
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$this->msg( 'centralnotice-user-links', $userLink,
$userTalkLink )->text()
);
// Give grep a chance to find the usages:
// centralnotice-action-created, centralnotice-action-modified,
// centralnotice-action-removed
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$this->msg( 'centralnotice-action-'.$row->notlog_action
)->text()
);
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$campaignLink
);
@@ -138,7 +138,7 @@
$row->notlog_comment : ' ';
$htmlOut .= Xml::tags( 'td',
- array( 'valign' => 'top', 'class' => 'primary-summary'
),
+ array( 'class' => 'primary-summary', 'style' =>
'vertical-align: top;' ),
$summary
);
@@ -153,10 +153,10 @@
// Begin log entry secondary row
$htmlOut .= Xml::openElement( 'tr', array( 'id' =>
'cn-log-details-'.$row->notlog_id, 'style' => 'display:none;' ) );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
' ' // force a table cell in older browsers
);
- $htmlOut .= Xml::openElement( 'td', array( 'valign' =>
'top', 'colspan' => '6' ) );
+ $htmlOut .= Xml::openElement( 'td', 'style' =>
'colspan: 6; vertical-align: top;' );
if ( $row->notlog_action == 'created' ) {
$htmlOut .= $this->showInitialSettings( $row );
} elseif ( $row->notlog_action == 'modified' ) {
@@ -486,22 +486,22 @@
*/
function getStartBody() {
$htmlOut = '';
- $htmlOut .= Xml::openElement( 'table', array( 'id' =>
'cn-campaign-logs', 'cellpadding' => 3 ) );
+ $htmlOut .= Xml::openElement( 'table', array( 'id' =>
'cn-campaign-logs', 'style' => 'padding: 3px;' ) );
$htmlOut .= Xml::openElement( 'tr' );
$htmlOut .= Xml::element( 'th', array( 'style' => 'width:
20px;' ) );
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 130px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 130px;',
$this->msg( 'centralnotice-timestamp' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 160px;' ),
+ $htmlOut .= Xml::element( 'th','style' => 'text-align: left;
width: 160px;',
$this->msg( 'centralnotice-user' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 100px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 100px;',
$this->msg( 'centralnotice-action' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 160px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 160px;',
$this->msg( 'centralnotice-notice' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 250px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 250px;',
$this->msg( 'centralnotice-change-summary-heading'
)->text()
);
$htmlOut .= Xml::tags( 'td', array(),
diff --git a/CentralNoticePageLogPager.php b/CentralNoticePageLogPager.php
index 2d46dd7..e9f9a85 100644
--- a/CentralNoticePageLogPager.php
+++ b/CentralNoticePageLogPager.php
@@ -141,27 +141,27 @@
$lang = $this->getLanguage();
$htmlOut = Xml::openElement( 'tr' );
- $htmlOut .= Xml::openElement( 'td', array( 'valign' => 'top' )
);
+ $htmlOut .= Xml::openElement( 'td', 'style' => 'vertical-align:
top;' );
$htmlOut .= Xml::closeElement( 'td' );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$lang->date( $row->rc_timestamp ) . ' ' . $lang->time(
$row->rc_timestamp )
);
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$this->msg( 'centralnotice-user-links', $userLink,
$userTalkLink )->text()
);
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top', 'class'
=> 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' => 'primary',
'style' => 'vertical-align: top;' ),
$bannerCell
);
if ( $this->logType == 'bannermessages' ) {
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top',
'class' => 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' =>
'primary', 'style' => 'vertical-align: top;' ),
$messageCell
);
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top',
'class' => 'primary' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' =>
'primary', 'style' => 'vertical-align: top;' ),
$language
);
}
$htmlOut .= Xml::tags( 'td',
- array( 'valign' => 'top', 'class' => 'primary-summary'
),
+ array( 'class' => 'primary-summary', 'style' =>
'vertical-align: top;' ),
htmlspecialchars( $row->rc_comment )
);
$htmlOut .= Xml::tags( 'td', array(),
@@ -179,23 +179,23 @@
*/
function getStartBody() {
$htmlOut = '';
- $htmlOut .= Xml::openElement( 'table', array( 'id' =>
'cn-campaign-logs', 'cellpadding' => 3 ) );
+ $htmlOut .= Xml::openElement( 'table', array( 'id' =>
'cn-campaign-logs', 'style' => 'padding: 3px' ) );
$htmlOut .= Xml::openElement( 'tr' );
- $htmlOut .= Xml::element( 'th', array( 'style' => 'width:
20px;' ) );
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 130px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'width: 20px;';
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 130px;' ),
$this->msg ( 'centralnotice-timestamp' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 160px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 160px;' ),
$this->msg( 'centralnotice-user' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'style' => 'width: 160px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;
width: 160px;' ),
$this->msg( 'centralnotice-banner' )->text()
);
if ( $this->logType == 'bannermessages' ) {
- $htmlOut .= Xml::element( 'th', array( 'align' =>
'left', 'style' => 'width: 160px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align:
left; width: 160px;' ),
$this->msg( 'centralnotice-message' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' =>
'left', 'style' => 'width: 100px;' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align:
left; width: 100px;' ),
$this->msg( 'centralnotice-language' )->text()
);
@@ -206,7 +206,7 @@
}
$htmlOut .= Xml::element( 'th',
- array( 'align' => 'left', 'style' => "width:
{$commentWidth};" ),
+ 'style' => 'text-align: left; width: {$commentWidth};',
$this->msg( 'centralnotice-change-summary-heading'
)->text()
);
diff --git a/CentralNoticePager.php b/CentralNoticePager.php
index ec11acf..55cc048 100644
--- a/CentralNoticePager.php
+++ b/CentralNoticePager.php
@@ -81,17 +81,17 @@
if ( $this->editable ) {
// Add box
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
Xml::check( 'addTemplates[]', '', array(
'value' => $row->tmp_name ) )
);
// Bucket
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
$this->bucketDropDown( $row->tmp_name )
);
// Weight select
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top',
'class' => 'cn-weight' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' =>
'cn-weight', 'style' => 'vertical-align: top;' ),
Xml::listDropDown( "weight[$row->tmp_id]",
CentralNotice::dropDownList(
$this->msg(
'centralnotice-weight' )->text(), range( 0, 100, 5 )
@@ -107,7 +107,7 @@
$banner = Banner::fromName( $row->tmp_name );
$bannerRenderer = new BannerRenderer( $this->getContext(),
$banner );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' => 'vertical-align: top;',
$bannerRenderer->linkTo() . "<br>" .
$bannerRenderer->previewFieldSet()
);
@@ -124,20 +124,20 @@
*/
function getStartBody() {
$htmlOut = '';
- $htmlOut .= Xml::openElement( 'table', array( 'cellpadding' =>
9 ) );
+ $htmlOut .= Xml::openElement( 'table', 'style' => 'padding:
9px;' );
$htmlOut .= Xml::openElement( 'tr' );
if ( $this->editable ) {
- $htmlOut .= Xml::element( 'th', array( 'align' =>
'left', 'width' => '5%' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align:
left; width; 5%' ),
$this->msg( "centralnotice-add" )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' =>
'left', 'width' => '5%' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align:
left; width; 5%' ),
$this->msg( 'centralnotice-bucket' )->text()
);
- $htmlOut .= Xml::element( 'th', array( 'align' =>
'left', 'width' => '5%', 'class' => 'cn-weight' ),
+ $htmlOut .= Xml::element( 'th', array( 'class' =>
'cn-weight', 'style' => 'text-align: left; width; 5%' ),
$this->msg( 'centralnotice-weight' )->text()
);
}
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;',
$this->msg( 'centralnotice-templates' )->text()
);
$htmlOut .= Xml::closeElement( 'tr' );
diff --git a/TemplatePager.php b/TemplatePager.php
index c612f3b..c616f12 100644
--- a/TemplatePager.php
+++ b/TemplatePager.php
@@ -82,7 +82,7 @@
if ( $this->editable ) {
// Remove box
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
Xml::check( 'removeTemplates[]', false,
array(
'value' => $row->tmp_name,
@@ -96,7 +96,7 @@
$banner = Banner::fromName( $row->tmp_name );
$bannerRenderer = new BannerRenderer( $this->getContext(),
$banner );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' => 'vertical-align: top;',
$bannerRenderer->linkTo() . "<br>" .
$bannerRenderer->previewFieldSet()
);
@@ -113,14 +113,14 @@
*/
function getStartBody() {
$htmlOut = '';
- $htmlOut .= Xml::openElement( 'table', array( 'cellpadding' =>
9 ) );
+ $htmlOut .= Xml::openElement( 'table', 'style' => 'padding:
9px;' );
$htmlOut .= Xml::openElement( 'tr' );
if ( $this->editable ) {
- $htmlOut .= Xml::element( 'th', array( 'align' =>
'left', 'width' => '5%' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align:
left; width: 5%;' ),
$this->msg( 'centralnotice-remove' )->text()
);
}
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align: left;',
$this->msg( 'centralnotice-templates' )->text()
);
$htmlOut .= Xml::closeElement( 'tr' );
diff --git a/special/SpecialBannerAllocation.php
b/special/SpecialBannerAllocation.php
index 2c59677..78f5249 100644
--- a/special/SpecialBannerAllocation.php
+++ b/special/SpecialBannerAllocation.php
@@ -105,7 +105,7 @@
$htmlOut .= Html::element( 'h2', array(), $this->msg(
'centralnotice-view-allocation' )->text() );
$htmlOut .= Xml::tags( 'p', null, $this->msg(
'centralnotice-allocation-instructions' )->text() );
- $htmlOut .= Html::openElement( 'table', array ( 'id' =>
'envpicker', 'cellpadding' => 7 ) );
+ $htmlOut .= Html::openElement( 'table', array ( 'id' =>
'envpicker', 'style' => 'padding: 7px') );
$htmlOut .= Html::openElement( 'tr' );
$htmlOut .= Xml::tags( 'td',
array( 'style' => 'width: 20%;' ),
@@ -122,7 +122,7 @@
$htmlOut .= Html::closeElement( 'tr' );
$htmlOut .= Html::openElement( 'tr' );
$htmlOut .= Xml::tags( 'td',
- array( 'valign' => 'top' ),
+ 'style' => 'vertical-align: top',
$this->msg( 'centralnotice-project-lang' )->text() );
$htmlOut .= Html::openElement( 'td' );
@@ -275,7 +275,7 @@
*/
public function getTable( $type, $banners ) {
$htmlOut = Html::openElement( 'table',
- array ( 'cellpadding' => 9, 'class' => 'wikitable
sortable', 'style' => 'margin: 1em 0;' )
+ array ( 'class' => 'wikitable sortable', 'style' =>
'margin: 1em 0; padding: 9px;' )
);
$htmlOut .= Html::element( 'h4', array(), $type );
@@ -307,13 +307,13 @@
$htmlOut .= Html::openElement( 'tr', array(
'class' => 'mw-sp-centralnotice-allocationrow' ) );
// Percentage
- $htmlOut .= Html::openElement( 'td', array(
'align' => 'right' ) );
+ $htmlOut .= Html::openElement( 'td', 'style' =>
'text-align: right;' );
$htmlOut .= $this->msg( 'percent', $percentage
)->escaped();
$htmlOut .= Html::closeElement( 'td' );
// Banner name
$viewBanner = $this->getTitleFor(
'CentralNoticeBanners', "edit/{$banner['name']}" );
- $htmlOut .= Xml::openElement( 'td', array(
'valign' => 'top' ) );
+ $htmlOut .= Xml::openElement( 'td', 'style' =>
'vertical-align: top' );
$htmlOut .= Html::openElement( 'span',
array( 'class' =>
'cn-'.$banner['campaign'].'-'.$banner['name'] ) );
@@ -327,7 +327,7 @@
$htmlOut .= Html::closeElement( 'td' );
// Campaign name
- $htmlOut .= Xml::tags( 'td', array( 'valign' =>
'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top' ),
Linker::link(
$viewCampaign,
htmlspecialchars(
$banner['campaign'] ),
diff --git a/special/SpecialCentralNotice.php b/special/SpecialCentralNotice.php
index 8d45286..b450588 100644
--- a/special/SpecialCentralNotice.php
+++ b/special/SpecialCentralNotice.php
@@ -397,7 +397,7 @@
$htmlOut .= Html::hidden( 'title',
$this->getPageTitle()->getPrefixedText() );
$htmlOut .= Html::hidden( 'subaction', 'addCampaign' );
- $htmlOut .= Xml::openElement( 'table', array( 'cellpadding' =>
9 ) );
+ $htmlOut .= Xml::openElement( 'table', 'style' => 'padding:
9px' );
// Name
$htmlOut .= Xml::openElement( 'tr' );
@@ -417,13 +417,13 @@
$htmlOut .= Xml::closeElement( 'tr' );
// Project
$htmlOut .= Xml::openElement( 'tr' );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' => 'vertical-align: top;',
$this->msg( 'centralnotice-projects' )->escaped() );
$htmlOut .= Xml::tags( 'td', array(),
$this->projectMultiSelector( $noticeProjects ) );
$htmlOut .= Xml::closeElement( 'tr' );
// Languages
$htmlOut .= Xml::openElement( 'tr' );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' => 'vertical-align: top;',
$this->msg( 'centralnotice-languages' )->escaped() );
$htmlOut .= Xml::tags( 'td', array(),
$this->languageMultiSelector( $noticeLanguages ) );
@@ -437,7 +437,7 @@
$htmlOut .= Xml::closeElement( 'tr' );
$htmlOut .= Xml::openElement( 'tr',
array( 'id'=> 'geoMultiSelector', 'style'=>
'display:none;' ) );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' => 'vertical-align: top;',
$this->msg( 'centralnotice-countries' )->escaped() );
$htmlOut .= Xml::tags( 'td', array(), $this->geoMultiSelector()
);
$htmlOut .= Xml::closeElement( 'tr' );
@@ -877,7 +877,7 @@
// Build Html
$htmlOut = '';
$htmlOut .= Xml::tags( 'h2', null, $this->msg(
'centralnotice-notice-heading', $notice )->text() );
- $htmlOut .= Xml::openElement( 'table', array(
'cellpadding' => 9 ) );
+ $htmlOut .= Xml::openElement( 'table', 'style' =>
'padding: 9px;' );
// Rows
// Start Date
@@ -902,14 +902,14 @@
$htmlOut .= Xml::closeElement( 'tr' );
// Project
$htmlOut .= Xml::openElement( 'tr' );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
$this->msg( 'centralnotice-projects'
)->escaped() );
$htmlOut .= Xml::tags( 'td', array(),
$this->projectMultiSelector( $noticeProjects )
);
$htmlOut .= Xml::closeElement( 'tr' );
// Languages
$htmlOut .= Xml::openElement( 'tr' );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
$this->msg( 'centralnotice-languages'
)->escaped() );
$htmlOut .= Xml::tags( 'td', array(),
$this->languageMultiSelector( $noticeLanguages
) );
@@ -925,7 +925,7 @@
array( 'value' => $notice, 'id'
=> 'geotargeted' ) ) ) );
$htmlOut .= Xml::closeElement( 'tr' );
$htmlOut .= Xml::openElement( 'tr', array( 'id'=>
'geoMultiSelector' ) );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
$this->msg( 'centralnotice-countries'
)->escaped() );
$htmlOut .= Xml::tags( 'td', array(),
$this->geoMultiSelector( $countries ) );
$htmlOut .= Xml::closeElement( 'tr' );
@@ -1144,21 +1144,17 @@
array( 'value' => $notice, 'id' =>
'balanced' ) ) ) );
$htmlOut .= Xml::closeElement( 'tr' );
- $htmlOut .= Xml::openElement( 'table',
- array(
- 'cellpadding' => 9,
- 'width' => '100%'
- )
+ $htmlOut .= Xml::openElement( 'table', 'style' => 'padding:
9px; width: 100%;' )
);
if ( $this->editable ) {
- $htmlOut .= Xml::element( 'th', array( 'align' =>
'left', 'width' => '5%' ),
+ $htmlOut .= Xml::element( 'th', 'style' => 'text-align:
left; width: 5%;' ),
$this->msg( "centralnotice-remove" )->text() );
}
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'width' => '5%', 'class' => 'cn-weight' ),
+ $htmlOut .= Xml::element( 'th', array( 'class' => 'cn-weight',
'style' => 'text-align: left; width: 5%;' ),
$this->msg( 'centralnotice-weight' )->text() );
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'width' => '5%' ),
+ $htmlOut .= Xml::element( 'th', array( 'style' => 'text-align:
left; width: 5%;' ),
$this->msg( 'centralnotice-bucket' )->text() );
- $htmlOut .= Xml::element( 'th', array( 'align' => 'left',
'width' => '70%' ),
+ $htmlOut .= Xml::element( 'th', array( 'style' => 'text-align:
left; width: 70%;' ),
$this->msg( 'centralnotice-templates' )->text() );
// Table rows
@@ -1167,19 +1163,19 @@
if ( $this->editable ) {
// Remove
- $htmlOut .= Xml::tags( 'td', array( 'valign' =>
'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
Xml::check( 'removeTemplates[]', false,
array( 'value' => $row->tmp_name ) )
);
}
// Weight
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top',
'class' => 'cn-weight' ),
+ $htmlOut .= Xml::tags( 'td', array( 'class' =>
'cn-weight', 'style' => 'vertical-align: top;' ),
$this->weightDropDown( "weight[$row->tmp_id]",
$row->tmp_weight )
);
// Bucket
$numCampaignBuckets = min( intval( $row->not_buckets ),
$wgNoticeNumberOfBuckets );
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
$this->bucketDropDown(
"bucket[$row->tmp_id]",
( $numCampaignBuckets == 1 ? null :
intval( $row->asn_bucket ) ),
@@ -1188,7 +1184,7 @@
);
// Banner
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
BannerRenderer::linkToBanner( $row->tmp_name )
);
diff --git a/special/SpecialCentralNoticeBanners.php
b/special/SpecialCentralNoticeBanners.php
index 22ad3eb..eee9917 100644
--- a/special/SpecialCentralNoticeBanners.php
+++ b/special/SpecialCentralNoticeBanners.php
@@ -921,7 +921,7 @@
// Link and Preview all available translations
$htmlOut .= Xml::tags(
'td',
- array( 'valign' => 'top' ),
+ 'style' => 'vertical-align: top;',
$bannerRenderer->previewFieldSet()
);
}
diff --git a/special/SpecialGlobalAllocation.php
b/special/SpecialGlobalAllocation.php
index eda2f98..aa5bc89 100644
--- a/special/SpecialGlobalAllocation.php
+++ b/special/SpecialGlobalAllocation.php
@@ -127,7 +127,7 @@
$htmlOut .= Html::element( 'h2', array(), $this->msg(
'centralnotice-view-allocation' )->text() );
$htmlOut .= Xml::tags( 'p', null, $this->msg(
'centralnotice-allocation-instructions' )->text() );
- $htmlOut .= Html::openElement( 'table', array ( 'id' =>
'envpicker', 'cellpadding' => 7 ) );
+ $htmlOut .= Html::openElement( 'table', array ( 'id' =>
'envpicker', 'style' => 'padding: 7px;' ) );
$htmlOut .= Html::openElement( 'tr' );
$htmlOut .= Xml::tags( 'td',
array( 'style' => 'width: 20%;' ),
@@ -145,7 +145,7 @@
$htmlOut .= Html::closeElement( 'tr' );
$htmlOut .= Html::openElement( 'tr' );
$htmlOut .= Xml::tags( 'td',
- array( 'valign' => 'top' ),
+ 'style' => 'vertical-align: top;',
$this->msg( 'centralnotice-project-lang' )->text() );
$htmlOut .= Html::openElement( 'td' );
@@ -274,7 +274,7 @@
$htmlOut .= Html::element( 'h2', array(), $this->msg(
'centralnotice-notice-heading', $grouping['label'] )->text() );
$htmlOut .= Html::openElement( 'table',
- array ( 'cellpadding' => 9, 'class' =>
'wikitable', 'style' => 'margin: 1em 0;' )
+ array ( 'class' => 'wikitable', 'style' =>
'margin: 1em 0; padding: 9px;' )
);
$htmlOut .= Html::openElement( 'tr' );
$htmlOut .= Html::element( 'th', array( 'width' =>
'30%' ),
@@ -512,7 +512,7 @@
$variesBucket = ( $numBuckets > 1 );
$htmlOut = Html::openElement( 'table',
- array ( 'cellpadding' => 9, 'class' => 'wikitable
sortable', 'style' => 'margin: 1em 0;' )
+ array ( 'class' => 'wikitable sortable', 'style' =>
'margin: 1em 0; padding: 9px' )
);
//$htmlOut .= Html::element( 'caption', array( 'style' =>
'font-size: 1.2em;' ), $caption );
@@ -588,7 +588,7 @@
$htmlOut .= Html::closeElement( 'td' );
// Banner name
- $htmlOut .= Xml::openElement( 'td', array( 'valign' =>
'top' ) );
+ $htmlOut .= Xml::openElement( 'td', 'style' =>
'vertical-align: top;' );
$htmlOut .= Html::openElement( 'span',
array( 'class' =>
'cn-'.$banner['campaign'].'-'.$banner['name'] ) );
$htmlOut .= Linker::link(
@@ -599,7 +599,7 @@
$htmlOut .= Html::closeElement( 'td' );
// Campaign name
- $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ),
+ $htmlOut .= Xml::tags( 'td', 'style' =>
'vertical-align: top;',
Linker::link(
$viewCampaign,
htmlspecialchars( $banner['campaign'] ),
--
To view, visit https://gerrit.wikimedia.org/r/266064
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cd7bc04e539cf96fceeb2d6ee5513651c4e5cd9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: MtDu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits