From f6709ba197c6dd4db7605ae891e75f44d7514b98 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 11 Jul 2003 21:41:11 +0000 Subject: [PATCH] try to make multiple onloads friendlier to each other --- includes/Skin.php | 7 ++++++- includes/SkinStandard.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) 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; } -- 2.20.1