manager: manually calculate table contents position on MSIE (#29253)
This commit is contained in:
parent
0a21240e81
commit
5e97c7e72b
|
@ -15,4 +15,20 @@ $(function() {
|
|||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
if (window.navigator.userAgent.indexOf('MSIE') > 0 || window.navigator.userAgent.match(/Trident.*rv\:11\./)) {
|
||||
// IE doesn't support percentage units inside table cells so we have to go
|
||||
// over all <div>s and convert the values to pixels.
|
||||
var td_height = $('table.agenda-table tbody td').height();
|
||||
$('table.agenda-table tbody td div').each(function(idx, elem) {
|
||||
var parsed_height = $(elem).attr('style').match(/height: ([0-9]+)%/)[1];
|
||||
$(elem).css('height', (parseInt(parsed_height) * td_height / 100) + 'px');
|
||||
var parsed_top = $(elem).attr('style').match(/top: ([0-9]+)%/)[1];
|
||||
$(elem).css('top', (parseInt(parsed_top) * td_height / 100) + 'px');
|
||||
var parsed_min_height = $(elem).attr('style').match(/min-height: ([0-9]+)%/);
|
||||
if (parsed_min_height) {
|
||||
$(elem).css('min-height', (parseInt(parsed_min_height[1]) * td_height / 100) + 'px');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue