mirror of
https://github.com/nextcloud/server.git
synced 2024-09-13 15:48:32 +02:00
Add previews to OC.dialogs.filepicker(); Fix #4697
This commit is contained in:
parent
a7de0e9652
commit
d62c5063f4
@ -285,7 +285,11 @@ var OCdialogs = {
|
|||||||
filename: entry.name,
|
filename: entry.name,
|
||||||
date: OC.mtime2date(entry.mtime)
|
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);
|
self.$filelist.append($li);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user