From: moodler Date: Mon, 30 Oct 2006 09:41:55 +0000 (+0000) Subject: Merged drag class fixes from stable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=75c3849a9e4195bf0e6b4e6cb6b4322193bd6612;p=moodle.git Merged drag class fixes from stable --- diff --git a/course/view.php b/course/view.php index 0c2f66d829..b091305465 100644 --- a/course/view.php +++ b/course/view.php @@ -121,7 +121,7 @@ // AJAX-capable course format? - $useajax = false; + $CFG->useajax = false; $ajaxformatfile = $CFG->dirroot.'/course/format/'.$course->format.'/ajax.php'; $meta = ''; $bodytags = ''; @@ -154,14 +154,13 @@ // 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. @@ -200,7 +199,7 @@ // 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', @@ -214,4 +213,4 @@ print_footer(NULL, $course); -?> \ No newline at end of file +?> diff --git a/lib/weblib.php b/lib/weblib.php index 6411c25537..e240d4c0f0 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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();