]> git.mjollnir.org Git - moodle.git/commitdiff
Now the resize script hasn't anymore harcoded widths.
authorstronk7 <stronk7>
Sun, 23 Apr 2006 09:59:04 +0000 (09:59 +0000)
committerstronk7 <stronk7>
Sun, 23 Apr 2006 09:59:04 +0000 (09:59 +0000)
mod/resource/type/ims/resize.js

index c181eda81fedc55efbc56ee70aa3279eb8b14d37..fab3f956ffef9b7c056a4e29d1258919ea62a068 100644 (file)
@@ -65,7 +65,8 @@ function resizeiframe (hasNav) {
                         bottomMargin;
 
     if (hasNav == true) {
-        var iframeWidth = (winWidth - 325)+'px';
+        var navBarWidth = document.getElementById('ims-menudiv').offsetWidth;
+        var iframeWidth = (winWidth - navBarWidth - 25)+'px';
         document.getElementById('ims-menudiv').style.height = (winHeight - totalHeight)+'px';
     }
     else {
@@ -75,4 +76,4 @@ function resizeiframe (hasNav) {
     document.getElementById('ims-contentframe').style.height = (winHeight - totalHeight)+'px';
     document.getElementById('ims-containerdiv').style.height = (winHeight - totalHeight)+'px';
     document.getElementById('ims-contentframe').style.width = iframeWidth;
-}
\ No newline at end of file
+}