http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89959
Revision: 89959
Author: neilk
Date: 2011-06-13 13:01:20 +0000 (Mon, 13 Jun 2011)
Log Message:
-----------
100x100 thumbnails (giving up on flex height)
Modified Paths:
--------------
trunk/extensions/UploadWizard/UploadWizard.config.php
trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
trunk/extensions/UploadWizard/resources/uploadWizard.css
Modified: trunk/extensions/UploadWizard/UploadWizard.config.php
===================================================================
--- trunk/extensions/UploadWizard/UploadWizard.config.php 2011-06-13
12:58:06 UTC (rev 89958)
+++ trunk/extensions/UploadWizard/UploadWizard.config.php 2011-06-13
13:01:20 UTC (rev 89959)
@@ -181,7 +181,7 @@
// Default thumbnail width
- 'thumbnailWidth' => 60,
+ 'thumbnailWidth' => 100,
// Max thumbnail height:
'thumbnailMaxHeight' => 100,
Modified: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizard.js 2011-06-13
12:58:06 UTC (rev 89958)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizard.js 2011-06-13
13:01:20 UTC (rev 89959)
@@ -609,16 +609,26 @@
} );
// add the image to the DOM, finally
- $j( selector ).html(
- $j( '<a class="mwe-upwiz-thumbnail-link"></a>'
).append(
- $j( '<img/>' )
- .attr( {
- width: parseInt(
image.width * scaling, 10 ),
- height: parseInt(
image.height * scaling, 10 ),
- src: image.src
- } )
- )
- );
+ $j( selector )
+ .css( { background: 'none' } )
+ .html(
+ $j( '<a/></a>' )
+ .addClass(
"mwe-upwiz-thumbnail-link" )
+ .append(
+ $j( '<img/>' )
+ .attr( {
+ width:
parseInt( image.width * scaling, 10 ),
+ height:
parseInt( image.height * scaling, 10 ),
+ src:
image.src
+ } )
+ .css( {
+ //'position':
'absolute',
+ //'top': '50%',
+ //'height':
height.toString() + 'px',
+ 'margin-top': (
parseInt( ( 100 - image.height * scaling ) / 2, 10 ) ).toString() + 'px'
+ } )
+ )
+ );
placed = true;
};
@@ -1465,7 +1475,7 @@
.html( $j( '<a/>' ).html(
upload.title.getMainText() ) );
var $thumbnailWrapDiv = $j( '<div></div>' ).addClass(
'mwe-upwiz-thumbnail-side' );
$thumbnailWrapDiv.append( $thumbnailDiv,
$thumbnailCaption );
- upload.setThumbnail( $thumbnailDiv );
+ upload.setThumbnail( $thumbnailDiv,
mw.UploadWizard.config[ 'thumbnailWidth' ], mw.UploadWizard.config[
'thumbnailMaxHeight' ] );
// Set the thumbnail links so that they point to the
image description page
$thumbnailWrapDiv.find( 'a' ).attr( {
Modified: trunk/extensions/UploadWizard/resources/uploadWizard.css
===================================================================
--- trunk/extensions/UploadWizard/resources/uploadWizard.css 2011-06-13
12:58:06 UTC (rev 89958)
+++ trunk/extensions/UploadWizard/resources/uploadWizard.css 2011-06-13
13:01:20 UTC (rev 89959)
@@ -162,11 +162,12 @@
.mwe-upwiz-file-preview {
float: left;
- height: 60px;
- width: 60px;
+ height: 100px;
+ width: 100px;
padding: 0.5em;
border: 1px solid #e0e0e0;
margin-right: 1em;
+ text-align: center;
/* @embed */
background: url('images/32px-Blank-document.svg.png') no-repeat center
center;
}
@@ -353,7 +354,8 @@
border: 1px solid #cccccc;
text-align: center;
background: #ffffff;
- width: 60px;
+ width: 100px;
+ height: 100px;
padding: 8px;
}
@@ -361,7 +363,7 @@
float: left;
margin-bottom: 1em;
margin-right: 1em;
- width: 76px; /* see .mwe-upwiz-thumbnail, 60 + 8 + 8 */
+ width: 116px; /* see .mwe-upwiz-thumbnail, 100 + 8 + 8 */
}
#mwe-upwiz-deeds-thumbnails {
@@ -702,3 +704,4 @@
.mwe-upwiz-details-texts {
padding: 0.5em;
}
+
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs