jenkins-bot has submitted this change and it was merged.
Change subject: Fix classname mismatch between upload js and
templates/thumbnail.html
......................................................................
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
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
M resources/src/mediawiki.special/templates/thumbnail.html
2 files changed, 2 insertions(+), 1 deletion(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index ea1eb99..7dd0369 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 4f41fad..305f20c 100644
--- a/resources/src/mediawiki.special/templates/thumbnail.html
+++ b/resources/src/mediawiki.special/templates/thumbnail.html
@@ -1,5 +1,6 @@
<div id="mw-upload-thumbnail" class="thumb tright">
<div class="thumbinner">
+ <!-- Note: Change showPreview() in mediawiki.special.upload.js
if mw-spinner-small classname changes -->
<div class="mw-spinner mw-spinner-small" style="width: 180px;
height: 180px"></div>
<div class="thumbcaption">
<div class="filename"></div>
--
To view, visit https://gerrit.wikimedia.org/r/233345
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I098a86260453d32644ff9ab06194c13998643de9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Edokter <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits