MDL-57690 output: stop requiring moodle-core-popuphelp on every page
authorDan Poltawski <dan@moodle.com>
Wed, 18 Jan 2017 12:36:50 +0000 (12:36 +0000)
committerDan Poltawski <dan@moodle.com>
Thu, 19 Jan 2017 08:10:34 +0000 (08:10 +0000)
In boost we are not longer using this module, so lets limit it to
bootstrapbase only

lib/outputrenderers.php
theme/bootstrapbase/renderers/core_renderer.php
theme/upgrade.txt

index 21f40ff..8357799 100644 (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)) {
index 7a498cc..2fa7ae7 100644 (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)) {
index 5e0f854..06a1e92 100644 (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