diff options
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r-- | apps/files/js/files.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index b11ef03eab2..314b8bf39c6 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -369,19 +369,22 @@ var createDragShadow = function(event) { var dir = FileList.getCurrentDirectory(); $(selectedFiles).each(function(i,elem) { + // TODO: refactor this with the table row creation code var newtr = $('<tr/>') .attr('data-dir', dir) .attr('data-file', elem.name) .attr('data-origin', elem.origin); - newtr.append($('<td/>').addClass('filename').text(elem.name)); - newtr.append($('<td/>').addClass('size').text(OC.Util.humanFileSize(elem.size))); + newtr.append($('<td class="filename" />').text(elem.name).css('background-size', 32)); + newtr.append($('<td class="size" />').text(OC.Util.humanFileSize(elem.size))); tbody.append(newtr); if (elem.type === 'dir') { - newtr.find('td.filename').attr('style','background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')'); + newtr.find('td.filename') + .css('background-image', 'url(' + OC.imagePath('core', 'filetypes/folder.png') + ')'); } else { var path = dir + '/' + elem.name; OCA.Files.App.files.lazyLoadPreview(path, elem.mime, function(previewpath) { - newtr.find('td.filename').attr('style','background-image:url('+previewpath+')'); + newtr.find('td.filename') + .css('background-image', 'url(' + previewpath + ')'); }, null, null, elem.etag); } }); |