summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-18 15:35:34 +0100
committerGitHub <noreply@github.com>2016-11-18 15:35:34 +0100
commitfaee255ff47873ed2f8908c7d6b6e603ded11618 (patch)
tree87a46252211e9c0dbab91609e4115082401656ee /core
parente8511660f01faeebcc692b57cabdacd97845da92 (diff)
parent2ab4d1e0a3f15af2b8f04edcf18b7fe3fc0be262 (diff)
downloadnextcloud-server-faee255ff47873ed2f8908c7d6b6e603ded11618.tar.gz
nextcloud-server-faee255ff47873ed2f8908c7d6b6e603ded11618.zip
Merge pull request #840 from nextcloud/theming-icon-endpoint
Add dynamic icon creation
Diffstat (limited to 'core')
-rw-r--r--core/js/mimetype.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/js/mimetype.js b/core/js/mimetype.js
index 0d30da26c26..8920fe09a7e 100644
--- a/core/js/mimetype.js
+++ b/core/js/mimetype.js
@@ -91,6 +91,11 @@ OC.MimeType = {
path += icon;
}
}
+ if(OCA.Theming) {
+ path = OC.generateUrl('/apps/theming/img/core/filetypes/');
+ path += OC.MimeType._getFile(mimeType, OC.MimeTypeList.files);
+ gotIcon = true;
+ }
// If we do not yet have an icon fall back to the default
if (gotIcon === null) {
@@ -100,6 +105,10 @@ OC.MimeType = {
path += '.svg';
+ if(OCA.Theming) {
+ path += "?v=" + OCA.Theming.cacheBuster;
+ }
+
// Cache the result
OC.MimeType._mimeTypeIcons[mimeType] = path;
return path;