Skip to content

Commit

Permalink
MDL-57690 output: stop requiring moodle-core-popuphelp on every page
Browse files Browse the repository at this point in the history
In boost we are not longer using this module, so lets limit it to
bootstrapbase only
  • Loading branch information
danpoltawski committed Jan 19, 2017
1 parent 5130953 commit f745b81
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,6 @@ public function standard_head_html() {
// 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)) {
Expand Down
8 changes: 8 additions & 0 deletions theme/bootstrapbase/renderers/core_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public function standard_head_html() {
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)) {
Expand Down
7 changes: 7 additions & 0 deletions theme/upgrade.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f745b81

Please sign in to comment.