Set background size for thumbnail in CSS instead of JavaScript

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2017-09-28 14:39:21 +02:00
parent e29bd3b743
commit 2d709d5222
2 changed files with 3 additions and 2 deletions

View File

@ -308,6 +308,7 @@ table td.filename .thumbnail {
display: inline-block;
width: 32px;
height: 32px;
background-size: 32px;
margin-left: 9px;
margin-top: 9px;
cursor: pointer;

View File

@ -1207,12 +1207,12 @@
td.append(
'<input id="select-' + this.id + '-' + fileData.id +
'" type="checkbox" class="selectCheckBox checkbox"/><label for="select-' + this.id + '-' + fileData.id + '">' +
'<div class="thumbnail" style="background-image:url(' + icon + '); background-size: 32px;"></div>' +
'<div class="thumbnail" style="background-image:url(' + icon + ');"></div>' +
'<span class="hidden-visually">' + t('files', 'Select') + '</span>' +
'</label>'
);
} else {
td.append('<div class="thumbnail" style="background-image:url(' + icon + '); background-size: 32px;"></div>');
td.append('<div class="thumbnail" style="background-image:url(' + icon + ');"></div>');
}
var linkElem = $('<a></a>').attr({
"class": "name",