diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-08-02 14:23:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-02 14:23:42 +0200 |
commit | c76dc835c4a1abc179bef3c469d837946fe4d339 (patch) | |
tree | 694cd965628d53d201987fdf9e62dd69d26a99db /settings | |
parent | 17c302709462d52a7027f9e34520a3ef9d88e648 (diff) | |
parent | c8e4988f85e5f9125fd99fde723bc3e4338ed175 (diff) | |
download | nextcloud-server-c76dc835c4a1abc179bef3c469d837946fe4d339.tar.gz nextcloud-server-c76dc835c4a1abc179bef3c469d837946fe4d339.zip |
Merge pull request #701 from nextcloud/fix-add-apps-icon
Apply black app icon style to newly installed app icons
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/apps.js | 9 |
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(); - } } } |