diff --git a/main/inc/lib/javascript/jquery.lp_minipanel.js b/main/inc/lib/javascript/jquery.lp_minipanel.js
index 68e9849f15..c3ba68bbe5 100644
--- a/main/inc/lib/javascript/jquery.lp_minipanel.js
+++ b/main/inc/lib/javascript/jquery.lp_minipanel.js
@@ -8,7 +8,14 @@
**/
// Copy little progress bar in
-function minipb() {
+function toogle_minipanel() {
+
+ // Construct mini panel
+ var panel = $('#lp_navigation_elem div:first').clone();
+
+ $(panel).attr('id', 'control');
+ $('#learning_path_main').append(panel);
+
$('#learning_path_main #control tr').after('
');
$('#learning_path_main #control tr:eq(1)').append($('#progress_bar').html());
$('#learning_path_main #control tr:eq(1) #progress_img_limit_left').attr('height','5');
@@ -18,6 +25,19 @@ function minipb() {
$('#learning_path_main #control tr:eq(1) #progress_bar_img_limit_right').attr('height','5');
$('#learning_path_main #control tr:eq(1) #progress_text').remove();
$('#learning_path_main #control tr:eq(1) div').css('width','');
+
+ $('#learning_path_main #control .buttons').attr('text-align','center');
+ $('#content_id').css({ height: $('#content_id').height() - ($('#control').height() + 10) });
+
+ $('#learning_path_main #control .buttons img').click(function(){
+ $('#learning_path_main #control tr:eq(1)').remove();
+ toogle_minipanel();
+ });
+ // Hiding navigation left zone
+ $('#learning_path_left_zone').hide(50);
+ $('#learning_path_right_zone').css('margin-left','10px');
+ $('#hide_bar table').css('backgroundImage','url(../img/hide2.png)').css('backgroundColor','#EEEEEE');
+
}
var left_width = 292;
@@ -47,29 +67,10 @@ $(document).ready(function() {
var original = $('#content_id').height();
// Adding funcionality
- $( "#hide_bar" ).click(function() {
-
+ $( "#hide_bar" ).click(function() {
$('#hide_bar table').toggle(function() {
-
if ($('#hide_bar').position().left == left_width) {
-
- // Construct mini panel
- var panel = $('#lp_navigation_elem div:first').clone();
-
- $(panel).attr('id', 'control');
- $('#learning_path_main').append(panel);
- minipb();
- $('#learning_path_main #control .buttons').attr('text-align','center');
- $('#content_id').css({ height: $('#content_id').height() - ($('#control').height() + 10) });
-
- $('#learning_path_main #control .buttons img').click(function(){
- $('#learning_path_main #control tr:eq(1)').remove();
- minipb();
- });
- // Hiding navigation left zone
- $('#learning_path_left_zone').hide(50);
- $('#learning_path_right_zone').css('margin-left','10px');
- $('#hide_bar table').css('backgroundImage','url(../img/hide2.png)').css('backgroundColor','#EEEEEE');
+ toogle_minipanel();
}
},
function(){
diff --git a/main/newscorm/lp_view.php b/main/newscorm/lp_view.php
index c76f62de20..9cf467cc63 100644
--- a/main/newscorm/lp_view.php
+++ b/main/newscorm/lp_view.php
@@ -79,17 +79,23 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setti
$htmlHeadXtra[] = '';
}
-$htmlHeadXtra[] = '';
+if ($_SESSION['oLP']->mode == 'embedframe' || $_SESSION['oLP']->get_hide_toc_frame()==1 ) {
+ $htmlHeadXtra[] = '';
+}
+
// Prepare variables for the test tool (just in case) - honestly, this should disappear later on.
$_SESSION['scorm_view_id'] = $_SESSION['oLP']->get_view_id();
@@ -283,10 +289,11 @@ $_SESSION['loaded_lp_view'] = true;
$display_none = '';
$margin_left = '305px';
-if ($_SESSION['oLP']->mode == 'embedframe' ||$_SESSION['oLP']->get_hide_toc_frame()==1 ) {
+/*
+if ($_SESSION['oLP']->mode == 'embedframe' || $_SESSION['oLP']->get_hide_toc_frame()==1 ) {
$display_none = ';display:none;';
- $margin_left = '12px';
-}
+ /$margin_left = '12px';
+}*/
//Media player code