diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-01-03 09:18:12 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-01-03 14:42:07 +0100 |
commit | 7f86d4af658abc558ca622456f6d6dc00db2fe21 (patch) | |
tree | a8e9a4c721aa4ca2eb66409c7453c4db217c8012 | |
parent | 8a226811dc86547ca5f79ffa35965c0f72e8fbb4 (diff) | |
download | nextcloud-server-7f86d4af658abc558ca622456f6d6dc00db2fe21.tar.gz nextcloud-server-7f86d4af658abc558ca622456f6d6dc00db2fe21.zip |
Fix icon rendering in apps management for IE11
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | settings/js/apps.js | 7 | ||||
-rw-r--r-- | settings/templates/apps.php | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js index 7ec7309db13..b0cc1a11a2f 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -247,8 +247,7 @@ OC.Settings.Apps = OC.Settings.Apps || { var page = $('#app-' + app.id); - // image loading kung-fu (IE doesn't properly scale SVGs, so disable app icons) - if (app.preview && !OC.Util.isIE()) { + if (app.preview) { var currentImage = new Image(); currentImage.src = app.preview; @@ -300,8 +299,10 @@ OC.Settings.Apps = OC.Settings.Apps || { img = '<svg viewBox="0 0 72 72">'; img += '<image x="0" y="0" width="72" height="72" preserveAspectRatio="xMinYMin meet" xlink:href="' + url + '" class="app-icon" /></svg>'; } else { + var rnd = Math.floor((Math.random() * 100 )) + new Date().getSeconds() + new Date().getMilliseconds(); img = '<svg width="32" height="32" viewBox="0 0 32 32">'; - img += '<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invertIcon)" xlink:href="' + url + '?v=' + oc_config.version + '" class="app-icon"></image></svg>'; + img += '<defs><filter id="invertIconApps-' + rnd + '"><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"></feColorMatrix></filter></defs>' + img += '<image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invertIconApps-' + rnd + ')" xlink:href="' + url + '?v=' + oc_config.version + '" class="app-icon"></image></svg>'; } return img; }, diff --git a/settings/templates/apps.php b/settings/templates/apps.php index 0d313be6ede..d7b232b915e 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -203,9 +203,6 @@ script( </ul> </div> <div id="app-content" class="icon-loading"> - <svg class="app-filter"> - <defs><filter id="invertIcon"><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"></feColorMatrix></filter></defs> - </svg> <div id="apps-list"></div> <div id="apps-list-empty" class="hidden emptycontent emptycontent-search"> <div id="app-list-empty-icon" class="icon-search"></div> |