Disable app icon preview in apps page for IE
All IE versions are not able to properly upscale SVG icons unless the said SVG files contain a "viewBox" attribute, which is not always the case. Also we cannot guarantee that all third party apps will have this attribute in their icons. So for now, app icons will not be displayed in IE instead of broken ones.
This commit is contained in:
parent
645d27a849
commit
89e3860e1a
|
@ -1632,6 +1632,15 @@ OC.Util = {
|
|||
return $el;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether this is IE
|
||||
*
|
||||
* @return {bool} true if this is IE, false otherwise
|
||||
*/
|
||||
isIE: function() {
|
||||
return $('html').hasClass('ie');
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether this is IE8
|
||||
*
|
||||
|
|
|
@ -161,8 +161,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
|
|||
|
||||
var page = $('#app-' + app.id);
|
||||
|
||||
// image loading kung-fu
|
||||
if (app.preview) {
|
||||
// image loading kung-fu (IE doesn't properly scale SVGs, so disable app icons)
|
||||
if (app.preview && !OC.Util.isIE()) {
|
||||
var currentImage = new Image();
|
||||
currentImage.src = app.preview;
|
||||
|
||||
|
|
Loading…
Reference in New Issue