Fix scorm layout - refs BT#14835 #2695

pull/2733/head
Angel Fernando Quiroz Campos 7 years ago
parent 73f647608e
commit b3fa8b01b0
  1. 2
      main/lp/scorm_api.php
  2. 14
      main/template/default/learnpath/view.tpl

@ -1692,6 +1692,8 @@ function switch_item(current_item, next_item) {
if ($("#lp_media_file").length != 0) {
$("#lp_media_file").html(tmp_data);
}
LPViewUtils.setHeightLPToc();
}
});

@ -133,7 +133,6 @@
</div>
<script>
(function () {
var LPViewUtils = {
setHeightLPToc: function () {
var scormInfoHeight = $('#scorm-info').outerHeight(true);
@ -144,7 +143,7 @@
}
};
$(document).on('ready', function () {
$(document).ready(function () {
if (/iPhone|iPod|iPad/.test(navigator.userAgent)) {
// Fix an issue where you cannot scroll below first screen in
// learning paths on Apple devices
@ -227,7 +226,9 @@
icon.removeClass('fa-chevron-down').addClass('fa-chevron-up');
});
LPViewUtils.setHeightLPToc();
$('.image-avatar img').load(function () {
LPViewUtils.setHeightLPToc();
});
$('.scorm_item_normal a, #scorm-previous, #scorm-next').on('click', function () {
$('.lp-view-tabs').animate({opacity: 0}, 500);
@ -305,10 +306,9 @@
}
});
{% endif %}
});
$(window).on('resize', function () {
LPViewUtils.setHeightLPToc();
$(window).on('resize', function () {
LPViewUtils.setHeightLPToc();
});
});
})();
</script>

Loading…
Cancel
Save