Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/88711
Change subject: Update formatting ...................................................................... Update formatting Change-Id: Icdf40302bdc35e8a19fcec442a79f724ef0be3bb --- M CachedStat.php M TwnMainPage.php M resources/css/ext.translate.mainpage.css M resources/js/ext.translate.mainpage.js M tests/phpunit/CachedStatTest.php 5 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwnMainPage refs/changes/11/88711/1 diff --git a/CachedStat.php b/CachedStat.php index 45332e4..c12a047 100644 --- a/CachedStat.php +++ b/CachedStat.php @@ -75,6 +75,7 @@ if ( !is_array( $value ) ) { if ( $this->onMiss !== 'update' ) { CachedStatJob::newJob( $this )->insert(); + return null; } else { return $this->doUpdate(); diff --git a/TwnMainPage.php b/TwnMainPage.php index 1f2da2a..950c33c 100644 --- a/TwnMainPage.php +++ b/TwnMainPage.php @@ -50,7 +50,7 @@ $dir = new RecursiveDirectoryIterator( __DIR__ . '/tests/phpunit' ); $ite = new RecursiveIteratorIterator( $dir ); $matches = new RegexIterator( $ite, '/.*Test\.php/', RegexIterator::GET_MATCH ); - foreach( $matches as $file ) { + foreach ( $matches as $file ) { $files = array_merge( $files, $file ); } diff --git a/resources/css/ext.translate.mainpage.css b/resources/css/ext.translate.mainpage.css index 2f6724c..b84c4e6 100644 --- a/resources/css/ext.translate.mainpage.css +++ b/resources/css/ext.translate.mainpage.css @@ -95,7 +95,7 @@ .stats-tile { background-color: #3366BB; - background-color: rgba(51,102,187,0.9); + background-color: rgba(51, 102, 187, 0.9); color: white; height: 130px; margin: auto; @@ -124,7 +124,7 @@ } .unused.stats-tile { - background-color: rgba(51,102,187,0.3); + background-color: rgba(51, 102, 187, 0.3); } .stats-number { @@ -152,7 +152,6 @@ .main-widget label { font-size: 16px; } - .main-widget .row input { padding: 6px; @@ -584,6 +583,7 @@ cursor: pointer; font-size: 14px; } + .same-language-uls-trigger:hover { border-color: #AAAAAA; } diff --git a/resources/js/ext.translate.mainpage.js b/resources/js/ext.translate.mainpage.js index 8f80ade..4d8e13c 100644 --- a/resources/js/ext.translate.mainpage.js +++ b/resources/js/ext.translate.mainpage.js @@ -48,11 +48,11 @@ /** * Show the message group stats bars. */ - function showMessageGroupStats ( language ) { + function showMessageGroupStats( language ) { var $tiles = $( '.project-tile' ); // Clear current numbers first so they don't stay if something goes wrong - $tiles.each( function() { + $tiles.each( function () { var $tile = $( this ); $tile.find( '.project-statsbar' ).empty().removeData( 'languagestatsbar' ); $tile.find( '.project-statstext' ).empty(); @@ -66,7 +66,7 @@ } ); mw.translate.loadLanguageStats( language ).done( function () { - $tiles.each( function() { + $tiles.each( function () { var $tile = $( this ), translated, proofread, $statsbar = $tile.find( '.project-statsbar' ), @@ -96,7 +96,7 @@ .append( $( '<span>' ).addClass( 'translate' ) .text( mw.msg( 'percent', Math.round( translated ) ) ), - $( '<span>' ).addClass('proofread') + $( '<span>' ).addClass( 'proofread' ) .text( mw.msg( 'percent', Math.round( proofread ) ) ) ); } ); @@ -106,7 +106,7 @@ /** * Setup the project tiles in the main page. */ - function setupProjectTiles () { + function setupProjectTiles() { var language = mw.config.get( 'wgUserLanguage' ), $selector, $tiles = $( '.project-tile' ); @@ -175,7 +175,7 @@ $tiles.eq( 7 ).replaceWith( $selector ); } - function signupLanguageSelector () { + function signupLanguageSelector() { $( '.signup-language-selector' ).uls( { onSelect: function ( language ) { if ( $( '#language-' + language ).length ) { diff --git a/tests/phpunit/CachedStatTest.php b/tests/phpunit/CachedStatTest.php index 0973e02..7aef54c 100644 --- a/tests/phpunit/CachedStatTest.php +++ b/tests/phpunit/CachedStatTest.php @@ -60,7 +60,6 @@ $cacher->setCache( $stub ); $this->assertEquals( null, $cacher->get() ); } - } class NullUpdater { -- To view, visit https://gerrit.wikimedia.org/r/88711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icdf40302bdc35e8a19fcec442a79f724ef0be3bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwnMainPage Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits