Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/168413
Change subject: Update Metrolook ...................................................................... Update Metrolook * Fixes images and also renames path for overflow.js in MetrolookTemplate.php Change-Id: Id871ae5a2c0ca15ca472466b27656cca3e5c97da --- M Metrolook.php M MetrolookTemplate.php M README.md M overthrow.js 4 files changed, 40 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/13/168413/1 diff --git a/Metrolook.php b/Metrolook.php index 00bf07f..ac1283b 100644 --- a/Metrolook.php +++ b/Metrolook.php @@ -25,7 +25,7 @@ 'path' => __FILE__, 'name' => 'Metrolook', 'description' => 'Metrolook skin for MediaWiki.', - 'version' => '3.0 beta 6', + 'version' => '3.0 beta 9', 'url' => 'https://www.mediawiki.org/wiki/Skin:Metrolook', 'author' => array( 'immewnity', 'paladox2015', 'Craig Davison', 'lagleki' ), 'license-name' => 'GPLv2+', @@ -94,8 +94,6 @@ $GLOBALS['UploadButton'] = true; $GLOBALS['logo'] = false; - -$GLOBALS['transparent'] = __DIR__ . '/images/Transparent.gif'; // Register modules $GLOBALS['wgResourceModules']['skins.metrolook.styles'] = array( diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index 4e4cd29..3959c65 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -230,9 +230,7 @@ }); }); </script> -<script src="skins/Metrolook/overthrow.js"></script> -<script src="/skins/Metrolook/overthrow.js"></script> -<script src="../skins/Metrolook/overthrow.js"></script> +<script src="<?php echo htmlspecialchars( $this->getSkin()->getSkinStylePath( 'overthrow.js' ) ) ?>"></script> <div id="mw-page-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div> <div id="content" class="mw-body" class="overthrow" role="main"> @@ -384,7 +382,7 @@ else { echo htmlspecialchars( $this->getSkin()->getUser()->getName() ); } - ?><span style="word-spacing:4px;"> </span><img class="custom4" style="position:relative;top:0.4em;" src="<?php echo $transparent ?>" onerror='this.onerror = null; this.src="/skins/Metrolook/images/Transparent.gif"' /></span></a> + ?><span style="word-spacing:4px;"> </span><img class="custom4" style="position:relative;top:0.4em;" src="<?php echo htmlspecialchars( $this->getSkin()->getSkinStylePath( 'images/Transparent.gif' ) ) ?>" /></span></a> <div class="menu" style="position:absolute;top:40px;right:0px;margin:0;width:200px;"> <?php $this->renderNavigation( 'PERSONAL' ); ?> </div> @@ -396,7 +394,7 @@ ?> </ul> </div> -<?php if ( $logo ): ?><div style="padding-left:10px;"><div class="lighthover" style="height:40px;float:left;"><div class="onhoverbg" style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>"><img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 65px;height:auto; max-height:36px; display: inline-block; vertical-align:middle; padding-right:5px; padding-left:5px;"></div></h4></a><?php else: ?><div style="padding-left:10px;"><div class="lighthover" style="height:40px;float:left;"><div class="onhoverbg" style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>"><div class="title-name" style="font-size: 0.9em; padding-left:0.4em;padding-right:0.4em;color:white;max-width: auto;height:auto; max-height:700px; display: inline-block; vertical-align:middle;"><?php echo $GLOBALS['wgSitename'] ?></div></a></h4></div><?php endif; ?><img class="custom2" src="<?php echo $transparent ?>" onerror='this.onerror = null; this.src="/skins/Metrolook/images/Transparent.gif"' style="float:left;" /><?php if ( $DownArrow ): ?><img class="custom3" src="<?php echo $transparent ?>" onerror='this.onerror = null; this.src="/skins/Metrolook/images/Transparent.gif"' style="height:60px;width:27px;cursor:pointer;" onclick="toggleDiv('bartile');"/><?php else: ?><?php endif; ?></div></div> +<?php if ( $logo ): ?><div style="padding-left:10px;"><div class="lighthover" style="height:40px;float:left;"><div class="onhoverbg" style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>"><img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 65px;height:auto; max-height:36px; display: inline-block; vertical-align:middle; padding-right:5px; padding-left:5px;"></div></h4></a><?php else: ?><div style="padding-left:10px;"><div class="lighthover" style="height:40px;float:left;"><div class="onhoverbg" style="height:40px;float:left;"><h4 class="title-name"><a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>"><div class="title-name" style="font-size: 0.9em; padding-left:0.4em;padding-right:0.4em;color:white;max-width: auto;height:auto; max-height:700px; display: inline-block; vertical-align:middle;"><?php echo $GLOBALS['wgSitename'] ?></div></a></h4></div><?php endif; ?><img class="custom2" src="<?php echo htmlspecialchars( $this->getSkin()->getSkinStylePath( 'images/Transparent.gif' ) ) ?>" style="float:left;" /><?php if ( $DownArrow ): ?><img class="custom3" src="<?php echo htmlspecialchars( $this->getSkin()->getSkinStylePath( 'images/Transparent.gif' ) ) ?>" style="height:60px;width:27px;cursor:pointer;" onclick="toggleDiv('bartile');"/><?php else: ?><?php endif; ?></div></div> <?php if ( $DownArrow ): ?> <div id="top-tile-bar" class="fixed-position"> @@ -412,7 +410,7 @@ <?php else: ?> <?php endif; ?> <div id="left-navigation"> - <?php if ( $UploadButton ): ?><a href="<?php echo $this->data['nav_urls']['upload']['href']; ?>"><div class="onhoverbg" style="padding-left:0.8em;padding-right:0.8em;float:left;height:40px;font-size:10pt;"><img class="custom" src="<?php echo $transparent ?>" onerror='this.onerror = null; this.src="/skins/Metrolook/images/Transparent.gif"' /> <span style="color:#fff;position:relative;top:3px; "><?php $this->msg('uploadbtn') ?></span></div></a><?php else: ?><?php endif; ?><?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS', 'VIEWS', 'ACTIONS' ) ); ?> + <?php if ( $UploadButton ): ?><a href="<?php echo $this->data['nav_urls']['upload']['href']; ?>"><div class="onhoverbg" style="padding-left:0.8em;padding-right:0.8em;float:left;height:40px;font-size:10pt;"><img class="custom" src="<?php echo htmlspecialchars( $this->getSkin()->getSkinStylePath( 'images/Transparent.gif' ) ) ?>" /> <span style="color:#fff;position:relative;top:3px; "><?php $this->msg('uploadbtn') ?></span></div></a><?php else: ?><?php endif; ?><?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS', 'VIEWS', 'ACTIONS' ) ); ?> </div> <div id="right-navigation"> <?php if ( $SearchBar ): ?> diff --git a/README.md b/README.md index 880dbb8..e37c511 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Please be aware that there are issues in the codes if you see any could you point it out it would help. and there are things like logos already set sorry i will put a setting there. -A working demo of the skin is available at http://pidgi.net/metrolooktest/index.php/Main_Page . This is currently using MediaWiki 1.24wmf18 and version 2.3 of the master branch of the skin. +A working demo of the skin is available at http://pidgi.net/metrolooktest/index.php/Main_Page . This is currently using MediaWiki 1.25wmf3 and version 3.0 beta 6 of the master branch of the skin. ## Installation diff --git a/overthrow.js b/overthrow.js index c4545b8..d54e6a7 100644 --- a/overthrow.js +++ b/overthrow.js @@ -1,5 +1,5 @@ -/*! overthrow - An overflow:auto polyfill for responsive design. - v0.6.6 - 2013-10-25 -* Copyright (c) 2013 Scott Jehl, Filament Group, Inc.; Licensed MIT */ +/*! overthrow - An overflow:auto polyfill for responsive design. - v0.7.0 - 2014-04-11 +* Copyright (c) 2014 Scott Jehl, Filament Group, Inc.; Licensed MIT */ /*! Overthrow. An overflow:auto polyfill for responsive design. (c) 2012: Scott Jehl, Filament Group, Inc. http://filamentgroup.github.com/Overthrow/license.txt */ (function( w, undefined ){ @@ -101,7 +101,7 @@ if( o === undefined ){ return; } - + // Easing can use any of Robert Penner's equations (http://www.robertpenner.com/easing_terms_of_use.html). By default, overthrow includes ease-out-cubic // arguments: t = current iteration, b = initial value, c = end value, d = total iterations // use w.overthrow.easing to provide a custom function externally, or pass an easing function as a callback to the toss method @@ -114,15 +114,15 @@ // Keeper of intervals var timeKeeper; - + /* toss scrolls and element with easing - + // elem is the element to scroll // options hash: * left is the desired horizontal scroll. Default is "+0". For relative distances, pass a string with "+" or "-" in front. * top is the desired vertical scroll. Default is "+0". For relative distances, pass a string with "+" or "-" in front. * duration is the number of milliseconds the throw will take. Default is 100. - * easing is an optional custom easing function. Default is w.overthrow.easing. Must follow the easing function signature + * easing is an optional custom easing function. Default is w.overthrow.easing. Must follow the easing function signature */ o.toss = function( elem, options ){ @@ -135,10 +135,11 @@ top: "+0", left: "+0", duration: 50, - easing: o.easing + easing: o.easing, + finished: function() {} }, - endLeft, endTop; - + endLeft, endTop, finished = false; + // Mixin based on predefined defaults if( options ){ for( var j in op ){ @@ -147,7 +148,7 @@ } } } - + // Convert relative values to ints // First the left val if( typeof op.left === "string" ){ @@ -168,9 +169,9 @@ endTop = op.top; op.top = op.top - sTop; } - + o.tossing = true; - timeKeeper = setInterval(function(){ + timeKeeper = setInterval(function(){ if( i++ < op.duration ){ elem.scrollLeft = op.easing( i, sLeft, op.left, op.duration ); elem.scrollTop = op.easing( i, sTop, op.top, op.duration ); @@ -178,14 +179,31 @@ else{ if( endLeft !== elem.scrollLeft ){ elem.scrollLeft = endLeft; + } else { + // if the end of the vertical scrolling has taken place + // we know that we're done here call the callback + // otherwise signal that horizontal scrolling is complete + if( finished ) { + op.finished(); + } + finished = true; } + if( endTop !== elem.scrollTop ){ elem.scrollTop = endTop; + } else { + // if the end of the horizontal scrolling has taken place + // we know that we're done here call the callback + if( finished ) { + op.finished(); + } + finished = true; } + o.intercept(); } }, 1 ); - + // Return the values, post-mixin, with end values specified return { top: endTop, left: endLeft, duration: o.duration, easing: o.easing }; }; @@ -195,8 +213,9 @@ clearInterval( timeKeeper ); o.tossing = false; }; - + })( this, this.overthrow ); + /*! Overthrow. An overflow:auto polyfill for responsive design. (c) 2012: Scott Jehl, Filament Group, Inc. http://filamentgroup.github.com/Overthrow/license.txt */ (function( w, o, undefined ){ @@ -410,4 +429,4 @@ // Auto-init w.overthrow.set(); -}( this )); \ No newline at end of file +}( this )); -- To view, visit https://gerrit.wikimedia.org/r/168413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id871ae5a2c0ca15ca472466b27656cca3e5c97da Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Metrolook Gerrit-Branch: master Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits