]> git.mjollnir.org Git - moodle.git/commitdiff
ajax: MDL-17086 Add a CSS class name to <body> when JavaScript is enabled
authortjhunt <tjhunt>
Fri, 31 Oct 2008 08:45:35 +0000 (08:45 +0000)
committertjhunt <tjhunt>
Fri, 31 Oct 2008 08:45:35 +0000 (08:45 +0000)
lib/javascript-static.js
lib/weblib.php

index 88546bc4359f63e25e91aeb3f603ce76e9099997..257a895ddf65b2cae2804d2507022053915eb34a 100644 (file)
@@ -588,4 +588,8 @@ function set_user_preference(name, value) {
         // Make the request.
         YAHOO.util.Connect.asyncRequest('GET', url, callback); 
     }
+}
+
+function moodle_initialise_body() {
+    document.body.className += ' jsenabled';
 }
\ No newline at end of file
index 74362475e669127f8cfa6fe5b2201c7b168e3708..b80cc12c680b32b24e54c084332037137209cf61 100644 (file)
@@ -2579,6 +2579,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
 
     // Add in any extra JavaScript libraries that occurred during the header
     $output .= require_js('', 2);
+    $output .= print_js_call('moodle_initialise_body', array(), true);
 
     if ($return) {
         return $output;