-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
2.3
-
MOODLE_23_STABLE
-
MDL-33113-master-1 -
Just a quick thought and I need to write it down before I forget.
For the new course and block js changes, it's been suggested that we should hide elements which will be removed by the js, and show elements which would be added by JS.
At present, a jsenabled class is added to the body tag by a JS script early in the header, however this doesn't determine whether a particular feature is enabled - for example courseajax. Often, these settings rely on many different settings - see /course/lib.php::course_ajax_enabled().
I propose:
- adding a new function to the moodle_page class:
function add_js_class($class) {
// TODO Check that the page hasn't been rendered yet
$this->pageclasses[$class] = true;
}
- adding a call to display these - this is currently done for the jsenabled class in get_top_of_body_code(). This could be converted to add all required classes very easily.
Just a thought and I'll try and expand when I get to work. Will help solve MDL-32837
- will help resolve
-
MDL-32837 Make the course AJAX load less jarring
- Closed