summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-08-01 21:48:06 +0200
committerJulius Haertl <jus@bitgrid.net>2016-08-01 21:48:06 +0200
commitc8e4988f85e5f9125fd99fde723bc3e4338ed175 (patch)
tree5754980aa2be121e23ec603262192b1d276bb46d /settings
parent368e1c3f2bb4040229de993f3ae20d74966c8e66 (diff)
downloadnextcloud-server-c8e4988f85e5f9125fd99fde723bc3e4338ed175.tar.gz
nextcloud-server-c8e4988f85e5f9125fd99fde723bc3e4338ed175.zip
Apply inverted app icon style to newly installed icons
Diffstat (limited to 'settings')
-rw-r--r--settings/js/apps.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 55847162350..66c097e1257 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -396,7 +396,9 @@ OC.Settings.Apps = OC.Settings.Apps || {
if(container.children('li[data-id="'+entry.id+'"]').length === 0){
var li=$('<li></li>');
li.attr('data-id', entry.id);
- var img= $('<img class="app-icon"/>').attr({ src: entry.icon});
+ var img = '<svg width="32" height="32" viewBox="0 0 32 32">';
+ img += '<defs><filter id="invert"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /></filter></defs>';
+ img += '<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert)" xlink:href="' + entry.icon + '" class="app-icon" /></svg>';
var a=$('<a></a>').attr('href', entry.href);
var filename=$('<span></span>');
var loading = $('<div class="icon-loading-dark"></div>').css('display', 'none');
@@ -425,11 +427,6 @@ OC.Settings.Apps = OC.Settings.Apps || {
.animate({opacity: 0.5})
.animate({opacity: 1})
.animate({opacity: 0.75});
-
- if (!OC.Util.hasSVGSupport() && entry.icon.match(/\.svg$/i)) {
- $(img).addClass('svg');
- OC.Util.replaceSVG();
- }
}
}