diff options
author | kondou <kondou@ts.unde.re> | 2013-09-03 15:15:20 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-03 15:15:20 +0200 |
commit | d62c5063f420a0ec69d606aea086d40fe027da47 (patch) | |
tree | 0ced2b3d3027309e481d9b020a7d2678c9752f00 /core/js/oc-dialogs.js | |
parent | a7de0e965298822f071c3137ca925d1920c03a27 (diff) | |
download | nextcloud-server-d62c5063f420a0ec69d606aea086d40fe027da47.tar.gz nextcloud-server-d62c5063f420a0ec69d606aea086d40fe027da47.zip |
Add previews to OC.dialogs.filepicker(); Fix #4697
Diffstat (limited to 'core/js/oc-dialogs.js')
-rw-r--r-- | core/js/oc-dialogs.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 6b768641586..f184a1022bc 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -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); }); |