MDL-57472 javascript-static: remove fix_column_widths()
A bit of a hack applied nearly 12 years ago in
7979105c62
This commit is contained in:
@@ -1063,43 +1063,18 @@ function filterByParent(elCollection, parentFinder) {
|
||||
return filteredCollection;
|
||||
}
|
||||
|
||||
/*
|
||||
All this is here just so that IE gets to handle oversized blocks
|
||||
in a visually pleasing manner. It does a browser detect. So sue me.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 3.3, but shouldn't be used in earlier versions either.
|
||||
*/
|
||||
function fix_column_widths() {
|
||||
var agt = navigator.userAgent.toLowerCase();
|
||||
if ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)) {
|
||||
fix_column_width('left-column');
|
||||
fix_column_width('right-column');
|
||||
}
|
||||
Y.log('fix_column_widths() no longer does anything. Please remove it from your code.', 'warn', 'javascript-static.js');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 3.3, but shouldn't be used in earlier versions either.
|
||||
*/
|
||||
function fix_column_width(colName) {
|
||||
if(column = document.getElementById(colName)) {
|
||||
if(!column.offsetWidth) {
|
||||
setTimeout("fix_column_width('" + colName + "')", 20);
|
||||
return;
|
||||
}
|
||||
|
||||
var width = 0;
|
||||
var nodes = column.childNodes;
|
||||
|
||||
for(i = 0; i < nodes.length; ++i) {
|
||||
if(nodes[i].className.indexOf("block") != -1 ) {
|
||||
if(width < nodes[i].offsetWidth) {
|
||||
width = nodes[i].offsetWidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(i = 0; i < nodes.length; ++i) {
|
||||
if(nodes[i].className.indexOf("block") != -1 ) {
|
||||
nodes[i].style.width = width + 'px';
|
||||
}
|
||||
}
|
||||
}
|
||||
Y.log('fix_column_width() no longer does anything. Please remove it from your code.', 'warn', 'javascript-static.js');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user