Merge branch 'MDL-57690-master' of git://github.com/danpoltawski/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2017-01-24 20:22:44 +01:00
commit 0396389272
5 changed files with 15 additions and 32 deletions

View File

@ -569,13 +569,6 @@ class core_renderer extends renderer_base {
// Set up help link popups for all links with the helptooltip class
$this->page->requires->js_init_call('M.util.help_popups.setup');
// Setup help icon overlays.
$this->page->requires->yui_module('moodle-core-popuphelp', 'M.core.init_popuphelp');
$this->page->requires->strings_for_js(array(
'morehelp',
'loadinghelp',
), 'moodle');
$focus = $this->page->focuscontrol;
if (!empty($focus)) {
if (preg_match("#forms\['([a-zA-Z0-9]+)'\].elements\['([a-zA-Z0-9]+)'\]#", $focus, $matches)) {

View File

@ -1403,7 +1403,6 @@ class page_requirements_manager {
$baserollups = array(
'rollup/' . $rollupversion . "/yui-moodlesimple{$yuiformat}.js",
'rollup/' . $jsrev . "/mcore{$format}.js",
);
if ($this->yui3loader->combine) {

View File

@ -37,6 +37,14 @@ class theme_bootstrapbase_core_renderer extends core_renderer {
global $SITE, $PAGE;
$output = parent::standard_head_html();
// Setup help icon overlays.
$this->page->requires->yui_module('moodle-core-popuphelp', 'M.core.init_popuphelp');
$this->page->requires->strings_for_js(array(
'morehelp',
'loadinghelp',
), 'moodle');
if ($PAGE->pagelayout == 'frontpage') {
$summary = s(strip_tags(format_text($SITE->summary, FORMAT_HTML)));
if (!empty($summary)) {

View File

@ -1,6 +1,13 @@
This files describes API changes in /theme/* themes,
information provided here is intended especially for theme designer.
=== 3.3 ===
* As boost-based themes no longer use the moodle-core-popuphelp help popups, the javascript
setup for this module have been moved from core standard_head_html to the bootstrapbase
renderer. If your theme needs this javascript you will need to ensure the bootstrap renderer
is called, or require the JS yourself
=== 3.2 ===
* Removed themes: base, canvas

View File

@ -208,30 +208,6 @@ while (count($parts)) {
}
}
// Handle the mcore rollup.
if (strpos($rollupname, 'mcore') !== false) {
$yuimodules = array(
'core/tooltip/tooltip',
'core/popuphelp/popuphelp',
'core/widget-focusafterclose/widget-focusafterclose',
'core/dock/dock-loader',
'core/notification/notification-dialogue',
);
// Determine which version of this rollup should be used.
$filesuffix = '.js';
preg_match('/(-(debug|min))?\.js/', $rollupname, $matches);
if (isset($matches[1])) {
$filesuffix = $matches[0];
}
// We need to add these new parts to the beginning of the $parts list, not the end.
$newparts = array();
foreach ($yuimodules as $module) {
$newparts[] = 'm/' . $revision . '/' . $module . $filesuffix;
}
$parts = array_merge($newparts, $parts);
}
continue;
}
if ($version === 'm') {