From: Aryeh Gregor Date: Tue, 14 Nov 2006 06:33:11 +0000 (+0000) Subject: (bug 7811) Allow preview of edit summaries. Slight tweak added to stylesheet for... X-Git-Tag: 1.31.0-rc.0~55190 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=f5ce3a76a6852a577a85af5e39b2b0badde83966;p=lhc%2Fweb%2Fwiklou.git (bug 7811) Allow preview of edit summaries. Slight tweak added to stylesheet for Monobook but no others; possibly some small margins would be good additions to other skins, but it should look fine in all. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1ff59fae06..8d0a5aa984 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/EditPage.php b/includes/EditPage.php index 3017005830..5775e1ac42 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1021,9 +1021,11 @@ class EditPage { if( $this->section == 'new' ) { $commentsubject="\n
\n
"; $editsummary = ''; + $subjectpreview = $summarytext && $this->preview ? "
".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."
\n" : ''; } else { $commentsubject = ''; $editsummary="\n
\n
"; + $summarypreview = $summarytext && $this->preview ? "
".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."
\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 @@ -1153,6 +1156,7 @@ END $wgOut->addHTML( " {$metadata} {$editsummary} +{$summarypreview} {$checkboxhtml} {$safemodehtml} "); @@ -1237,6 +1241,7 @@ END */ function showPreview() { global $wgOut; + $wgOut->addHTML( '
' ); 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( "
\n" ); $wgOut->addHTML( '
' ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index d6fbc7dcd8..e4ee7d4014 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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' => "'''Your user name or IP address has been blocked.''' diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 0808bbb60c..898b3a6ff7 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -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; +}