mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-49764 grade/report/grader: Fixed height issue for IE
This commit is contained in:
parent
b5dbb126f9
commit
75a548b5f3
@ -620,13 +620,25 @@ FloatingHeaders.prototype = {
|
||||
|
||||
// Generate the new fields.
|
||||
userColumn.each(function(node) {
|
||||
var height = node.getComputedStyle(HEIGHT);
|
||||
// Nasty hack to account for Internet Explorer
|
||||
if(Y.UA.ie !== 0) {
|
||||
var allHeight = node.get('offsetHeight');
|
||||
var marginHeight = parseInt(node.getComputedStyle('marginTop'),10) +
|
||||
parseInt(node.getComputedStyle('marginBottom'),10);
|
||||
var paddingHeight = parseInt(node.getComputedStyle('paddingTop'),10) +
|
||||
parseInt(node.getComputedStyle('paddingBottom'),10);
|
||||
var borderHeight = parseInt(node.getComputedStyle('borderTopWidth'),10) +
|
||||
parseInt(node.getComputedStyle('borderBottomWidth'),10);
|
||||
height = allHeight - marginHeight - paddingHeight - borderHeight;
|
||||
}
|
||||
// Create and configure the new container.
|
||||
var containerNode = Y.Node.create('<div></div>');
|
||||
containerNode.set('innerHTML', node.get('innerHTML'))
|
||||
.setAttribute('class', node.getAttribute('class'))
|
||||
.setAttribute('data-uid', node.ancestor('tr').getData('uid'))
|
||||
.setStyles({
|
||||
height: node.getComputedStyle(HEIGHT),
|
||||
height: height,
|
||||
width: node.getComputedStyle(WIDTH)
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -620,13 +620,25 @@ FloatingHeaders.prototype = {
|
||||
|
||||
// Generate the new fields.
|
||||
userColumn.each(function(node) {
|
||||
var height = node.getComputedStyle(HEIGHT);
|
||||
// Nasty hack to account for Internet Explorer
|
||||
if(Y.UA.ie !== 0) {
|
||||
var allHeight = node.get('offsetHeight');
|
||||
var marginHeight = parseInt(node.getComputedStyle('marginTop'),10) +
|
||||
parseInt(node.getComputedStyle('marginBottom'),10);
|
||||
var paddingHeight = parseInt(node.getComputedStyle('paddingTop'),10) +
|
||||
parseInt(node.getComputedStyle('paddingBottom'),10);
|
||||
var borderHeight = parseInt(node.getComputedStyle('borderTopWidth'),10) +
|
||||
parseInt(node.getComputedStyle('borderBottomWidth'),10);
|
||||
height = allHeight - marginHeight - paddingHeight - borderHeight;
|
||||
}
|
||||
// Create and configure the new container.
|
||||
var containerNode = Y.Node.create('<div></div>');
|
||||
containerNode.set('innerHTML', node.get('innerHTML'))
|
||||
.setAttribute('class', node.getAttribute('class'))
|
||||
.setAttribute('data-uid', node.ancestor('tr').getData('uid'))
|
||||
.setStyles({
|
||||
height: node.getComputedStyle(HEIGHT),
|
||||
height: height,
|
||||
width: node.getComputedStyle(WIDTH)
|
||||
});
|
||||
|
||||
|
@ -477,13 +477,25 @@ FloatingHeaders.prototype = {
|
||||
|
||||
// Generate the new fields.
|
||||
userColumn.each(function(node) {
|
||||
var height = node.getComputedStyle(HEIGHT);
|
||||
// Nasty hack to account for Internet Explorer
|
||||
if(Y.UA.ie !== 0) {
|
||||
var allHeight = node.get('offsetHeight');
|
||||
var marginHeight = parseInt(node.getComputedStyle('marginTop'),10) +
|
||||
parseInt(node.getComputedStyle('marginBottom'),10);
|
||||
var paddingHeight = parseInt(node.getComputedStyle('paddingTop'),10) +
|
||||
parseInt(node.getComputedStyle('paddingBottom'),10);
|
||||
var borderHeight = parseInt(node.getComputedStyle('borderTopWidth'),10) +
|
||||
parseInt(node.getComputedStyle('borderBottomWidth'),10);
|
||||
height = allHeight - marginHeight - paddingHeight - borderHeight;
|
||||
}
|
||||
// Create and configure the new container.
|
||||
var containerNode = Y.Node.create('<div></div>');
|
||||
containerNode.set('innerHTML', node.get('innerHTML'))
|
||||
.setAttribute('class', node.getAttribute('class'))
|
||||
.setAttribute('data-uid', node.ancestor('tr').getData('uid'))
|
||||
.setStyles({
|
||||
height: node.getComputedStyle(HEIGHT),
|
||||
height: height,
|
||||
width: node.getComputedStyle(WIDTH)
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user