jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/333674 )
Change subject: Remove unused wgSupressPageTitle global, keep native heading style ...................................................................... Remove unused wgSupressPageTitle global, keep native heading style - Keep native heading style instead of rolling out our own custom CSS for the special page h1 heading - Change all other h1 elements to h2 elements for accessibility and semantics - Added classes to h2 elements - Slightly less code duplication Bug: T143145 Change-Id: I0bc1e4b873db2cdfdd50a181be0a4c036af5a0a9 --- M FanBoxHooks.php M FanBoxPage.php M SpecialFanBoxes.css M SpecialFanBoxes.php M extension.json 5 files changed, 17 insertions(+), 35 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/FanBoxHooks.php b/FanBoxHooks.php index 33dad33..286121a 100644 --- a/FanBoxHooks.php +++ b/FanBoxHooks.php @@ -41,11 +41,7 @@ * @return Boolean: true */ public static function deleteFanBox( &$article, &$user, $reason ) { - global $wgSupressPageTitle; - if ( $article->getTitle()->getNamespace() == NS_FANTAG ) { - $wgSupressPageTitle = true; - $dbw = wfGetDB( DB_MASTER ); $s = $dbw->selectRow( @@ -127,11 +123,9 @@ * @return Boolean: true */ public static function fantagFromTitle( &$title, &$article ) { - global $wgRequest, $wgOut, $wgSupressPageTitle; + global $wgRequest, $wgOut; if ( $title->getNamespace() == NS_FANTAG ) { - $wgSupressPageTitle = true; - // Add CSS $wgOut->addModuleStyles( 'ext.fanBoxes' ); @@ -264,4 +258,4 @@ $list[NS_FANTAG_TALK] = 'UserBox_talk'; return true; } -} \ No newline at end of file +} diff --git a/FanBoxPage.php b/FanBoxPage.php index f6d8cfa..85ba7c3 100644 --- a/FanBoxPage.php +++ b/FanBoxPage.php @@ -40,7 +40,6 @@ $fanboxTitle = Title::makeTitle( NS_FANTAG, $this->fan->getName() ); $output = ''; - $output .= "<h1 class=\"firstHeading\">{$fanboxTitle->getPrefixedText()}</h1>"; $output .= '<div class="fanbox-page-container clearfix">' . $this->fan->outputFanBox(); @@ -162,4 +161,4 @@ " <input name='embed_code' type='text' value='{$code}' onclick='javascript:document.embed_fan.embed_code.focus();document.embed_fan.embed_code.select();' readonly='readonly' /></form>"; } -} \ No newline at end of file +} diff --git a/SpecialFanBoxes.css b/SpecialFanBoxes.css index 6d1e674..5d4cdff 100644 --- a/SpecialFanBoxes.css +++ b/SpecialFanBoxes.css @@ -23,13 +23,6 @@ width: 550px; } -.mw-body h1, .mw-body-primary h1 { - font-size: 16px; - margin: 10px 0px 10px 0px !important; - border-bottom: none; - font-weight: bold; -} - table.fanBoxTable { border: 0; border-collapse: collapse; /* cellspacing=0 equivalent */ @@ -91,10 +84,6 @@ #inputRightSide { width: 350px; -} - -.add-colors h1 { - clear: both; } #add-colors-left { diff --git a/SpecialFanBoxes.php b/SpecialFanBoxes.php index 8f3c9fc..8a793e1 100644 --- a/SpecialFanBoxes.php +++ b/SpecialFanBoxes.php @@ -175,27 +175,27 @@ </td> </table>'; - $output .= '<h1>' . $this->msg( 'fanbox-addtext' )->plain() . '</h1> + $output .= '<h2 class="fanbox-form-label">' . $this->msg( 'fanbox-addtext' )->plain() . '</h2> <div class="create-fanbox-text"> <div id="fanbox-left-text"> <h3>' . $this->msg( 'fanbox-leftsidetext' )->plain() . '<span id="addImage">' . $this->msg( 'fanbox-display-image' )->plain() . '</span> <span id="closeImage">' . $this->msg( 'fanbox-close-image' )->plain() . "</span></h3> <input type=\"text\" name=\"inputLeftSide\" id=\"inputLeftSide\" value=\"{$update_fan->getFanBoxLeftText()}\" maxlength=\"11\"><br /> - <font size=\"1\">" . $this->msg( 'fanbox-leftsideinstructions' )->plain() . '</font> + <p>" . $this->msg( 'fanbox-leftsideinstructions' )->plain() . '</p> </div> <div id="fanbox-right-text"> <h3>' . $this->msg( 'fanbox-rightsidetext' )->plain() . '<span class="fanbox-right-text-message">' . $this->msg( 'fanbox-charsleft', '<input readonly="readonly" type="text" name="countdown" value="70" /> ' )->text() . "</span></h3> <input type=\"text\" name=\"inputRightSide\" id=\"inputRightSide\" value=\"{$update_fan->getFanBoxRightText()}\" maxlength=\"70\" /><br /> - <font size=\"1\">" . $this->msg( 'fanbox-rightsideinstructions' )->plain() . '</font> + <p>" . $this->msg( 'fanbox-rightsideinstructions' )->plain() . '</p> </div> </div> </form>'; $output .= ' <div id="create-fanbox-image" class="create-fanbox-image"> - <h1>' . $this->msg( 'fanbox-leftsideimage' )->plain() . - ' <font size="1">' . $this->msg( 'fanbox-leftsideimageinstructions' )->plain() . " </font></h1> + <h2 class="fanbox-form-label visualClear">' . $this->msg( 'fanbox-leftsideimage' )->plain() . '</h2> + <p>' . $this->msg( 'fanbox-leftsideimageinstructions' )->plain() . " </p> <div id=\"fanbox_image\">$fantag_imageholder</div> <div id=\"fanbox_image2\"> </div> <div id=\"real-form\"> @@ -250,7 +250,7 @@ <input type="hidden" name="textColorRightSideColor" id="textColorRightSideColor" value="" />'; if ( !$destination ) { - $output .= '<h1>' . $this->msg( 'fanbox-title' )->plain() . '</h1> + $output .= '<h2 class="fanbox-form-label">' . $this->msg( 'fanbox-title' )->plain() . '</h2> <div class="create-fanbox-title"> <input type="text" name="wpTitle" id="wpTitle" value="' . $request->getVal( 'wpTitle' ) . @@ -280,7 +280,7 @@ </tr> </table>' . "\n"; - $output.= '<h1>' . $this->msg( 'fanbox-addtext' )->plain() . '</h1> + $output.= '<h2 class="fanbox-form-label">' . $this->msg( 'fanbox-addtext' )->plain() . '</h2> <div class="create-fanbox-text"> <div id="fanbox-left-text"> <h3>' . $this->msg( 'fanbox-leftsidetext' )->plain() . @@ -300,10 +300,10 @@ </div>'; $output .= '<div id="create-fanbox-image" class="create-fanbox-image"> - <h1>' . $this->msg( 'fanbox-leftsideimage' )->plain() . + <h2 class="fanbox-form-label">' . $this->msg( 'fanbox-leftsideimage' )->plain() . ' <font size="1">' . $this->msg( 'fanbox-leftsideimageinstructions' )->inContentLanguage()->parse() . - ' </font></h1> + ' </font></h2> <div id="fanbox_image"></div> <div id="fanbox_image2"></div> @@ -371,7 +371,7 @@ */ function colorPickerAndCategoryCloud( $categories ) { $output = '<div class="add-colors"> - <h1>' . $this->msg( 'fan-add-colors' )->plain() . '</h1> + <h2 class="fanbox-form-label visualClear">' . $this->msg( 'fan-add-colors' )->plain() . '</h2> <div id="add-colors-left"> <form name="colorpickerradio" action=""> <input type="radio" name="colorpickerchoice" value="leftBG" checked="checked" />' . @@ -422,9 +422,9 @@ $tagcloud .= '</div>'; $output .= '<div class="create-category-title">'; - $output .= "<h1>$categoriesLabel</h1>"; + $output .= '<h2 class="fanbox-form-label">' . $categoriesLabel . '</h2>'; $output .= '</div>'; - $output .= "<div class=\"categorytext\">$categoriesHelpText</div>"; + $output .= '<div class="categorytext">' . $categoriesHelpText. '</div>'; $output .= $tagcloud; $output .= '<textarea class="createbox" tabindex="' . $tabcounter . '" accesskey="," name="pageCtg" id="pageCtg" rows="2" cols="80">' . $categories . '</textarea><br /><br />'; @@ -432,4 +432,4 @@ return $output; } -} \ No newline at end of file +} diff --git a/extension.json b/extension.json index afd1ff4..c193b0c 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "FanBoxes", - "version": "3.2.5", + "version": "3.2.6", "author": [ "Aaron Wright", "David Pean", -- To view, visit https://gerrit.wikimedia.org/r/333674 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0bc1e4b873db2cdfdd50a181be0a4c036af5a0a9 Gerrit-PatchSet: 9 Gerrit-Project: mediawiki/extensions/FanBoxes Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com> Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits