Skip to content

Commit

Permalink
MDL-10021: fix xhtml/javascript + build_navigation(), merged from 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome committed Nov 4, 2008
1 parent 9dadb45 commit b54327f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mod/resource/type/file/resource.class.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php // $Id$


/**
* Extend the base resource class for file resources
*/
Expand Down Expand Up @@ -376,7 +375,8 @@ function display() {
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
Expand All @@ -393,6 +393,7 @@ function display() {

///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
';
Expand All @@ -405,7 +406,7 @@ function resizeEmbeddedHtml() {
';
}
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
Expand All @@ -414,6 +415,7 @@ function resizeEmbeddedHtml() {
}
resizeEmbeddedHtml();
YAHOO.widget.Overlay.windowResizeEvent.subscribe(resizeEmbeddedHtml);
//]]>
</script>
';

Expand Down

0 comments on commit b54327f

Please sign in to comment.