bugfix: the table of content could not be scrolled when the content exceeded the screen layout.

example screenshot: https://support.dokeos.com/issues/5730
skala
Patrick Cool 15 years ago
parent 00ada90163
commit d8544436cc
  1. 10
      main/newscorm/lp_view.php

@ -318,7 +318,7 @@ if($_SESSION['oLP']->mode == 'fullscreen') {
<!-- end media player layaout --> <!-- end media player layaout -->
<!-- toc layout --> <!-- toc layout -->
<div id="toc_id" name="toc_name" style="padding:0;margin-top:20px;height:60%;width:100%"> <div id="toc_id" name="toc_name" style="overflow: auto; padding:0;margin-top:20px;height:60%;width:100%">
<div id="learning_path_toc" style="font-size:9pt;margin:0;"><?php echo $_SESSION['oLP']->get_html_toc(); ?> <div id="learning_path_toc" style="font-size:9pt;margin:0;"><?php echo $_SESSION['oLP']->get_html_toc(); ?>
<!-- log message layout --> <!-- log message layout -->
@ -393,6 +393,8 @@ window.onload = function() {
rightZoneHeightOccupied = docHeight - initialRightZoneHeight; rightZoneHeightOccupied = docHeight - initialRightZoneHeight;
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
updateContentHeight(); updateContentHeight();
viewportheight = window.innerHeight
document.getElementById('toc_id').style.height = viewportheight - 200 + "px";
} }
window.onresize = updateContentHeight; window.onresize = updateContentHeight;
@ -508,7 +510,7 @@ window.onresize = updateContentHeight;
<!-- end media player layaout --> <!-- end media player layaout -->
<!-- toc layout --> <!-- toc layout -->
<div id="toc_id" name="toc_name" style="padding:0;margin-top:20px;height:60%;width:100%"> <div id="toc_id" name="toc_name" style="overflow: auto; padding:0;margin-top:20px;height:60%;width:100%">
<div id="learning_path_toc" style="font-size:9pt;margin:0;"><?php echo $_SESSION['oLP']->get_html_toc(); ?> <div id="learning_path_toc" style="font-size:9pt;margin:0;"><?php echo $_SESSION['oLP']->get_html_toc(); ?>
<?php if (!empty($_SESSION['oLP']->scorm_debug)) { //only show log ?> <?php if (!empty($_SESSION['oLP']->scorm_debug)) { //only show log ?>
@ -580,8 +582,10 @@ window.onload = function() {
initialRightZoneHeight = document.getElementById('learning_path_right_zone').offsetHeight; initialRightZoneHeight = document.getElementById('learning_path_right_zone').offsetHeight;
docHeight = document.body.clientHeight; docHeight = document.body.clientHeight;
leftZoneHeightOccupied = docHeight - initialLeftZoneHeight; leftZoneHeightOccupied = docHeight - initialLeftZoneHeight;
rightZoneHeightOccupied = docHeight - initialRightZoneHeight; rightZoneHeightOccupied = docHeight - initialRightZoneHeight;
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
viewportheight = window.innerHeight
document.getElementById('toc_id').style.height = viewportheight - 200 + "px";
updateContentHeight(); updateContentHeight();
} }

Loading…
Cancel
Save