aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index df268fea6de..314b8bf39c6 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -195,7 +195,10 @@
/**
* Generates a preview URL based on the URL space.
- * @param urlSpec map with {x: width, y: height, file: file path}
+ * @param urlSpec attributes for the URL
+ * @param {int} urlSpec.x width
+ * @param {int} urlSpec.y height
+ * @param {String} urlSpec.file path to the file
* @return preview URL
* @deprecated used OCA.Files.FileList.generatePreviewUrl instead
*/
@@ -366,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);
}
});