Hoo man has uploaded a new change for review.
https://gerrit.wikimedia.org/r/278433
Change subject: Use https when including thumbs from commons
......................................................................
Use https when including thumbs from commons
Also avoid string concat for creating html with jQuery.
The removed </div> after <img …> was there by error and
got ignored by jQuery anyway.
Change-Id: Id079acce663fec20604d865ce67caa89d2d58dc6
---
M wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui
refs/changes/33/278433/1
diff --git a/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
b/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
index 6d17020..7a2131f 100644
--- a/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
@@ -7,7 +7,7 @@
"use strict";
var COMMONS_FILE_PATH =
"http://commons.wikimedia.org/wiki/Special:FilePath/";
- var COMMONS_SPECIAL_RESIZE =
"http://commons.wikimedia.org/wiki/Special:FilePath/";
+ var COMMONS_SPECIAL_RESIZE =
"https://commons.wikimedia.org/wiki/Special:FilePath/";
/**
* A result browser for images
@@ -62,10 +62,14 @@
* @private
**/
SELF.prototype._getItem = function( thumbnailUrl, url, title, row ) {
- var $image = $( '<a href="' + url +'" data-gallery="g">' )
+ var $image = $( '<a data-gallery="g">' )
.click( this._getFormatter().handleCommonResourceItem )
.attr( 'data-title', title )
- .append( $( '<img src="' + thumbnailUrl +'"></div>' ) ),
+ .attr( 'href', url )
+ .append(
+ $( '<img>' )
+ .attr( 'src', thumbnailUrl )
+ ),
$summary = this._getFormatter().formatRow( row );
return $( '<div class="item">' ).append( $image, $summary );
--
To view, visit https://gerrit.wikimedia.org/r/278433
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id079acce663fec20604d865ce67caa89d2d58dc6
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits