]> git.mjollnir.org Git - moodle.git/commitdiff
Merged drag class fixes from stable
authormoodler <moodler>
Mon, 30 Oct 2006 09:41:55 +0000 (09:41 +0000)
committermoodler <moodler>
Mon, 30 Oct 2006 09:41:55 +0000 (09:41 +0000)
course/view.php
lib/weblib.php

index 0c2f66d8291e71834f169d4ebe087f2fbdaa91b5..b091305465181a980481c092922890a9e46f7158 100644 (file)
 
 
     // AJAX-capable course format?
-    $useajax = false;
+    $CFG->useajax = false;
     $ajaxformatfile = $CFG->dirroot.'/course/format/'.$course->format.'/ajax.php';
     $meta = '';
     $bodytags = '';
                 // function is called, since that function needs to set some
                 // stuff in the javascriptportal object.
                 $COURSE->javascriptportal = new jsportal();
-                $useajax = true;
-
-            } else {
-                $useajax = false;
+                $CFG->useajax = true;
             }
         }
     }
 
+    $CFG->blocksdrag = $CFG->useajax;   // this will add a new class to the header so we can style differently
+
 
     $PAGE->print_header(get_string('course').': %fullname%', NULL, $meta, $bodytags);
     // Course wrapper start.
 
 
     // Use AJAX?
-    if ($useajax) {
+    if ($CFG->useajax) {
         // At the bottom because we want to process sections and activities
         // after the relevant html has been generated.
         if ($jsincludes = require_js(array('ajaxcourse_blocks',
 
     print_footer(NULL, $course);
 
-?>
\ No newline at end of file
+?>
index 6411c255374f639a6471d41aecfa41eeb13da42a..e240d4c0f019483db3c586274b4c69cf9b9a3fc7 100644 (file)
@@ -2218,6 +2218,10 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
         $pageclass .= ' editing';
     }
 
+    if (!empty($CFG->blocksdrag)) {
+        $pageclass .= ' drag';
+    }
+
     $bodytags .= ' class="'.$pageclass.'" id="'.$pageid.'"';
 
     ob_start();