]> git.mjollnir.org Git - moodle.git/commitdiff
Now the resize script supports both resources with and
authorstronk7 <stronk7>
Sun, 23 Apr 2006 17:22:45 +0000 (17:22 +0000)
committerstronk7 <stronk7>
Sun, 23 Apr 2006 17:22:45 +0000 (17:22 +0000)
without navigation menu.

mod/resource/type/ims/resize.js

index fab3f956ffef9b7c056a4e29d1258919ea62a068..54bac836879e5632ea9a1f3df49d1b75344875f6 100644 (file)
@@ -73,7 +73,12 @@ function resizeiframe (hasNav) {
         var iframeWidth = '99%';
     }
 
-    document.getElementById('ims-contentframe').style.height = (winHeight - totalHeight)+'px';
+    if (hasNav == true) {
+        document.getElementById('ims-contentframe').style.height = (winHeight - totalHeight)+'px';
+        document.getElementById('ims-contentframe').style.width = iframeWidth;
+    } else {
+        document.getElementById('ims-contentframe-no-nav').style.height = (winHeight - totalHeight)+'px';
+        document.getElementById('ims-contentframe-no-nav').style.width = iframeWidth;
+    }
     document.getElementById('ims-containerdiv').style.height = (winHeight - totalHeight)+'px';
-    document.getElementById('ims-contentframe').style.width = iframeWidth;
 }