Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/382690 )

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(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/90/382690/1

diff --git a/includes/api/BSApiFileBackendStore.php 
b/includes/api/BSApiFileBackendStore.php
index a42035b..5b3d43a 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 47977d6..3fef627 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/382690
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50bcebd79a89900ab2bd10221096a65d29f15370
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: ItSpiderman <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to