Display thumbnails in the drive and then file picker

This commit is contained in:
yflory
2017-10-17 17:17:31 +02:00
parent e553351b79
commit 4116d08dd1
7 changed files with 96 additions and 28 deletions

View File

@@ -114,6 +114,7 @@ define([
}
var $container = $('<span>', {'class': 'cp-filepicker-content'}).appendTo($block);
// Update the files list when needed
updateContainer = function () {
$container.html('');
@@ -132,10 +133,14 @@ define([
'title': name,
}).appendTo($container);
$span.append(Cryptpad.getFileIcon(data));
$span.append(name);
$('<span>', {'class': 'cp-filepicker-content-element-name'}).text(name)
.appendTo($span);
$span.click(function () {
if (typeof onSelect === "function") { onSelect(data.href); }
});
// Add thumbnail if it exists
common.displayThumbnail(data.href, $span);
});
$input.focus();
};