(bug 7811) Allow preview of edit summaries. Slight tweak added to stylesheet for...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 14 Nov 2006 06:33:11 +0000 (06:33 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 14 Nov 2006 06:33:11 +0000 (06:33 +0000)
RELEASE-NOTES
includes/EditPage.php
languages/messages/MessagesEn.php
skins/monobook/main.css

index 1ff59fa..8d0a5aa 100644 (file)
@@ -181,8 +181,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 3687) Add distinct heading for media files in category display.
 * (bug 1578) Add different icons for external links to audio, video, or PDF in
   Monobook.
-* Made autoblocks block account creation if the user block has that bit set.
+* Made autoblocks block account creation if the user block has that option enabled.
 * Add auto-summaries to blankings and large removals without summaries.
+* (bug 7811) Allow preview of edit summaries.
 
 == Languages updated ==
 
index 3017005..5775e1a 100644 (file)
@@ -1021,9 +1021,11 @@ class EditPage {
                if( $this->section == 'new' ) {
                        $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' /><br />";
                        $editsummary = '';
+                       $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
                } else {
                        $commentsubject = '';
                        $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' /><br />";
+                       $summarypreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
                }
 
                # Set focus to the edit box on load, except on preview or diff, where it would interfere with the display
@@ -1141,6 +1143,7 @@ END
                $wgOut->addHTML( <<<END
 $recreate
 {$commentsubject}
+{$subjectpreview}
 <textarea tabindex='1' accesskey="," name="wpTextbox1" id="wpTextbox1" rows='{$rows}'
 cols='{$cols}'{$ew} $hidden>
 END
@@ -1153,6 +1156,7 @@ END
                $wgOut->addHTML( "
 {$metadata}
 {$editsummary}
+{$summarypreview}
 {$checkboxhtml}
 {$safemodehtml}
 ");
@@ -1237,6 +1241,7 @@ END
         */
        function showPreview() {
                global $wgOut;
+
                $wgOut->addHTML( '<div id="wikiPreview">' );
                if($this->mTitle->getNamespace() == NS_CATEGORY) {
                        $this->mArticle->openShowCategory();
@@ -1246,7 +1251,6 @@ END
                if($this->mTitle->getNamespace() == NS_CATEGORY) {
                        $this->mArticle->closeShowCategory();
                }
-               $wgOut->addHTML( "<br style=\"clear:both;\" />\n" );
                $wgOut->addHTML( '</div>' );
        }
 
index d6fbc7d..e4ee7d4 100644 (file)
@@ -889,6 +889,8 @@ format. Please enter a well-formatted address or empty that field.',
 'missingsummary' => "'''Reminder:''' You have not provided an edit summary. If you click Save again, your edit will be saved without one.",
 'missingcommenttext' => 'Please enter a comment below.',
 'missingcommentheader' => "'''Reminder:''' You have not provided a subject/headline for this comment. If you click Save again, your edit will be saved without one.",
+'summary-preview' => 'Summary preview',
+'subject-preview' => 'Subject/headline preview',
 'blockedtitle' => 'User is blocked',
 'blockedtext' => "<big>'''Your user name or IP address has been blocked.'''</big>
 
index 0808bbb..898b3a6 100644 (file)
@@ -1533,4 +1533,8 @@ table.multipageimage td {
 .imagelist .TablePager_col_img_description { white-space: normal }
 .imagelist th.TablePager_sort { background-color: #ccccff }
 
-.templatesUsed { margin-top: 1.5em; }
\ No newline at end of file
+.templatesUsed { margin-top: 1.5em; }
+
+.mw-summary-preview {
+       margin: 0.1em 0;
+}