]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10021: fix xhtml/javascript + build_navigation(), merged from 1.9
authorjerome <jerome>
Tue, 4 Nov 2008 02:27:23 +0000 (02:27 +0000)
committerjerome <jerome>
Tue, 4 Nov 2008 02:27:23 +0000 (02:27 +0000)
mod/resource/type/file/resource.class.php

index 9a6035b28921897aaeb4b8ec6fffd5689c6e4762..5e2e5828281e5d7d7ee7ab4bd763ba5d7d55f08d 100644 (file)
@@ -1,6 +1,5 @@
 <?php // $Id$
 
-
 /**
 * Extend the base resource class for file resources
 */
@@ -376,7 +375,8 @@ class resource_file extends resource_base {
             require_js(array('yui_dom'));
 
         ///Moodle Header and navigation bar
-            print_header($pagetitle, $course->fullname, "$this->navigation ".format_string($resource->name), "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent"));
+            $navigation = build_navigation($this->navlinks, $cm);
+            print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent"));
             $options = new object();
             $options->para = false;
             if (!empty($localpath)) {  // Show some help
@@ -393,6 +393,7 @@ class resource_file extends resource_base {
 
         ///add some javascript in order to fit this object tag into the browser window
             echo '<script type="text/javascript">
+                     //<![CDATA[
                      function resizeEmbeddedHtml() {
                          //calculate new embedded html height size
                     ';
@@ -405,7 +406,7 @@ class resource_file extends resource_base {
                     ';
             }
             echo '       //the object tag cannot be smaller than a human readable size
-                         if (objectheight<200){
+                         if (objectheight < 200) {
                              objectheight = 200;
                          }
                          //resize the embedded html object
@@ -414,6 +415,7 @@ class resource_file extends resource_base {
                      }
                      resizeEmbeddedHtml();
                      YAHOO.widget.Overlay.windowResizeEvent.subscribe(resizeEmbeddedHtml);
+                     //]]>
                   </script>
             ';