diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-09 22:00:25 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-09 22:00:25 +0200 |
commit | d2961dcf114d5ec912978f71dde95f91bfae4f04 (patch) | |
tree | 74b54eb8822eca4858fb4f14780a17ea2c800165 /apps/files/js/filelist.js | |
parent | 68b7822cf50a670619659ae2082633f4c62fb5f9 (diff) | |
parent | 5b8c7a01e90a03687a209ed5f3bd419b095f4f66 (diff) | |
download | nextcloud-server-d2961dcf114d5ec912978f71dde95f91bfae4f04.tar.gz nextcloud-server-d2961dcf114d5ec912978f71dde95f91bfae4f04.zip |
Merge branch 'master' into lukepolo-master
Conflicts:
apps/files/js/filelist.js
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index ceaaed264ae..8ee89aad3ef 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -9,7 +9,7 @@ */ /* global OC, t, n, FileList, FileActions, Files, BreadCrumb */ -/* global procesSelection, dragOptions, folderDropOptions, SVGSupport */ +/* global procesSelection, dragOptions, folderDropOptions */ window.FileList = { appName: t('files', 'Files'), isEmpty: true, @@ -160,22 +160,6 @@ window.FileList = { this.$fileList.trigger(jQuery.Event("updated")); }, /** - * If SVG is not supported, replaces the given images's extension - * from ".svg" to ".png". - * If SVG is supported, return the image path as is. - * @param icon image path - * @return fixed image path - */ - _replaceSVG: function(icon) { - if (!SVGSupport()) { - var i = icon.lastIndexOf('.svg'); - if (i >= 0) { - icon = icon.substr(0, i) + '.png' + icon.substr(i+4); - } - } - return icon; - }, - /** * Creates a new table row element using the given file data. * @param fileData map of file attributes * @param options map of attribute "loading" whether the entry is currently loading @@ -183,7 +167,7 @@ window.FileList = { */ _createRow: function(fileData, options) { var td, simpleSize, basename, extension, sizeColor, - icon = FileList._replaceSVG(fileData.icon), + icon = OC.Util.replaceSVGIcon(fileData.icon), name = fileData.name, type = fileData.type || 'file', mtime = parseInt(fileData.mtime, 10) || new Date().getTime(), @@ -657,7 +641,11 @@ window.FileList = { }, null, null, result.data.etag); } else { - tr.find('td.filename').removeClass('preview').attr('style','background-image:url('+FileList._replaceSVG(fileInfo.icon)+')'); + tr.find('td.filename') + .removeClass('preview') + .attr('style','background-image:url(' + + OC.Util.replaceSVGIcon(fileInfo.icon) + + ')'); } } // reinsert row |