mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
MDL-10021: fix xhtml/javascript + build_navigation(), merged from 1.9
This commit is contained in:
parent
9dadb456f2
commit
b54327f0b4
@ -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>
|
||||
';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user