From db3a1ac1443a83db67c4eedbc4ff2455f545c02c Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Mon, 13 Jul 2009 22:48:47 +0000 Subject: [PATCH] Fixed bug caused in r52944 - where the inclusion of csshover.htc was lost in the move towards $wgOut->headElement(). Also, simplified the LTR/RTL inclusion - bringing the logic into the output page object. --- skins/Vector.php | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/skins/Vector.php b/skins/Vector.php index ede7eaddd6..9ac919e7e0 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -24,28 +24,25 @@ class SkinVector extends SkinTemplate { * @param object $out Output page object to initialize */ public function initPage( OutputPage $out ) { + global $wgStylePath; + parent::initPage( $out ); $this->skinname = 'vector'; $this->stylename = 'vector'; $this->template = 'VectorTemplate'; + + // Append skin-specific styles + $out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' ); + $out->addStyle( 'vector/main-ltr.css', 'screen', '', 'ltr' ); + // Append CSS which includes IE only behavior fixes for hover support - + // this is better than including this in a CSS fille since it doesn't + // wait for the CSS file to load before fetching the HTC file. + $out->addScript( + '' + ); } - - /** - * Defines CSS files to be included - * @param object $out Output page to add styles to - */ - public function setupSkinUserCss( OutputPage $out ) { - global $wgContLang; - // Append to the default screen common & print styles... - if ( $wgContLang->isRTL() ) { - $out->addStyle( 'vector/main-rtl.css', 'screen' ); - } else { - $out->addStyle( 'vector/main-ltr.css', 'screen' ); - } - // Add common styles - parent::setupSkinUserCss( $out ); - } - /** * Builds a structured array of links used for tabs and menus * @return array -- 2.20.1