r11906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11905‎ | r11906 | r11907 >
Date:03:29, 2 December 2005
Author:vibber
Status:old
Tags:
Comment:
* (bug 4100, 3049) Add 'edittools' message to hold edit tools, put it
on Special:Upload as well as edit, rearrange edit page pieces a bit.
Copyright warning now above the buttons to ensure it's visible,
template list at the bottom so it can grow.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -333,7 +333,14 @@
334334 // copied and adapted from phpBB
335335 function insertTags(tagOpen, tagClose, sampleText) {
336336
337 - var txtarea = document.editform.wpTextbox1;
 337+ if (document.editform)
 338+ var txtarea = document.editform.wpTextbox1;
 339+ else {
 340+ // some alternate form? take the first one we can find
 341+ var areas = document.getElementsByTagName('textarea');
 342+ var txtarea = areas[0];
 343+ }
 344+
338345 // IE
339346 if(document.selection && !is_gecko) {
340347 var theSelection = document.selection.createRange().text;
Index: trunk/phase3/includes/EditPage.php
@@ -847,6 +847,14 @@
848848 if( is_callable( $formCallback ) ) {
849849 call_user_func_array( $formCallback, array( &$wgOut ) );
850850 }
 851+
 852+ // Put these up at the top to ensure they aren't lost on early form submission
 853+ $wgOut->addHTML( "
 854+<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />
 855+<input type='hidden' value=\"{$this->starttime}\" name=\"wpStarttime\" />\n
 856+<input type='hidden' value=\"{$this->edittime}\" name=\"wpEdittime\" />\n
 857+<input type='hidden' value=\"{$this->scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" );
 858+
851859 $wgOut->addHTML( <<<END
852860 $recreate
853861 {$commentsubject}
@@ -855,11 +863,20 @@
856864 END
857865 . htmlspecialchars( $this->safeUnicodeOutput( $this->textbox1 ) ) .
858866 "
859 -</textarea><br />
 867+</textarea>
 868+
 869+ " );
 870+
 871+ $wgOut->addWikiText( $copywarn );
 872+
 873+ $wgOut->addHTML( "
860874 {$metadata}
861875 {$editsummary}
862876 {$checkboxhtml}
863877 {$safemodehtml}
 878+");
 879+
 880+ $wgOut->addHTML( "
864881 <div class='editButtons'>
865882 <input tabindex='5' id='wpSave' type='submit' value=\"{$save}\" name=\"wpSave\" accesskey=\"".wfMsg('accesskey-save')."\"".
866883 " title=\"".wfMsg('tooltip-save')."\"/>
@@ -868,16 +885,15 @@
869886 <input tabindex='7' id='wpDiff' type='submit' value=\"{$diff}\" name=\"wpDiff\" accesskey=\"".wfMsg('accesskey-diff')."\"".
870887 " title=\"".wfMsg('tooltip-diff')."\"/> <span class='editHelp'>{$cancel} | {$edithelp}</span></div>
871888 </div>
 889+" );
 890+
 891+ $wgOut->addWikiText( wfMsgForContent( 'edittools' ) );
 892+
 893+ $wgOut->addHTML( "
872894 <div class='templatesUsed'>
873895 {$templates}
874896 </div>
875897 " );
876 - $wgOut->addWikiText( $copywarn );
877 - $wgOut->addHTML( "
878 -<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />
879 -<input type='hidden' value=\"{$this->starttime}\" name=\"wpStarttime\" />\n
880 -<input type='hidden' value=\"{$this->edittime}\" name=\"wpEdittime\" />\n
881 -<input type='hidden' value=\"{$this->scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" );
882898
883899 if ( $wgUser->isLoggedIn() ) {
884900 /**
Index: trunk/phase3/includes/SpecialUpload.php
@@ -659,6 +659,16 @@
660660 <td></td>
661661 <td align='left'><input tabindex='9' type='submit' name='wpUpload' value=\"{$ulb}\" /></td>
662662 </tr>
 663+
 664+ <tr>
 665+ <td></td>
 666+ <td align='left'>
 667+ " );
 668+ $wgOut->addWikiText( wfMsgForContent( 'edittools' ) );
 669+ $wgOut->addHTML( "
 670+ </td>
 671+ </tr>
 672+
663673 </table>
664674 </form>" );
665675 }
Index: trunk/phase3/RELEASE-NOTES
@@ -274,6 +274,10 @@
275275 * Fix custom namespaces on wikis set for Portuguese
276276 * Major overhaul of Special:Userlogin
277277 * Update ipblocks table in MySQL 5 table defs
 278+* (bug 4100, 3049) Add 'edittools' message to hold edit tools, put it
 279+ on Special:Upload as well as edit, rearrange edit page pieces a bit.
 280+ Copyright warning now above the buttons to ensure it's visible,
 281+ template list at the bottom so it can grow.
278282
279283
280284 === Caveats ===
Index: trunk/phase3/languages/Language.php
@@ -791,6 +791,7 @@
792792 the text into a text file and save it for later.</strong>',
793793 'protectedpagewarning' => "<strong>WARNING: This page has been locked so that only users with sysop privileges can edit it. Be sure you are following the [[Project:Protected_page_guidelines|protected page guidelines]].</strong>",
794794 'templatesused' => 'Templates used on this page:',
 795+'edittools' => '<!-- Text here will be shown below edit and upload forms. -->',
795796
796797 # History pages
797798 #

Status & tagging log