Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/176616
Change subject: Version 1.0.6 -- fixed for MW 1.24 ...................................................................... Version 1.0.6 -- fixed for MW 1.24 Change-Id: I514fcf5226c9f1bb995ff5610d521ad068e4558c --- M Gamepress.php M Gamepress.skin.php M resources/css/style.css M resources/js/gamepress.js 4 files changed, 22 insertions(+), 97 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Gamepress refs/changes/16/176616/1 diff --git a/Gamepress.php b/Gamepress.php index 0e4b39f..8a8a00f 100644 --- a/Gamepress.php +++ b/Gamepress.php @@ -6,7 +6,7 @@ * @ingroup Skins * @author Aleksandra Łączek * @author Jack Phoenix <[email protected]> -- MediaWiki port - * @date 16 January 2014 + * @date 30 November 2014 * @see http://wordpress.org/themes/gamepress * @see http://wp-themes.com/gamepress/ * @@ -23,7 +23,7 @@ $wgExtensionCredits['skin'][] = array( 'path' => __FILE__, 'name' => 'Gamepress', - 'version' => '1.0.5', + 'version' => '1.0.6', 'author' => array( '[http://webtuts.pl/themes/ Aleksandra Łączek]', 'Jack Phoenix' ), 'description' => 'Easy-to-use gaming-oriented skin', 'url' => 'https://www.mediawiki.org/wiki/Skin:Gamepress', @@ -35,17 +35,13 @@ // *this* file. $wgValidSkinNames['gamepress'] = 'Gamepress'; -// Autoload the skin class, make it a valid skin, set up i18n, set up CSS & JS -// (via ResourceLoader) +// Autoload the skin class, set up i18n, set up CSS & JS (via ResourceLoader) $wgAutoloadClasses['SkinGamepress'] = __DIR__ . '/Gamepress.skin.php'; $wgMessagesDirs['SkinGamepress'] = __DIR__ . '/i18n'; + $wgResourceModules['skins.gamepress'] = array( 'styles' => array( 'skins/Gamepress/resources/css/reset.css' => array( 'media' => 'screen' ), - // MonoBook also loads these - 'skins/common/commonElements.css' => array( 'media' => 'screen' ), - 'skins/common/commonContent.css' => array( 'media' => 'screen' ), - 'skins/common/commonInterface.css' => array( 'media' => 'screen' ), // Styles custom to the Gamepress skin 'skins/Gamepress/resources/css/style.css' => array( 'media' => 'screen' ), 'skins/Gamepress/resources/css/dark.css' => array( 'media' => 'screen' ) diff --git a/Gamepress.skin.php b/Gamepress.skin.php index 7b62b00..5122ebc 100644 --- a/Gamepress.skin.php +++ b/Gamepress.skin.php @@ -9,7 +9,7 @@ * @ingroup Skins */ class SkinGamepress extends SkinTemplate { - var $skinname = 'gamepress', $stylename = 'gamepress', + public $skinname = 'gamepress', $stylename = 'gamepress', $template = 'GamepressTemplate', $useHeadElement = true; /** @@ -19,7 +19,11 @@ parent::setupSkinUserCss( $out ); // Load CSS via ResourceLoader - $out->addModuleStyles( 'skins.gamepress' ); + $out->addModuleStyles( array( + 'mediawiki.skinning.interface', + 'mediawiki.skinning.content.externallinks', + 'skins.gamepress' + ) ); // CSS fixes for older Internet Explorers $out->addStyle( 'Gamepress/resources/css/style_ie.css', 'screen', 'IE' ); @@ -227,7 +231,7 @@ } echo '<span class="alignleft">'; - + foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?> <div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico"> <?php @@ -238,7 +242,7 @@ </div> <?php } - + $i = 0; $footerLen = count( $validFooterLinks ); @@ -345,7 +349,7 @@ foreach ( $this->getToolbox() as $key => $tbItem ) { echo $this->makeListItem( $key, $tbItem ); } - wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) ); + wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true ) ); ?> </ul> diff --git a/resources/css/style.css b/resources/css/style.css index 1d7ff85..8eb4834 100644 --- a/resources/css/style.css +++ b/resources/css/style.css @@ -1896,74 +1896,6 @@ margin: 5px; } -/* -** keep the whitespace in front of the ^=, hides rule from Konqueror -** this is CSS 3, the validator doesn't like it when validating as CSS 2 -*/ -div#content article a.external, -div#content article a.external[href ^="gopher://"] { - /* @embed */ - background: url(../../../monobook/external-ltr.png) center right no-repeat; - padding-right: 13px; -} -div#content article a.external[href ^="https://"], -.link-https { - /* @embed */ - background: url(../../../monobook/lock_icon.gif) center right no-repeat; - padding-right: 16px; -} -div#content article a.external[href ^="mailto:"], -.link-mailto { - /* @embed */ - background: url(../../../monobook/mail_icon.gif) center right no-repeat; - padding-right: 18px; -} -div#content article a.external[href ^="news://"] { - /* @embed */ - background: url(../../../monobook/news_icon.png) center right no-repeat; - padding-right: 18px; -} -div#content article a.external[href ^="ftp://"], -.link-ftp { - /* @embed */ - background: url(../../../monobook/file_icon.gif) center right no-repeat; - padding-right: 18px; -} -div#content article a.external[href ^="irc://"], -.link-irc { - /* @embed */ - background: url(../../../monobook/discussionitem_icon.gif) center right no-repeat; - padding-right: 18px; -} -div#content article a.external[href $=".ogg"], div#content article a.external[href $=".OGG"], -div#content article a.external[href $=".mid"], div#content article a.external[href $=".MID"], -div#content article a.external[href $=".midi"], div#content article a.external[href $=".MIDI"], -div#content article a.external[href $=".mp3"], div#content article a.external[href $=".MP3"], -div#content article a.external[href $=".wav"], div#content article a.external[href $=".WAV"], -div#content article a.external[href $=".wma"], div#content article a.external[href $=".WMA"], -.link-audio { - /* @embed */ - background: url("../../../monobook/audio.png") center right no-repeat; - padding-right: 13px; -} -div#content article a.external[href $=".ogm"], div#content article a.external[href $=".OGM"], -div#content article a.external[href $=".avi"], div#content article a.external[href $=".AVI"], -div#content article a.external[href $=".mpeg"], div#content article a.external[href $=".MPEG"], -div#content article a.external[href $=".mpg"], div#content article a.external[href $=".MPG"], -.link-video { - /* @embed */ - background: url("../../../monobook/video.png") center right no-repeat; - padding-right: 13px; -} -div#content article a.external[href $=".pdf"], div#content article a.external[href $=".PDF"], -div#content article a.external[href *=".pdf#"], div#content article a.external[href *=".PDF#"], -div#content article a.external[href *=".pdf?"], div#content article a.external[href *=".PDF?"], -.link-document { - /* @embed */ - background: url("../../../monobook/document.png") center right no-repeat; - padding-right: 12px; -} - /* Diffs */ table.diff { background-color: transparent; @@ -2021,10 +1953,6 @@ .clearfix { display: inline-block; } - -/* Hides from IE-mac \*/ -* html .clearfix { height: 1%; } -/* End hide from IE-mac */ /** PollNY */ div.create-poll-top { diff --git a/resources/js/gamepress.js b/resources/js/gamepress.js index 31dc99f..ec9432b 100644 --- a/resources/js/gamepress.js +++ b/resources/js/gamepress.js @@ -76,17 +76,6 @@ } /** - * Fix menu hover on IE < 7.0 - */ - if ( $.browser.msie && $.browser.version.substr( 0, 1 ) < 7 ) { - /*$('li').has('ul').mouseover(function() { - $(this).children('ul').css('visibility', 'visible'); - }).mouseout(function() { - $(this).children('ul').css('visibility', 'hidden'); - })*/ - }; - - /** * Fallback for browsers without CSS transitions */ if ( !Modernizr.csstransitions ) { @@ -133,7 +122,15 @@ /** * Fallback for browsers without content: css attribute */ - if ( !Modernizr.generatedcontent || ( $.browser.msie && $.browser.version.substr( 0, 1 ) == '8' ) ) { + var ieVersion = 0; + var clientPC = navigator.userAgent.toLowerCase(); // Get client info + if ( /msie (\d+\.\d+);/.test( clientPC ) ) { // test for MSIE x.x; + ieVersion = ( new Number( RegExp.$1 ) ); // capture x.x portion and store as a number + } + + if ( + !Modernizr.generatedcontent || + ( /msie (\d+\.\d+);/.test( clientPC ) /* test for MSIE x.x */ && ieVersion == 8 ) ) { $( '#primary-nav ul li:first-child > a, #primary-nav ul ul li:first-child > a' ).before( $( '<span/>' ).addClass( 'before' ) ); $( '.img-bevel' ).before( '<span class="before-img-bevel-fix"></span>' ); } -- To view, visit https://gerrit.wikimedia.org/r/176616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I514fcf5226c9f1bb995ff5610d521ad068e4558c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Gamepress Gerrit-Branch: master Gerrit-Owner: Jack Phoenix <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
