@ -1596,6 +1596,46 @@ OC.Util = {
} ) ;
} ,
/ * *
* Fix image scaling for IE8 , since background - size is not supported .
*
* This scales the image to the element ' s actual size , the URL is
* taken from the "background-image" CSS attribute .
*
* @ param { Object } $el image element
* /
scaleFixForIE8 : function ( $el ) {
if ( ! this . isIE8 ( ) ) {
return ;
}
var self = this ;
$ ( $el ) . each ( function ( ) {
var url = $ ( this ) . css ( 'background-image' ) ;
var r = url . match ( /url\(['"]?([^'")]*)['"]?\)/ ) ;
if ( ! r ) {
return ;
}
url = r [ 1 ] ;
url = self . replaceSVGIcon ( url ) ;
// TODO: escape
url = url . replace ( /'/g , '%27' ) ;
$ ( this ) . css ( {
'filter' : 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + url + '\', sizingMethod=\'scale\')' ,
'background-image' : ''
} ) ;
} ) ;
return $el ;
} ,
/ * *
* Returns whether this is IE8
*
* @ return { bool } true if this is IE8 , false otherwise
* /
isIE8 : function ( ) {
return $ ( 'html' ) . hasClass ( 'ie8' ) ;
} ,
/ * *
* Remove the time component from a given date
*