jenkins-bot has submitted this change and it was merged.
Change subject: Removing some inline styles again
......................................................................
Removing some inline styles again
Bug: T87148
Change-Id: Ica0ba19d27e22d9d0a337a6e98e5dbb771d551bb
---
M SystemGifts/SpecialSystemGiftManager.php
M SystemGifts/SpecialSystemGiftManagerLogo.php
M SystemGifts/SystemGift.css
M UserProfile/SpecialUploadAvatar.php
M UserProfile/UserProfile.css
5 files changed, 122 insertions(+), 60 deletions(-)
Approvals:
Jack Phoenix: Looks good to me, approved
jenkins-bot: Verified
diff --git a/SystemGifts/SpecialSystemGiftManager.php
b/SystemGifts/SpecialSystemGiftManager.php
index 6ac6a39..0bba14c 100644
--- a/SystemGifts/SpecialSystemGiftManager.php
+++ b/SystemGifts/SpecialSystemGiftManager.php
@@ -114,10 +114,9 @@
$deleteLink = '';
if ( $user->isAllowed( 'awardsmanage' ) ) {
$removePage = SpecialPage::getTitleFor(
'RemoveMasterSystemGift' );
- $deleteLink = '<a href="' .
+ $deleteLink = '<a
class="ga-remove-link" href="' .
htmlspecialchars(
$removePage->getFullURL( "gift_id={$gift['id']}" ) ) .
- '" style="font-size:10px;
color:red;">' .
- $this->msg( 'delete' )->plain()
. '</a>';
+ '">' . $this->msg( 'delete'
)->plain() . '</a>';
}
$output .= '<div class="Item">
@@ -141,18 +140,18 @@
}
$form .= '<form action="" method="post"
enctype="multipart/form-data" name="gift">
- <table border="0" cellpadding="5" cellspacing="0" width="500">
+ <table>
<tr>
- <td width="200" class="view-form">' .
$this->msg( 'ga-giftname' )->plain() . '</td>
- <td width="695"><input type="text" size="45"
class="createbox" name="gift_name" value="' . ( isset( $gift['gift_name'] ) ?
$gift['gift_name'] : '' ) . '"/></td>
+ <td class="view-form">' . $this->msg(
'ga-giftname' )->plain() . '</td>
+ <td class="view-container"><input type="text"
size="45" class="createbox" name="gift_name" value="' . ( isset(
$gift['gift_name'] ) ? $gift['gift_name'] : '' ) . '"/></td>
</tr>
<tr>
- <td width="200" class="view-form"
valign="top">' . $this->msg( 'ga-giftdesc' )->plain() . '</td>
- <td width="695"><textarea class="createbox"
name="gift_description" rows="2" cols="30">' . ( isset(
$gift['gift_description'] ) ? $gift['gift_description'] : '' ) .
'</textarea></td>
+ <td class="view-form" valign="top">' .
$this->msg( 'ga-giftdesc' )->plain() . '</td>
+ <td class="view-container"><textarea
class="createbox" name="gift_description" rows="2" cols="30">' . ( isset(
$gift['gift_description'] ) ? $gift['gift_description'] : '' ) .
'</textarea></td>
</tr>
<tr>
- <td width="200" class="view-form">' .
$this->msg( 'ga-gifttype' )->plain() . '</td>
- <td width="695">
+ <td class="view-form">' . $this->msg(
'ga-gifttype' )->plain() . '</td>
+ <td class="view-container">
<select name="gift_category">' . "\n";
$g = new SystemGifts();
foreach ( $g->getCategories() as $category => $id ) {
@@ -168,8 +167,8 @@
</td>
</tr>
<tr>
- <td width="200" class="view-form">' . $this->msg(
'ga-threshold' )->plain() . '</td>
- <td width="695"><input type="text" size="25"
class="createbox" name="gift_threshold" value="' .
+ <td class="view-form">' . $this->msg( 'ga-threshold'
)->plain() . '</td>
+ <td class="view-container"><input type="text" size="25"
class="createbox" name="gift_threshold" value="' .
( isset( $gift['gift_threshold'] ) ?
$gift['gift_threshold'] : '' ) . '"/></td>
</tr>';
@@ -177,13 +176,14 @@
$sgml = SpecialPage::getTitleFor(
'SystemGiftManagerLogo' );
$gift_image = '<img src="' . $wgUploadPath . '/awards/'
.
SystemGifts::getGiftImage( $gift_id, 'l' ) .
- '" border="0" alt="gift" />';
+ '" alt="gift" />';
$form .= '<tr>
- <td width="200" class="view-form" valign="top">' .
$this->msg( 'ga-giftimage' )->plain() . '</td>
- <td width="695">' . $gift_image .
- '<a href="' . htmlspecialchars( $sgml->getFullURL(
'gift_id=' . $gift_id ) ) . '">' .
- $this->msg( 'ga-img' )->plain() . '</a>
- </td>
+ <td class="view-form" valign="top">' . $this->msg(
'ga-giftimage' )->plain() . '</td>
+ <td class="view-container">' .
+ $gift_image .
+ '<a href="' . htmlspecialchars(
$sgml->getFullURL( 'gift_id=' . $gift_id ) ) . '">' .
+ $this->msg( 'ga-img' )->plain() . '</a>
+ </td>
</tr>';
}
diff --git a/SystemGifts/SpecialSystemGiftManagerLogo.php
b/SystemGifts/SpecialSystemGiftManagerLogo.php
index c30698c..cd6f491 100644
--- a/SystemGifts/SpecialSystemGiftManagerLogo.php
+++ b/SystemGifts/SpecialSystemGiftManagerLogo.php
@@ -55,6 +55,9 @@
throw new UserBlockedError( $user->getBlock() );
}
+ // Add CSS
+ $out->addModuleStyles( 'ext.socialprofile.systemgifts.css' );
+
$this->gift_id = $this->getRequest()->getInt( 'gift_id' );
$this->initLogo();
$this->executeLogo();
@@ -507,26 +510,26 @@
$ext = 'png';
}
- $output .= '<table cellspacing="0" cellpadding="5">
+ $output .= '<table class="ga-upload-success-page">
<tr>
- <td valign="top"
style="color:#666666;font-weight:800">' . $this->msg( 'ga-large' )->plain() .
'</td>
- <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_l.' . $ext . '?ts=' . rand() . '"></td>
+ <td class="title-cell" valign="top">' . $this->msg(
'ga-large' )->plain() . '</td>
+ <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_l.' . $ext . '?ts=' . rand() . '" alt="" /></td>
</tr>
<tr>
- <td valign="top"
style="color:#666666;font-weight:800">' . $this->msg( 'ga-mediumlarge'
)->plain() . '</td>
- <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_ml.' . $ext . '?ts=' . rand() . '"></td>
+ <td class="title-cell" valign="top">' . $this->msg(
'ga-mediumlarge' )->plain() . '</td>
+ <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_ml.' . $ext . '?ts=' . rand() . '" alt="" /></td>
</tr>
<tr>
- <td valign="top"
style="color:#666666;font-weight:800">' . $this->msg( 'ga-medium' )->plain() .
'</td>
- <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_m.' . $ext . '?ts=' . rand() . '"></td>
+ <td class="title-cell" valign="top">' . $this->msg(
'ga-medium' )->plain() . '</td>
+ <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_m.' . $ext . '?ts=' . rand() . '" alt="" /></td>
</tr>
<tr>
- <td valign="top"
style="color:#666666;font-weight:800">' . $this->msg( 'ga-small' )->plain() .
'</td>
- <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_s.' . $ext . '?ts' . rand() . '"></td>
+ <td class="title-cell" valign="top">' . $this->msg(
'ga-small' )->plain() . '</td>
+ <td><img src="' . $wgUploadPath . '/awards/sg_' .
$this->gift_id . '_s.' . $ext . '?ts' . rand() . '" alt="" /></td>
</tr>
<tr>
<td>
- <input type="button"
onclick="javascript:history.go(-1)" value="' . $this->msg( 'ga-goback'
)->plain() . '">
+ <input type="button"
onclick="javascript:history.go(-1)" value="' . $this->msg( 'ga-goback'
)->plain() . '" />
</td>
</tr>';
@@ -596,7 +599,7 @@
<input type='hidden' name='wpDestFile' value=\"" .
htmlspecialchars( $this->mDestFile ) . "\" />
<input type='hidden' name='wpWatchthis' value=\"" .
htmlspecialchars( intval( $this->mWatchthis ) ) . "\" />
{$copyright}
- <table border='0'>
+ <table>
<tr>
<tr>
@@ -641,8 +644,8 @@
htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td>
</tr><tr>
<td align='right'>" . $this->msg( 'filesource' )->plain() . "</td>
- <td><input tabindex='4' type='text' name='wpUploadSource' value=\"" .
- htmlspecialchars( $this->mUploadSource ) . "\" style='width:100px'
/></td>
+ <td><input tabindex='4' type='text' name='wpUploadSource'
id='wpUploadSource' value=\"" .
+ htmlspecialchars( $this->mUploadSource ) . "\" /></td>
";
}
@@ -651,14 +654,14 @@
if ( $gift_image != '' ) {
$output = '<table>
<tr>
- <td
style="color:#666666;font-weight:800">' .
- $this->msg( 'ga-currentimage'
)->plain() . '</td>
+ <td class="title-cell">' .
+ $this->msg( 'ga-currentimage'
)->plain() .
+ '</td>
</tr>
<tr>
<td>
<img src="' . $wgUploadPath .
'/awards/' . $gift_image .
- '" border="0" alt="' .
- $this->msg( 'ga-gift'
)->plain() . '" />
+ '" alt="' . $this->msg(
'ga-gift' )->plain() . '" />
</td>
</tr>
</table>
@@ -668,12 +671,11 @@
$out->addHTML( '
<form id="upload" method="post" enctype="multipart/form-data" action="">
- <table border="0">
+ <table>
<tr>
-
- <td style="color:#666666;font-weight:800">' .
+ <td class="title-cell">' .
$this->msg( 'ga-file-instructions' )->escaped()
. $this->msg( 'ga-choosefile' )->plain() . '<br />
- <input tabindex="1" type="file"
name="wpUploadFile" id="wpUploadFile" style="width:100px" />
+ <input tabindex="1" type="file"
name="wpUploadFile" id="wpUploadFile" />
</td>
</tr>
<tr>' . $source . '</tr>
diff --git a/SystemGifts/SystemGift.css b/SystemGifts/SystemGift.css
index c6c32fd..dbb8ff0 100644
--- a/SystemGifts/SystemGift.css
+++ b/SystemGifts/SystemGift.css
@@ -117,10 +117,26 @@
}
/* Special:SystemGiftManager */
+form[name="gift"] table {
+ border: 0;
+ border-collapse: collapse;
+ padding: 5px;
+ width: 500px;
+}
+
+form[name="gift"] table img {
+ border: 0;
+}
+
.view-form {
font-weight: 800;
font-size: 12px;
color: #666666;
+ width: 200px;
+}
+
+.view-container {
+ width: 695px;
}
.view-status {
@@ -132,6 +148,27 @@
margin-bottom: 5px;
}
+a.ga-remove-link {
+ color: red;
+ font-size: 10px;
+}
+
+/* Special:SystemGiftManagerLogo */
+table.ga-upload-success-page {
+ border-collapse: collapse;
+ padding: 5px;
+}
+
+table td.title-cell {
+ color: #666666;
+ font-weight: 800;
+ padding: 5px;
+}
+
+#wpUploadSource, #wpUploadFile {
+ width: 100px;
+}
+
/* Special:TopAwards */
.top-awards {
float: left;
diff --git a/UserProfile/SpecialUploadAvatar.php
b/UserProfile/SpecialUploadAvatar.php
index 514cab1..0588fd0 100644
--- a/UserProfile/SpecialUploadAvatar.php
+++ b/UserProfile/SpecialUploadAvatar.php
@@ -92,37 +92,37 @@
$this->msg( 'user-profile-picture-yourpicture'
)->plain() . '</p>';
$output .= '<p>' . $this->msg(
'user-profile-picture-yourpicturestext' )->plain() . '</p>';
- $output .= '<table cellspacing="0" cellpadding="0"
style="margin-top:20px;">';
+ $output .= '<table class="avatar-success-page">';
$output .= '<tr>
- <td valign="top"
style="color:#797979;font-size:12px;font-weight:bold;padding-bottom:20px;">' .
+ <td class="title-cell" valign="top">' .
$this->msg( 'user-profile-picture-large'
)->plain() .
'</td>
- <td style="padding-bottom:20px;">
- <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_l.' . $ext . '?ts=' . rand() . '" alt=""
border="0" />
+ <td class="image-cell">
+ <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_l.' . $ext . '?ts=' . rand() . '" alt="" />
</td>
</tr>';
$output .= '<tr>
- <td valign="top"
style="color:#797979;font-size:12px;font-weight:bold;padding-bottom:20px;">' .
+ <td class="title-cell" valign="top">' .
$this->msg( 'user-profile-picture-medlarge'
)->plain() .
'</td>
- <td style="padding-bottom:20px;">
- <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_ml.' . $ext . '?ts=' . rand() . '" alt=""
border="0" />
+ <td class="image-cell">
+ <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_ml.' . $ext . '?ts=' . rand() . '" alt="" />
</td>
</tr>';
$output .= '<tr>
- <td valign="top"
style="color:#797979;font-size:12px;font-weight:bold;padding-bottom:20px;">' .
+ <td class="title-cell" valign="top">' .
$this->msg( 'user-profile-picture-medium'
)->plain() .
'</td>
- <td style="padding-bottom:20px;">
- <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_m.' . $ext . '?ts=' . rand() . '" alt=""
border="0" />
+ <td class="image-cell">
+ <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_m.' . $ext . '?ts=' . rand() . '" alt="" />
</td>
</tr>';
$output .= '<tr>
- <td valign="top"
style="color:#797979;font-size:12px;font-weight:bold;padding-bottom:20px;">' .
+ <td class="title-cell" valign="top">' .
$this->msg( 'user-profile-picture-small'
)->plain() .
'</td>
- <td style="padding-bottom:20px;">
- <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_s.' . $ext . '?ts=' . rand() . '" alt=""
border="0" />
+ <td class="image-cell">
+ <img src="' . $wgUploadPath . '/avatars/' .
$wgAvatarKey . '_' . $uid . '_s.' . $ext . '?ts=' . rand() . '" alt="" />
</td>
</tr>';
$output .= '<tr>
@@ -173,8 +173,8 @@
htmlspecialchars( $this->mUploadCopyStatus ) .
"\" size='40' /></td>
</tr><tr>
<td align='right'>" . $this->msg( 'filesource'
)->plain() . "</td>
- <td><input tabindex='4' type='text'
name='wpUploadSource' value=\"" .
- htmlspecialchars( $this->mUploadSource ) . "\"
style='width:100px' /></td>
+ <td><input tabindex='4' type='text'
name='wpUploadSource' id='wpUploadSource' value=\"" .
+ htmlspecialchars( $this->mUploadSource ) . "\"
/></td>
";
}
@@ -206,7 +206,7 @@
// @see https://bugzilla.wikimedia.org/show_bug.cgi?id=30953
$output .= Html::hidden( 'wpEditToken',
$this->getUser()->getEditToken(), array( 'id' => 'wpEditToken' ) ) . "\n";
$output .= Html::hidden( 'title',
$this->getPageTitle()->getPrefixedText() ) . "\n";
- $output .= '<table border="0">
+ $output .= '<table>
<tr>
<td>
<p
class="profile-update-title">' .
@@ -216,7 +216,7 @@
$this->msg(
'user-profile-picture-picsize' )->plain() .
'</p>
<input tabindex="1" type="file"
name="wpUploadFile" id="wpUploadFile" size="36"/>
- </td>
+ </td>
</tr>
<tr>' . $source . '</tr>
<tr>
diff --git a/UserProfile/UserProfile.css b/UserProfile/UserProfile.css
index 19d3386..fb02c39 100644
--- a/UserProfile/UserProfile.css
+++ b/UserProfile/UserProfile.css
@@ -387,10 +387,6 @@
line-height: 9px;
}
-/*.article-title {
-
-}*/
-
/* Pictures */
.picture-container-spacer {
height: 25px;
@@ -499,6 +495,33 @@
font-size: 9px;
}
+/* Avatar upload page (Special:UploadAvatar) */
+#wpUploadSource {
+ width: 100px;
+}
+
+table.avatar-success-page {
+ border-collapse: collapse;
+ margin-top: 20px;
+ padding: 0;
+}
+
+table.avatar-success-page td.title-cell {
+ color: #797979;
+ font-size: 12px;
+ font-weight: bold;
+ padding: 5px;
+ padding-bottom: 20px;
+}
+
+table.avatar-success-page td.image-cell {
+ padding-bottom: 20px;
+}
+
+table.avatar-success-page td.image-cell img {
+ border: 0;
+}
+
/* Update Profile */
.profile-info {
background-color: #fff;
--
To view, visit https://gerrit.wikimedia.org/r/262702
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ica0ba19d27e22d9d0a337a6e98e5dbb771d551bb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Lewis Cawte <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits