r86745 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86744‎ | r86745 | r86746 >
Date:01:38, 23 April 2011
Author:neilk
Status:ok
Tags:
Comment:
standardizing on single thumbnail size, using layout similar to first page on description page
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)
  • /trunk/extensions/UploadWizard/resources/uploadWizard.css (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/uploadWizard.css
@@ -15,15 +15,6 @@
1616 max-width: 900px; /* wild guess */
1717 }
1818
19 -/*
20 -.upload-section {
21 - padding: 1em;
22 - margin-bottom: 0.5em;
23 - margin-top: 0.5em;
24 - border: 1px solid #e0e0e0;
25 -}
26 -*/
27 -
2819 #mwe-upwiz-steps {
2920 background-color: white;
3021 background-image: none;
@@ -177,16 +168,18 @@
178169
179170 .mwe-upwiz-file-preview {
180171 float: left;
181 - height: 40px;
182 - width: 40px;
183 - margin-right: 6px;
184 - background: url('images/32px-Blank-document.svg.png') no-repeat center top;
 172+ height: 100px;
 173+ width: 100px;
 174+ padding: 0.5em;
 175+ border: 1px solid #e0e0e0;
 176+ margin-right: 1em;
 177+ background: url('images/32px-Blank-document.svg.png') no-repeat center center;
185178 }
186179
187180 .mwe-upwiz-file-preview-broken {
188 - height: 40px !important;
189 - width: 40px !important;
190 - background: url('images/32px-Blank-document-broken.svg.png') no-repeat center top !important;
 181+ height: 100px !important;
 182+ width: 100px !important;
 183+ background: url('images/32px-Blank-document-broken.svg.png') no-repeat center center !important;
191184 }
192185
193186 .mwe-upwiz-add-files-n {
@@ -353,35 +346,28 @@
354347 background: #ffffe0;
355348 }
356349
357 -.mwe-upwiz-thumbnail, .mwe-upwiz-thumbnail-small {
 350+.mwe-upwiz-thumbnail {
358351 border: 1px solid #cccccc;
359352 text-align: center;
360353 background: #ffffff;
 354+ width: 100px;
 355+ padding: 8px;
361356 }
362357
363 -.mwe-upwiz-thumbnail {
364 - padding: 0.5em;
365 - width: auto;
366 -}
367 -
368358 .mwe-upwiz-thumbnail-side {
369359 float: left;
370360 margin-bottom: 1em;
371361 margin-right: 1em;
 362+ width: 116px; /* see .mwe-upwiz-thumbnail, 100 + 8 + 8 */
372363 }
373364
374 -.mwe-upwiz-thumbnail-small {
375 - padding: 0.25em;
376 - width: 60px;
377 -}
378 -
379365 #mwe-upwiz-deeds-thumbnails {
380366 text-align: center;
381367 margin: 1em 0;
382368 background: #f0f0f0;
383369 }
384370
385 -#mwe-upwiz-deeds-thumbnails .mwe-upwiz-thumbnail-small {
 371+#mwe-upwiz-deeds-thumbnails .mwe-upwiz-thumbnail {
386372 display: inline-block;
387373 margin: 1em;
388374 vertical-align: middle;
@@ -461,11 +447,10 @@
462448 }
463449
464450 #mwe-upwiz-macro-files {
465 - margin-top: 12px;
466451 }
467452
468453 .mwe-upwiz-info-file {
469 - margin-bottom: 1em;
 454+ padding: 1em;
470455 }
471456
472457 .mwe-upwiz-details-fieldname {
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -205,14 +205,13 @@
206206 _this.ui.setStatus( 'mwe-upwiz-getting-metadata' );
207207 if ( result.upload ) {
208208 _this.extractUploadInfo( result.upload );
209 - // create the small thumbnail used on the 'upload' step
210209 _this.getThumbnail(
211210 function( image ) {
212211 // n.b. if server returns a URL, which is a 404, we do NOT get broken image
213212 _this.ui.setPreview( image ); // make the thumbnail the preview image
214213 },
215 - mw.UploadWizard.config[ 'iconThumbnailWidth' ],
216 - mw.UploadWizard.config[ 'iconThumbnailMaxHeight' ]
 214+ mw.UploadWizard.config[ 'thumbnailWidth' ],
 215+ mw.UploadWizard.config[ 'thumbnailMaxHeight' ]
217216 );
218217 // create the large thumbnail that the other thumbnails link to
219218 _this.getThumbnail(
@@ -662,11 +661,6 @@
663662 upload.deedChooser = _this.deedChooser;
664663 }
665664
666 - /* put a border below every details div except the last */
667 - if ( i < lastUploadIndex ) {
668 - upload.details.div.css( 'border-bottom', '1px solid #e0e0e0' );
669 - }
670 -
671665 // only necessary if (somehow) they have beaten the check-as-you-type
672666 upload.details.titleInput.checkUnique();
673667 } );
@@ -1343,9 +1337,9 @@
13441338 setup: function() {
13451339 var _this = this;
13461340 // add a preview on the deeds page
1347 - var thumbnailDiv = $j( '<div class="mwe-upwiz-thumbnail-small"></div>' );
 1341+ var thumbnailDiv = $j( '<div></div>' ).addClass( 'mwe-upwiz-thumbnail' );
13481342 $j( '#mwe-upwiz-deeds-thumbnails' ).append( thumbnailDiv );
1349 - _this.upload.setThumbnail( thumbnailDiv, mw.UploadWizard.config[ 'smallThumbnailWidth' ], mw.UploadWizard.config[ 'smallThumbnailMaxHeight' ] );
 1343+ _this.upload.setThumbnail( thumbnailDiv, mw.UploadWizard.config[ 'thumbnailWidth' ], mw.UploadWizard.config[ 'thumbnailMaxHeight' ] );
13501344 _this.upload.deedThumbnailDiv = thumbnailDiv;
13511345 }
13521346 };
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -20,7 +20,7 @@
2121
2222 _this.descriptions = [];
2323
24 - _this.div = $j( '<div class="mwe-upwiz-info-file ui-helper-clearfix"></div>' );
 24+ _this.div = $j( '<div class="mwe-upwiz-info-file ui-helper-clearfix filled"></div>' );
2525
2626 _this.thumbnailDiv = $j( '<div class="mwe-upwiz-thumbnail mwe-upwiz-thumbnail-side"></div>' );
2727

Follow-up revisions

RevisionCommit summaryAuthorDate
r86748should have been part of r86745 -- standardizing thumbnail size, layout acros...neilk04:30, 23 April 2011

Status & tagging log