diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-04-04 11:44:11 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-04-04 11:44:11 +0200 |
commit | 05a7bfed71a745091f87a2bfdc719c6b7665c22d (patch) | |
tree | 2b1f7655516badac40f814470df35812c54b2ae0 /core/js/oc-dialogs.js | |
parent | a4eafca77f86ab2630bec698c3302c93daddb991 (diff) | |
download | nextcloud-server-05a7bfed71a745091f87a2bfdc719c6b7665c22d.tar.gz nextcloud-server-05a7bfed71a745091f87a2bfdc719c6b7665c22d.zip |
Fix file picker to correctly show SVG file icons
Diffstat (limited to 'core/js/oc-dialogs.js')
-rw-r--r-- | core/js/oc-dialogs.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 6fc8d4d3523..4888fc1eea5 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -557,7 +557,6 @@ var OCdialogs = { filename: entry.name, date: OC.mtime2date(Math.floor(entry.mtime / 1000)) }); - $li.find('img').attr('src', entry.icon); if (entry.isPreviewAvailable) { var urlSpec = { file: dir + '/' + entry.name @@ -565,10 +564,16 @@ var OCdialogs = { var previewUrl = OC.generateUrl('/core/preview.png?') + $.param(urlSpec); $li.find('img').attr('src', previewUrl); } + else { + $li.find('img').attr('src', OC.Util.replaceSVGIcon(entry.icon)); + } self.$filelist.append($li); }); self.$filelist.removeClass('loading'); + if (!OC.Util.hasSVGSupport()) { + OC.Util.replaceSVG(self.$filePicker.find('.dirtree')); + } }); }, /** |