mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #4709 from owncloud/previews_in_ocidalogs_filepicker
Add previews to OC.dialogs.filepicker()
This commit is contained in:
commit
6435e18e95
1 changed files with 5 additions and 1 deletions
|
|
@ -285,7 +285,11 @@ var OCdialogs = {
|
|||
filename: entry.name,
|
||||
date: OC.mtime2date(entry.mtime)
|
||||
});
|
||||
$li.find('img').attr('src', entry.mimetype_icon);
|
||||
if (entry.mimetype === "httpd/unix-directory") {
|
||||
$li.find('img').attr('src', OC.imagePath('core', 'filetypes/folder.png'));
|
||||
} else {
|
||||
$li.find('img').attr('src', OC.Router.generate('core_ajax_preview', {x:32, y:32, file:escapeHTML(dir+'/'+entry.name)}) );
|
||||
}
|
||||
self.$filelist.append($li);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue