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:
parent
e29bd3b743
commit
2d709d5222
|
@ -308,6 +308,7 @@ table td.filename .thumbnail {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
background-size: 32px;
|
||||||
margin-left: 9px;
|
margin-left: 9px;
|
||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -1207,12 +1207,12 @@
|
||||||
td.append(
|
td.append(
|
||||||
'<input id="select-' + this.id + '-' + fileData.id +
|
'<input id="select-' + this.id + '-' + fileData.id +
|
||||||
'" type="checkbox" class="selectCheckBox checkbox"/><label for="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>' +
|
'<span class="hidden-visually">' + t('files', 'Select') + '</span>' +
|
||||||
'</label>'
|
'</label>'
|
||||||
);
|
);
|
||||||
} else {
|
} 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({
|
var linkElem = $('<a></a>').attr({
|
||||||
"class": "name",
|
"class": "name",
|
||||||
|
|
Loading…
Reference in New Issue