* (bug 4100, 3049) Add 'edittools' message to hold edit tools, put it
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 2 Dec 2005 03:29:37 +0000 (03:29 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 2 Dec 2005 03:29:37 +0000 (03:29 +0000)
  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.

RELEASE-NOTES
includes/EditPage.php
includes/SpecialUpload.php
languages/Language.php
skins/common/wikibits.js

index 63492f0..27ddba6 100644 (file)
@@ -274,6 +274,10 @@ fully support the editing toolbar, but was found to be too confusing.
 * Fix custom namespaces on wikis set for Portuguese
 * Major overhaul of Special:Userlogin
 * Update ipblocks table in MySQL 5 table defs
+* (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.
 
 
 === Caveats ===
index 5f7b73c..4e39380 100644 (file)
@@ -847,6 +847,14 @@ END
                if( is_callable( $formCallback ) ) {
                        call_user_func_array( $formCallback, array( &$wgOut ) );
                }
+
+               // Put these up at the top to ensure they aren't lost on early form submission
+               $wgOut->addHTML( "
+<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />
+<input type='hidden' value=\"{$this->starttime}\" name=\"wpStarttime\" />\n
+<input type='hidden' value=\"{$this->edittime}\" name=\"wpEdittime\" />\n
+<input type='hidden' value=\"{$this->scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" );
+
                $wgOut->addHTML( <<<END
 $recreate
 {$commentsubject}
@@ -855,11 +863,20 @@ cols='{$cols}'{$ew} $hidden>
 END
 . htmlspecialchars( $this->safeUnicodeOutput( $this->textbox1 ) ) .
 "
-</textarea><br />
+</textarea>
+
+               " );
+               
+               $wgOut->addWikiText( $copywarn );
+
+               $wgOut->addHTML( "
 {$metadata}
 {$editsummary}
 {$checkboxhtml}
 {$safemodehtml}
+");
+
+               $wgOut->addHTML( "
 <div class='editButtons'>
 <input tabindex='5' id='wpSave' type='submit' value=\"{$save}\" name=\"wpSave\" accesskey=\"".wfMsg('accesskey-save')."\"".
 " title=\"".wfMsg('tooltip-save')."\"/>
@@ -868,16 +885,15 @@ END
 <input tabindex='7' id='wpDiff' type='submit' value=\"{$diff}\" name=\"wpDiff\" accesskey=\"".wfMsg('accesskey-diff')."\"".
 " title=\"".wfMsg('tooltip-diff')."\"/> <span class='editHelp'>{$cancel} | {$edithelp}</span></div>
 </div>
+" );
+
+               $wgOut->addWikiText( wfMsgForContent( 'edittools' ) );
+
+               $wgOut->addHTML( "
 <div class='templatesUsed'>
 {$templates}
 </div>
 " );
-               $wgOut->addWikiText( $copywarn );
-               $wgOut->addHTML( "
-<input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />
-<input type='hidden' value=\"{$this->starttime}\" name=\"wpStarttime\" />\n
-<input type='hidden' value=\"{$this->edittime}\" name=\"wpEdittime\" />\n
-<input type='hidden' value=\"{$this->scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" );
 
                if ( $wgUser->isLoggedIn() ) {
                        /**
index fd8e31e..d09b868 100644 (file)
@@ -659,6 +659,16 @@ class UploadForm {
                <td></td>
                <td align='left'><input tabindex='9' type='submit' name='wpUpload' value=\"{$ulb}\" /></td>
        </tr>
+       
+       <tr>
+               <td></td>
+               <td align='left'>
+               " );
+       $wgOut->addWikiText( wfMsgForContent( 'edittools' ) );
+       $wgOut->addHTML( "
+               </td>
+       </tr>
+               
        </table>
        </form>" );
        }
index afb093f..5696884 100644 (file)
@@ -791,6 +791,7 @@ so you will not be able to save your edits right now. You may wish to cut-n-past
 the text into a text file and save it for later.</strong>',
 '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>",
 'templatesused'        => 'Templates used on this page:',
+'edittools' => '<!-- Text here will be shown below edit and upload forms. -->',
 
 # History pages
 #
index 851fabf..72540d8 100644 (file)
@@ -333,7 +333,14 @@ function escapeQuotesHTML(text) {
 // copied and adapted from phpBB
 function insertTags(tagOpen, tagClose, sampleText) {
 
-       var txtarea = document.editform.wpTextbox1;
+       if (document.editform)
+               var txtarea = document.editform.wpTextbox1;
+       else {
+               // some alternate form? take the first one we can find
+               var areas = document.getElementsByTagName('textarea');
+               var txtarea = areas[0];
+       }
+       
        // IE
        if(document.selection  && !is_gecko) {
                var theSelection = document.selection.createRange().text;