Fixes for the edit help popup link:
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 9 Jun 2004 06:59:05 +0000 (06:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 9 Jun 2004 06:59:05 +0000 (06:59 +0000)
* Now works w/ JavaScript disabled
* Doesn't override window chrome to make things unusable
* Doesn't hardcode window dimensions
* Notifies the user that it'll be a popup (new msg 'newwindow')

(The link is a popup because IE and perhaps other browsers will destroy
the edited page text if you go to another page then hit 'back'.)

includes/EditPage.php
languages/Language.php
languages/LanguageEo.php

index 06910ec..c868ac2 100644 (file)
@@ -313,10 +313,10 @@ class EditPage {
 
                $cancel = $sk->makeKnownLink( $this->mTitle->getPrefixedText(),
                  wfMsg( "cancel" ) );
-               $edithelpurl = $sk->makeUrl( wfMsg( "edithelppage" ));
-               $edithelp = '<a onclick="window.open('.
-               "'$edithelpurl', 'helpwindow', 'width=610,height=400,left=10,top=10,scrollbars=yes'".'); return false;" href="'.$edithelpurl.'">'.
-               wfMsg( "edithelp" ).'</a>';
+               $edithelpurl = $sk->makeUrl( wfMsg( 'edithelppage' ));
+               $edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
+                       htmlspecialchars( wfMsg( 'edithelp' ) ).'</a> '.
+                       htmlspecialchars( wfMsg( 'newwindow' ) );
                $copywarn = wfMsg( "copyrightwarning", $sk->makeKnownLink(
                  wfMsg( "copyrightpage" ) ) );
 
index 604bf7a..8b9185d 100644 (file)
@@ -433,6 +433,7 @@ and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] f
 'faq'                  => 'FAQ',
 "faqpage"              => "{{ns:4}}:FAQ",
 "edithelp"             => "Editing help",
+"newwindow"            => "(opens in new window)",
 "edithelppage" => "{{ns:12}}:Editing",
 'cancel'               => 'Cancel',
 'qbfind'               => 'Find',
index ad0b9c4..d06cd06 100644 (file)
@@ -182,6 +182,7 @@ $wgEditEncoding             = "x";
 "faq"                  => "Oftaj demandoj",
 "faqpage"              => "{{ns:4}}:Oftaj demandoj",
 "edithelp"             => "Helpo pri redaktado",
+"newwindow"            => "(en nova fenestro)",
 "edithelppage" => "{{ns:4}}:Kiel_redakti_paĝon", #FIXME: Kontrolu
 "cancel"               => "Nuligu",
 "qbfind"               => "Trovu",