From: Brion Vibber Date: Fri, 11 Jul 2003 21:41:11 +0000 (+0000) Subject: try to make multiple onloads friendlier to each other X-Git-Tag: 1.1.0~402 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=f6709ba197c6dd4db7605ae891e75f44d7514b98;p=lhc%2Fweb%2Fwiklou.git try to make multiple onloads friendlier to each other --- diff --git a/includes/Skin.php b/includes/Skin.php index 862c1ac714..2531455b9f 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -140,7 +140,12 @@ class Skin { } if($action=="edit") { # set focus in edit box - $a += array("onLoad"=>"document.editform.wpTextbox1.focus()"); + $foc = "document.editform.wpTextbox1.form1.focus()"; + if($a['onload']) { + $a['onload'] .= ";$foc"; + } else { + $a['onload'] = $foc; + } } return $a; } diff --git a/includes/SkinStandard.php b/includes/SkinStandard.php index df96a00166..ee309d4e65 100644 --- a/includes/SkinStandard.php +++ b/includes/SkinStandard.php @@ -51,7 +51,12 @@ class SkinStandard extends Skin { $a = parent::getBodyOptions(); if ( 3 == $this->qbSetting() ) { # Floating left - $a["onload"] = "setup(\"quickbar\")"; + $qb = "setup(\"quickbar\")"; + if($a["onload"]) { + $a["onload"] .= ";$qb"; + } else { + $a["onload"] = $qb; + } } return $a; }