r90873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90872‎ | r90873 | r90874 >
Date:12:57, 27 June 2011
Author:janpaul123
Status:ok
Tags:
Comment:
Added gallery height attribute
Modified paths:
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js (modified) (history)
  • /trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js
@@ -343,6 +343,7 @@
344344 gallery: {
345345 imageList: [ 'Cucciolo gatto Bibo.jpg', 'Kitten (06) by Ron.jpg', 'Kitten-stare.jpg', 'Red Kitten 01.jpg', 'Kitten in a helmet.jpg', 'Cute grey kitten.jpg' ],
346346 width: 145,
 347+ height: 150,
347348 number: 3
348349 },
349350 icon: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiLove/modules/ext.wikiLove/images/icons/wikilove-icon-kitten.png'
Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
@@ -477,7 +477,8 @@
478478 'prop' : 'imageinfo',
479479 'iiprop' : 'mime|url',
480480 'titles' : titles,
481 - 'iiurlwidth' : currentTypeOrSubtype.gallery.width
 481+ 'iiurlwidth' : currentTypeOrSubtype.gallery.width,
 482+ 'iiurlheight' : currentTypeOrSubtype.gallery.height
482483 },
483484 dataType: 'json',
484485 type: 'POST',
@@ -494,10 +495,9 @@
495496
496497 $.each( data.query.pages, function( id, page ) {
497498 if ( page.imageinfo && page.imageinfo.length ) {
498 - // build an image tag with the correct url and width
 499+ // build an image tag with the correct url
499500 var $img = $( '<img/>' )
500501 .attr( 'src', page.imageinfo[0].thumburl )
501 - .attr( 'width', currentTypeOrSubtype.gallery.width )
502502 .hide()
503503 .load( function() {
504504 $( this ).css( 'display', 'inline-block' );

Status & tagging log