From: Raimond Spekking Date: Wed, 25 Mar 2009 10:11:33 +0000 (+0000) Subject: Add a class if 'missingsummary' is triggered to allow styling of the summary line X-Git-Tag: 1.31.0-rc.0~42370 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=5113543127264da9a6ed5b879bc0b16e1ee62d00;p=lhc%2Fweb%2Fwiklou.git Add a class if 'missingsummary' is triggered to allow styling of the summary line --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 89ad9bbd65..bd17d563b5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -149,7 +149,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added $wgUserrightsInterwikiDelimiter to allow changing the delimiter used in Special:UserRights to denote the user should be searched for on a different database - +* Add a class if 'missingsummary' is triggered to allow styling of the summary + line + === Bug fixes in 1.15 === * (bug 16968) Special:Upload no longer throws useless warnings. * (bug 17000) Special:RevisionDelete now checks if the database is locked diff --git a/includes/EditPage.php b/includes/EditPage.php index 51010c250f..3589b52d3a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1363,10 +1363,14 @@ class EditPage { if ( $this->section == 'new' ) { $commentsubject = ''; if ( !$wgRequest->getBool( 'nosummary' ) ) { + # Add a class if 'missingsummary' is triggered to allow styling of the summary line + $summaryClass = $this->missingSummary ? 'mw-summarymissed' : 'mw-summary'; + $commentsubject = Xml::tags( 'label', array( 'for' => 'wpSummary' ), $subject ); $commentsubject = - Xml::tags( 'span', array( 'id' => 'wpSummaryLabel' ), $commentsubject ); + Xml::tags( 'span', array( 'class' => $summaryClass, 'id' => "wpSummaryLabel" ), + $commentsubject ); $commentsubject .= ' '; $commentsubject .= Xml::input( 'wpSummary', 60, @@ -1385,10 +1389,13 @@ class EditPage { } else { $commentsubject = ''; + # Add a class if 'missingsummary' is triggered to allow styling of the summary line + $summaryClass = $this->missingSummary ? 'mw-summarymissed' : 'mw-summary'; + $editsummary = Xml::tags( 'label', array( 'for' => 'wpSummary' ), $summary ); - $editsummary = - Xml::tags( 'span', array( 'id' => 'wpSummaryLabel' ), $editsummary ) . ' '; - + $editsummary = Xml::tags( 'span', array( 'class' => $summaryClass, 'id' => "wpSummaryLabel" ), + $editsummary ) . ' '; + $editsummary .= Xml::input( 'wpSummary', 60, $summarytext, @@ -1397,11 +1404,11 @@ class EditPage { 'maxlength' => '200', 'tabindex' => '1' ) ); - + // No idea where this is closed. $editsummary = Xml::openElement( 'div', array( 'class' => 'editOptions' ) ) . $editsummary . '
'; - + $summarypreview = ''; if ( $summarytext && $this->preview ) { $summarypreview =