Browse Source

Merge pull request #257 from danbarretodev/6033

Fix bug -refs #6033
Yannick Warnier 11 years ago
parent
commit
81c2ec2697
2 changed files with 7 additions and 4 deletions
  1. 1 1
      main/inc/lib/banner.lib.php
  2. 6 3
      main/newscorm/lp_view.php

+ 1 - 1
main/inc/lib/banner.lib.php

@@ -637,7 +637,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools) {
         }
 
         if (!empty($lis)) {
-            $html .= Display::tag('ul', $lis, array('class'=>'breadcrumb'));
+            $html .= Display::tag('ul', $lis, array('class'=>'breadcrumb','style'=>'margin-top: 0'));
         }
     }
     return $html ;

+ 6 - 3
main/newscorm/lp_view.php

@@ -424,6 +424,9 @@ if ($is_allowed_to_edit) {
         var hauteurHeader = document.getElementById('header').offsetHeight;
         var hauteurAuthorImg = document.getElementById('author_image').offsetHeight;
         var hauteurAuthorName = document.getElementById('author_name').offsetHeight;
+        var heightBreadcrumb = document.getElementById('learning_path_breadcrumb_zone').offsetHeight;
+        var control = document.getElementById('control');
+        var heightControl = (control)? control.offsetHeight : 0;
 
         var hauteurMedia = 0;
         if ($("#lp_media_file").length != 0) {
@@ -440,7 +443,7 @@ if ($is_allowed_to_edit) {
         <?php if (!empty($_SESSION['oLP']->scorm_debug)) echo 'debugsize = 150;' ?>
         document.getElementById('inner_lp_toc').style.height = innerHauteur - hauteurHaut - 40 - debugsize + "px";
         if (document.getElementById('content_id')) {
-            document.getElementById('content_id').style.height = innerHauteur + 'px';
+            document.getElementById('content_id').style.height = innerHauteur - debugsize - heightBreadcrumb - heightControl + "px";
         }
 
     // Loads the glossary library.
@@ -484,8 +487,8 @@ if ($is_allowed_to_edit) {
             updateContentHeight();
         });
     });
-    //window.onload = updateContentHeight;
-    //window.onresize = updateContentHeight;
+    window.onload = updateContentHeight();
+    window.onresize = updateContentHeight();
 </script>
 <?php
 // Restore a global setting.