$editsummary="{$summary}: <input tabindex=3 type=text value=\"{$wpSummary}\" name=\"wpSummary\" maxlength=200 size=60><br>";
}
+ $wgOut->setOnloadHandler( "document.editform.wpTextbox1.focus()" );
$wgOut->addHTML( "
<form id=\"editform\" name=\"editform\" method=\"post\" action=\"$action\"
enctype=\"application/x-www-form-urlencoded\">
var $mDTopen, $mLastSection; # Used for processing DL, PRE
var $mLanguageLinks, $mSupressQuickbar;
+ var $mOnloadHandler;
function OutputPage()
{
$this->mKeywords = $this->mLinktags = array();
$this->mHTMLtitle = $this->mPagetitle = $this->mBodytext =
$this->mLastSection = $this->mRedirect = $this->mLastModified =
- $this->mSubtitle = $this->mDebugtext = $this->mRobotpolicy = "";
+ $this->mSubtitle = $this->mDebugtext = $this->mRobotpolicy =
+ $this->mOnloadHandler = "";
$this->mIsarticle = $this->mPrintable = true;
$this->mSupressQuickbar = $this->mDTopen = $this->mPrintable = false;
$this->mLanguageLinks = array();
function isArticle() { return $this->mIsarticle; }
function setPrintable() { $this->mPrintable = true; }
function isPrintable() { return $this->mPrintable; }
+ function setOnloadHandler( $js ) { $this->mOnloadHandler = $js; }
+ function getOnloadHandler() { return $this->mOnloadHandler; }
function getLanguageLinks() {
global $wgTitle, $wgLanguageCode;
$a += array ("ondblclick" => $s);
}
- if($action=="edit") { # set focus in edit box
- $foc = "document.editform.wpTextbox1.focus()";
- if($a['onload']) {
- $a['onload'] .= ";$foc";
- } else {
- $a['onload'] = $foc;
- }
- }
+ $a['onload'] = $wgOut->getOnloadHandler();
return $a;
}