From: Brian Wolff Date: Mon, 24 Aug 2015 04:43:15 +0000 (-0600) Subject: Fix classname mismatch between upload js and templates/thumbnail.html X-Git-Tag: 1.31.0-rc.0~10299^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=25cda1d8a3c1c9e59ca901e12d0df8b7171e396e;p=lhc%2Fweb%2Fwiklou.git Fix classname mismatch between upload js and templates/thumbnail.html Classname was changed to use newer jQuery library, but js was still hardcoding the old classname. This resulted in the preview of the to be uploaded file, not to be shown. I added an html comment to the template file to warn future modifies about the dependency. I'm not sure if html comments in template files are considered "appropriate". Bug: T109952 Change-Id: I098a86260453d32644ff9ab06194c13998643de9 Follow-up: 6a70cc6968a3780c0b118e07f02f5ef015e655bb --- diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js b/resources/src/mediawiki.special/mediawiki.special.upload.js index ea1eb99260..7dd0369eb5 100644 --- a/resources/src/mediawiki.special/mediawiki.special.upload.js +++ b/resources/src/mediawiki.special/mediawiki.special.upload.js @@ -369,7 +369,7 @@ ctx.clearRect( 0, 0, 180, 180 ); ctx.rotate( rotation / 180 * Math.PI ); ctx.drawImage( img, x, y, width, height ); - thumb.find( '.mw-small-spinner' ).replaceWith( $canvas ); + thumb.find( '.mw-spinner-small' ).replaceWith( $canvas ); // Image size info = mw.msg( 'widthheight', logicalWidth, logicalHeight ) + diff --git a/resources/src/mediawiki.special/templates/thumbnail.html b/resources/src/mediawiki.special/templates/thumbnail.html index 4f41fad551..305f20c6ea 100644 --- a/resources/src/mediawiki.special/templates/thumbnail.html +++ b/resources/src/mediawiki.special/templates/thumbnail.html @@ -1,5 +1,6 @@
+