]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add previews to OC.dialogs.filepicker(); Fix #4697
authorkondou <kondou@ts.unde.re>
Tue, 3 Sep 2013 13:15:20 +0000 (15:15 +0200)
committerkondou <kondou@ts.unde.re>
Tue, 3 Sep 2013 13:15:20 +0000 (15:15 +0200)
core/js/oc-dialogs.js

index 6b768641586b24583005af9adbce3495f91de909..f184a1022bcf870132d793d94f21077169766bb4 100644 (file)
@@ -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);
                        });