diff --git a/main/template/default/learnpath/view.tpl b/main/template/default/learnpath/view.tpl index ec66e12f02..26f682092e 100644 --- a/main/template/default/learnpath/view.tpl +++ b/main/template/default/learnpath/view.tpl @@ -139,6 +139,8 @@ {# TOC layout #}
+ {# div#flab-mobile is to know when the user is on mobile view. Don't delete. #} + {% include 'learnpath/scorm_list.tpl'|get_template %}
{# end TOC layout #} @@ -299,6 +301,16 @@ $('.lp-view-tabs').animate({opacity: 1}, 500); }); + {% if lp_mode == 'embedded' %} + $('.scorm_item_normal a, #scorm-previous, #scorm-next').on('click', function () { + $('.lp-view-tabs').animate({opacity: 0}, 500); + + if ($('#flag-mobile').is(':visible') && !$('#learning_path_main').is('.lp-view-collapsed')) { + $('#lp-view-expand-toggle').trigger('click'); + } + }); + {% endif %} + loadForumThread({{ lp_id }}, {{ lp_current_item_id }}); checkCurrentItemPosition({{ lp_current_item_id }});