From: Trevor Parscal Date: Mon, 13 Jul 2009 22:48:47 +0000 (+0000) Subject: Fixed bug caused in r52944 - where the inclusion of csshover.htc was lost in the... X-Git-Tag: 1.31.0-rc.0~40968 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=db3a1ac1443a83db67c4eedbc4ff2455f545c02c;p=lhc%2Fweb%2Fwiklou.git 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. --- 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