fix mode embedframe expand BT#10818

Conflicts:
	main/newscorm/lp_view.php
1.10.x
aragonc 9 years ago
parent 55b592ae64
commit 9708e67f9d
  1. 6
      main/newscorm/learnpath.class.php
  2. 3
      main/newscorm/lp_view.php
  3. 23
      main/template/default/learnpath/view.tpl

@ -5076,13 +5076,13 @@ class learnpath
$default_view_mode = $row['default_view_mod'];
$view_mode = $default_view_mode;
switch ($default_view_mode) {
case 'fullscreen':
case 'fullscreen': // default with popup
$view_mode = 'embedded';
break;
case 'embedded':
case 'embedded': // default view with left menu
$view_mode = 'embedframe';
break;
case 'embedframe':
case 'embedframe': //folded menu
$view_mode = 'impress';
break;
case 'impress':

@ -93,6 +93,9 @@ $(document).ready(function() {
var chamilo_xajax_handler = window.oxajax;
</script>';
if ($_SESSION['oLP']->mode == 'embedframe' || $_SESSION['oLP']->get_hide_toc_frame() == 1) {
$htmlHeadXtra[] = '';
}
//Impress js
if ($_SESSION['oLP']->mode == 'impress') {

@ -102,8 +102,13 @@
<div class="lp-view-zone-container">
<div id="lp_navigation_elem" class="navegation-bar pull-right text-right">
<a href="#" id="lp-view-expand-toggle" class="icon-toolbar expand" role="button">
<span class="fa fa-expand" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% if lp_mode == 'embedframe' %}
<span class="fa fa-compress" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% else %}
<span class="fa fa-expand" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% endif %}
</a>
<a id="home-course" href="{{ button_home_url }}" class="icon-toolbar" target="_self" onclick="javascript: window.parent.API.save_asset();">
<em class="fa fa-home"></em> <span class="hidden-xs hidden-sm"></span>
@ -156,6 +161,18 @@
};
$(document).on('ready', function () {
{% if lp_mode == 'embedframe' %}
$('#learning_path_main').addClass('lp-view-collapsed');
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
$('#learning_path_main').toggleClass('lp-view-collapsed');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
});
{% else %}
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
@ -164,6 +181,8 @@
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
});
{% endif %}
$('.lp-view-tabs').on('click', '.disabled', function (e) {
e.preventDefault();

Loading…
Cancel
Save