Fix icon rendering in apps management for IE11
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
8a226811dc
commit
7f86d4af65
|
@ -247,8 +247,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
|
||||||
|
|
||||||
var page = $('#app-' + app.id);
|
var page = $('#app-' + app.id);
|
||||||
|
|
||||||
// image loading kung-fu (IE doesn't properly scale SVGs, so disable app icons)
|
if (app.preview) {
|
||||||
if (app.preview && !OC.Util.isIE()) {
|
|
||||||
var currentImage = new Image();
|
var currentImage = new Image();
|
||||||
currentImage.src = app.preview;
|
currentImage.src = app.preview;
|
||||||
|
|
||||||
|
@ -300,8 +299,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
|
||||||
img = '<svg viewBox="0 0 72 72">';
|
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>';
|
img += '<image x="0" y="0" width="72" height="72" preserveAspectRatio="xMinYMin meet" xlink:href="' + url + '" class="app-icon" /></svg>';
|
||||||
} else {
|
} 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 = '<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;
|
return img;
|
||||||
},
|
},
|
||||||
|
|
|
@ -203,9 +203,6 @@ script(
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="app-content" class="icon-loading">
|
<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"></div>
|
||||||
<div id="apps-list-empty" class="hidden emptycontent emptycontent-search">
|
<div id="apps-list-empty" class="hidden emptycontent emptycontent-search">
|
||||||
<div id="app-list-empty-icon" class="icon-search"></div>
|
<div id="app-list-empty-icon" class="icon-search"></div>
|
||||||
|
|
Loading…
Reference in New Issue