mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-57472-master' of git://github.com/danpoltawski/moodle
This commit is contained in:
commit
7454d5fb37
@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
@ -576,8 +576,6 @@ class core_renderer extends renderer_base {
|
||||
'loadinghelp',
|
||||
), 'moodle');
|
||||
|
||||
$this->page->requires->js_function_call('setTimeout', array('fix_column_widths()', 20));
|
||||
|
||||
$focus = $this->page->focuscontrol;
|
||||
if (!empty($focus)) {
|
||||
if (preg_match("#forms\['([a-zA-Z0-9]+)'\].elements\['([a-zA-Z0-9]+)'\]#", $focus, $matches)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user