r36515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36514‎ | r36515 | r36516 >
Date:19:50, 20 June 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 14515) HTML nesting cleanup on edit form

The edit form was being a bit wonky about how it nested certain things, splitting the "summary" *label* from the input form and following check boxes with a <div> boundary... which was then forced to be inline.

This maybe made sense long ago, but seems pretty silly now. The div boundary made even less sense when in 'add comment' mode, and when hiding #edit-form via custom JS or css it would abut the <textarea> directly against the following checkboxes, leading to intermittent layout problems.

Moved the <div> to surround the summary box (for regular editing) and down below the textarea (for add-comment mode) so editOptions makes some kind of sense... hopefully....
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/skins/modern/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/monobook/main.css
@@ -1345,10 +1345,6 @@
13461346 margin-right: 0.33em;
13471347 }
13481348
1349 -#editform .editOptions {
1350 - display: inline;
1351 -}
1352 -
13531349 #wpSave {
13541350 font-weight: bold;
13551351 }
Index: trunk/phase3/skins/modern/main.css
@@ -812,10 +812,6 @@
813813 margin-right: 0.33em;
814814 }
815815
816 -#editform .editOptions {
817 - display: inline;
818 -}
819 -
820816 #wpSave {
821817 font-weight: bold;
822818 }
Index: trunk/phase3/includes/EditPage.php
@@ -1265,15 +1265,15 @@
12661266 $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary );
12671267 $summaryhiddens .= Xml::hidden( 'wpAutoSummary', $autosumm );
12681268 if( $this->section == 'new' ) {
1269 - $commentsubject="<span id='wpSummaryLabel'><label for='wpSummary'>{$subject}:</label></span>\n<div class='editOptions'>\n<input tabindex='1' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' />{$summaryhiddens}<br />";
1270 - $editsummary = '';
 1269+ $commentsubject="<span id='wpSummaryLabel'><label for='wpSummary'>{$subject}:</label></span>\n<input tabindex='1' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' />{$summaryhiddens}<br />";
 1270+ $editsummary = "<div class='editOptions'>\n";
12711271 global $wgParser;
12721272 $formattedSummary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $this->summary ) );
12731273 $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $formattedSummary, $this->mTitle, true )."</div>\n" : '';
12741274 $summarypreview = '';
12751275 } else {
12761276 $commentsubject = '';
1277 - $editsummary="<span id='wpSummaryLabel'><label for='wpSummary'>{$summary}:</label></span>\n<div class='editOptions'>\n<input tabindex='2' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' />{$summaryhiddens}<br />";
 1277+ $editsummary="<div class='editOptions'>\n<span id='wpSummaryLabel'><label for='wpSummary'>{$summary}:</label></span>\n<input tabindex='2' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' />{$summaryhiddens}<br />";
12781278 $summarypreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
12791279 $subjectpreview = '';
12801280 }
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1341,7 +1341,7 @@
13421342 * to ensure that client-side caches don't keep obsolete copies of global
13431343 * styles.
13441344 */
1345 -$wgStyleVersion = '156';
 1345+$wgStyleVersion = '158';
13461346
13471347
13481348 # Server-side caching:
Index: trunk/phase3/RELEASE-NOTES
@@ -382,7 +382,9 @@
383383 * (bug 14572) Redirects listed on file links on image pages no longer redirect.
384384 * (bug 14537) Change interwiki name for Old Church Slavonic (cu)
385385 * (bug 14583) Fix regression in recent changes "limit to certain categories."
 386+* (bug 14515) HTML nesting cleanup on edit form
386387
 388+
387389 === API changes in 1.13 ===
388390
389391 * Fixing main page display in meta=siteinfo

Status & tagging log