jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/382450 )
Change subject: Fix FileRepo grid thumb view
......................................................................
Fix FileRepo grid thumb view
Thumbs in FileRepo grids (like in ExtendedFilelist) were cut-off because
of different sizes/aspect ratios.
*v2 - Does not use object-fit, works on all browsers
Needs cherry-picking to REL1_27
Change-Id: I50bcebd79a89900ab2bd10221096a65d29f15370
ERM: #6013
---
M includes/api/BSApiFileBackendStore.php
M resources/bluespice.extjs/BS/grid/FileRepo.js
2 files changed, 3 insertions(+), 3 deletions(-)
Approvals:
Robert Vogel: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/api/BSApiFileBackendStore.php
b/includes/api/BSApiFileBackendStore.php
index 0802b65..6b8c811 100644
--- a/includes/api/BSApiFileBackendStore.php
+++ b/includes/api/BSApiFileBackendStore.php
@@ -323,7 +323,7 @@
//TODO: use 'thumb.php'?
//TODO: Make thumb size a parameter
- $sThumb = $oImg->createThumb( 120 );
+ $sThumb = $oImg->createThumb( 80, 120 );
$sUrl = $oImg->getUrl();
//TODO: Remove, when SecureFileStore is finally removed
diff --git a/resources/bluespice.extjs/BS/grid/FileRepo.js
b/resources/bluespice.extjs/BS/grid/FileRepo.js
index 3ce2957..7477f04 100755
--- a/resources/bluespice.extjs/BS/grid/FileRepo.js
+++ b/resources/bluespice.extjs/BS/grid/FileRepo.js
@@ -61,7 +61,7 @@
};
var attrImg = {
src: record.get( 'file_thumbnail_url' ),
- height: '120px',
+ style: 'max-height: 100%; max-width: 100%; width: auto;
height: auto; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin:
auto;',
'data-file-width': record.get( 'file_width' ),
'data-file-height': record.get( 'file_height' )
};
@@ -70,7 +70,7 @@
if( record.get( 'file_height' ) !== 0 ) {
// thumb is an image
attr.class = 'bs-thumb-link image';
- attr.style = 'display: block; height: 120px; width:
120px;';
+ attr.style = 'display: block; height: 120px; width:
80px; position:relative';
var img = mw.html.element( 'img', attrImg );
ret = mw.html.element( 'a', attr, new mw.html.Raw( img
) );
}
--
To view, visit https://gerrit.wikimedia.org/r/382450
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I50bcebd79a89900ab2bd10221096a65d29f15370
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: ItSpiderman <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits