mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
themes: MDL-19077 fix install regression
This commit is contained in:
parent
e2074b8b43
commit
e29380f3c4
@ -153,7 +153,8 @@ if (!core_tables_exist()) {
|
||||
|
||||
$strdatabasesetup = get_string('databasesetup');
|
||||
$navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc')));
|
||||
print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, '', upgrade_get_javascript(), false, ' ', ' ');
|
||||
upgrade_get_javascript();
|
||||
print_header($strinstallation.' - Moodle '.$CFG->target_release, $strinstallation, $navigation, '', '', false, ' ', ' ');
|
||||
|
||||
if (!$DB->setup_is_unicodedb()) {
|
||||
if (!$DB->change_db_encoding()) {
|
||||
|
@ -54,9 +54,6 @@ die;die;die;
|
||||
}
|
||||
}
|
||||
|
||||
echo upgrade_get_javascript();
|
||||
|
||||
|
||||
/// return to original debugging level
|
||||
|
||||
$DB->get_manager()->install_from_xmldb_file("$CFG->libdir/db/install.xml");
|
||||
|
@ -2072,7 +2072,7 @@ function print_header($title='', $heading='', $navigation='', $focus='',
|
||||
|
||||
if ($meta) {
|
||||
throw new coding_exception('The $meta parameter to print_header is no longer supported. '.
|
||||
'You should be able to do weverything you want with $PAGE->requires and other such mechanisms.');
|
||||
'You should be able to do everything you want with $PAGE->requires and other such mechanisms.');
|
||||
}
|
||||
if ($usexml) {
|
||||
throw new coding_exception('The $usexml parameter to print_header is no longer supported.');
|
||||
|
@ -1040,4 +1040,20 @@ function focuscontrol(controlid) {
|
||||
if (control) {
|
||||
control.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function scroll_to_end() {
|
||||
window.scrollTo(0, 5000000);
|
||||
}
|
||||
|
||||
var scrolltoendtimeout;
|
||||
function repeatedly_scroll_to_end() {
|
||||
scrolltoendtimeout = setInterval(scroll_to_end, 50);
|
||||
}
|
||||
|
||||
function cancel_scroll_to_end() {
|
||||
if (scrolltoendtimeout) {
|
||||
clearTimeout(scrolltoendtimeout);
|
||||
scrolltoendtimeout = null;
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
// keep the global scope clean
|
||||
(function() {
|
||||
|
||||
function scroll_to_page_end() {
|
||||
window.scrollTo(0, 5000000);
|
||||
};
|
||||
|
||||
// load should be a document event, but most browsers use window
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('load', scroll_to_page_end, false);
|
||||
} else if (document.addEventListener) {
|
||||
document.addEventListener('load', scroll_to_page_end, false);
|
||||
} else if (window.attachEvent) {
|
||||
window.attachEvent('onload', scroll_to_page_end);
|
||||
}
|
||||
|
||||
})();
|
@ -751,9 +751,10 @@ function upgrade_started($preinstall=false) {
|
||||
if (!CLI_SCRIPT and !$PAGE->headerprinted) {
|
||||
$strupgrade = get_string('upgradingversion', 'admin');
|
||||
|
||||
upgrade_get_javascript();
|
||||
print_header($strupgrade.' - Moodle '.$CFG->target_release, $strupgrade,
|
||||
build_navigation(array(array('name' => $strupgrade, 'link' => null, 'type' => 'misc'))), '',
|
||||
upgrade_get_javascript(), false, ' ', ' ');
|
||||
'', false, ' ', ' ');
|
||||
}
|
||||
|
||||
ignore_user_abort(true);
|
||||
@ -895,8 +896,10 @@ function print_upgrade_part_end($plugin, $installation, $verbose) {
|
||||
* @global object
|
||||
*/
|
||||
function upgrade_get_javascript() {
|
||||
global $CFG;
|
||||
return '<script type="text/javascript" src="'.$CFG->wwwroot.'/lib/scroll_to_page_end.js"></script>';
|
||||
global $PAGE;
|
||||
$PAGE->requires->js('lib/javascript-static.js')->at_top_of_body();
|
||||
$PAGE->requires->js_function_call('repeatedly_scroll_to_end')->at_top_of_body();
|
||||
$PAGE->requires->js_function_call('cancel_scroll_to_end')->after_delay(1);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user