From: Brion Vibber Date: Fri, 2 Dec 2005 03:29:37 +0000 (+0000) Subject: * (bug 4100, 3049) Add 'edittools' message to hold edit tools, put it X-Git-Tag: 1.6.0~1070 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=ee44c7387a1e4e272799d2d8470bf42e144f847d;p=lhc%2Fweb%2Fwiklou.git * (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. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 63492f069e..27ddba655c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/EditPage.php b/includes/EditPage.php index 5f7b73cbbc..4e393802c9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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( " +section ) . "\" name=\"wpSection\" /> +starttime}\" name=\"wpStarttime\" />\n +edittime}\" name=\"wpEdittime\" />\n +scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" ); + $wgOut->addHTML( << END . htmlspecialchars( $this->safeUnicodeOutput( $this->textbox1 ) ) . " -
+ + + " ); + + $wgOut->addWikiText( $copywarn ); + + $wgOut->addHTML( " {$metadata} {$editsummary} {$checkboxhtml} {$safemodehtml} +"); + + $wgOut->addHTML( "
@@ -868,16 +885,15 @@ END {$cancel} | {$edithelp}
+" ); + + $wgOut->addWikiText( wfMsgForContent( 'edittools' ) ); + + $wgOut->addHTML( "
{$templates}
" ); - $wgOut->addWikiText( $copywarn ); - $wgOut->addHTML( " -section ) . "\" name=\"wpSection\" /> -starttime}\" name=\"wpStarttime\" />\n -edittime}\" name=\"wpEdittime\" />\n -scrolltop}\" name=\"wpScrolltop\" id=\"wpScrolltop\" />\n" ); if ( $wgUser->isLoggedIn() ) { /** diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index fd8e31e3eb..d09b868832 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -659,6 +659,16 @@ class UploadForm { + + + + + " ); + $wgOut->addWikiText( wfMsgForContent( 'edittools' ) ); + $wgOut->addHTML( " + + + " ); } diff --git a/languages/Language.php b/languages/Language.php index afb093ffa7..56968849c6 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -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.', 'protectedpagewarning' => "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]].", 'templatesused' => 'Templates used on this page:', +'edittools' => '', # History pages # diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 851fabf408..72540d8f03 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -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;