diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-04-09 15:05:40 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-04-09 15:05:40 +0200 |
commit | d8f56e3c00e9cdba37b1155a4314398c7a124103 (patch) | |
tree | 1ee1ddc466aea18cfd977195be3cf70afa6c147c /core/js/oc-dialogs.js | |
parent | b19671d204f5dd0f892c4bd35809ea8dd9eb65a7 (diff) | |
parent | d4f9cc567af69a52e5ac43f700d970b6ea4b77d0 (diff) | |
download | nextcloud-server-d8f56e3c00e9cdba37b1155a4314398c7a124103.tar.gz nextcloud-server-d8f56e3c00e9cdba37b1155a4314398c7a124103.zip |
Merge pull request #8049 from owncloud/filepickersvg
Fix file picker SVG issues
Diffstat (limited to 'core/js/oc-dialogs.js')
-rw-r--r-- | core/js/oc-dialogs.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 4da56f27d27..2233b983ad4 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -19,6 +19,8 @@ * */ +/* global OC, t */ + /** * this class to ease the usage of jquery dialogs */ @@ -138,6 +140,9 @@ var OCdialogs = { self.$filePicker = null; } }); + if (!OC.Util.hasSVGSupport()) { + OC.Util.replaceSVG(self.$filePicker.parent()); + } }) .fail(function(status, error) { // If the method is called while navigating away @@ -560,7 +565,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 @@ -568,10 +572,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')); + } }); }, /** |