0001-manager-manually-calculate-table-contents-position-o.patch
chrono/manager/static/js/chrono.manager.js | ||
---|---|---|
15 | 15 |
} |
16 | 16 |
return false; |
17 | 17 |
}); |
18 | ||
19 |
if (window.navigator.userAgent.indexOf('MSIE') > 0 || window.navigator.userAgent.match(/Trident.*rv\:11\./)) { |
|
20 |
// IE doesn't support percentage units inside table cells so we have to go |
|
21 |
// over all <div>s and convert the values to pixels. |
|
22 |
var td_height = $('table.agenda-table tbody td').height(); |
|
23 |
$('table.agenda-table tbody td div').each(function(idx, elem) { |
|
24 |
var parsed_height = $(elem).attr('style').match(/height: ([0-9]+)%/)[1]; |
|
25 |
$(elem).css('height', (parseInt(parsed_height) * td_height / 100) + 'px'); |
|
26 |
var parsed_top = $(elem).attr('style').match(/top: ([0-9]+)%/)[1]; |
|
27 |
$(elem).css('top', (parseInt(parsed_top) * td_height / 100) + 'px'); |
|
28 |
var parsed_min_height = $(elem).attr('style').match(/min-height: ([0-9]+)%/); |
|
29 |
if (parsed_min_height) { |
|
30 |
$(elem).css('min-height', (parseInt(parsed_min_height[1]) * td_height / 100) + 'px'); |
|
31 |
} |
|
32 |
}); |
|
33 |
} |
|
18 | 34 |
}); |
19 |
- |