From: stronk7 Date: Mon, 24 Apr 2006 00:11:59 +0000 (+0000) Subject: Looking much better now! B-) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b692e9581669cae99430a76d4c0a870924e97104;p=moodle.git Looking much better now! B-) More tests tomorrow (IE, mainly) --- diff --git a/mod/resource/type/ims/javascript.php b/mod/resource/type/ims/javascript.php index 60741a9d2e..0673bac470 100644 --- a/mod/resource/type/ims/javascript.php +++ b/mod/resource/type/ims/javascript.php @@ -18,9 +18,6 @@ window.onresize = function() { resizeiframe($jsarg); }; - window.onload = function() { - resizeiframe($jsarg); - }; window.name='ims-cp-page'; \n"; diff --git a/mod/resource/type/ims/resize.js b/mod/resource/type/ims/resize.js index 54bac83687..a5df3e2625 100644 --- a/mod/resource/type/ims/resize.js +++ b/mod/resource/type/ims/resize.js @@ -62,7 +62,7 @@ function resizeiframe (hasNav) { footerHeight + imsnavHeight + topMargin + - bottomMargin; + bottomMargin + 20; // +20 to save a minor vertical scroll always present! if (hasNav == true) { var navBarWidth = document.getElementById('ims-menudiv').offsetWidth; @@ -70,7 +70,7 @@ function resizeiframe (hasNav) { document.getElementById('ims-menudiv').style.height = (winHeight - totalHeight)+'px'; } else { - var iframeWidth = '99%'; + var iframeWidth = (winWidth - 25)+'px'; } if (hasNav == true) { diff --git a/mod/resource/type/ims/resource.class.php b/mod/resource/type/ims/resource.class.php index 4a1e1a2cd6..0c331c153f 100644 --- a/mod/resource/type/ims/resource.class.php +++ b/mod/resource/type/ims/resource.class.php @@ -458,14 +458,8 @@ class resource_ims extends resource_base { } /// content - this produces everything else $this->print_ims($cm, $course, $items, $resource, $page); - /// moodle footer. no footer if it's in a popup - save space. - if ($resource->popup) { - echo ""; - } - else { - /// Putting the footer inside one div to be able to handle it - print_footer(); - } + /// no Moodle footer (because we cannot insert there the resize script). + echo ""; /// log it. add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id); @@ -554,7 +548,7 @@ class resource_ims extends resource_base { } /// prints iframe filled with $fullurl - echo ""; //Content frame + echo ""; //Content frame echo ''; }