From 08b4c47d7edce447461ad1655e5903d53d78907d Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 16 Jul 2012 17:26:10 +0200 Subject: [PATCH] Changing the place of the mini bar see #5181 --- main/css/base.css | 19 +++++++ .../inc/lib/javascript/jquery.lp_minipanel.js | 52 ++++++------------- main/newscorm/lp_view.php | 1 - 3 files changed, 34 insertions(+), 38 deletions(-) diff --git a/main/css/base.css b/main/css/base.css index aad9b0b2e5..cb175dae09 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -4288,4 +4288,23 @@ li.annoucement{ .link.invisible .description{ color: #999999; +} + +#learning_path_main #control { + text-align: center; + background-image:-webkit-gradient(linear,left top,left bottom,from(#ececec),to(#fff)); + background-image:-webkit-linear-gradient(top,#ececec,#fff); + background-image:-moz-linear-gradient(top,#ececec,#fff); + background-image:-ms-linear-gradient(top,#ececec,#fff); + background-image:-o-linear-gradient(top,#ececec,#fff); + background-image:linear-gradient(top,#ececec,#fff); + + height:32px; + padding:8px 0px 8px 0px; + opacity:0.9; + bottom: 0px; + margin: auto; + width: 100%; + height: 34px; + position: absolute } \ No newline at end of file diff --git a/main/inc/lib/javascript/jquery.lp_minipanel.js b/main/inc/lib/javascript/jquery.lp_minipanel.js index 2e73812e53..68e9849f15 100644 --- a/main/inc/lib/javascript/jquery.lp_minipanel.js +++ b/main/inc/lib/javascript/jquery.lp_minipanel.js @@ -5,8 +5,6 @@ Requirements: JQuery 1.4.4, JQuery UI 1.8.7 @author Alberto Torreblanca @albert1t0 @author Julio Montoya Cleaning/fixing some code - @todo this doesn't work due recent changes in this file I partially fixed now we can see the vertical bar - but the minipanel was removed **/ // Copy little progress bar in @@ -45,6 +43,8 @@ $(document).ready(function() { $(this).css('backgroundImage','url(../img/hide2.png)').css('backgroundColor','#EEEEEE'); } ); + + var original = $('#content_id').height(); // Adding funcionality $( "#hide_bar" ).click(function() { @@ -55,52 +55,30 @@ $(document).ready(function() { // Construct mini panel var panel = $('#lp_navigation_elem div:first').clone(); - $(panel).attr('id','control'); + + $(panel).attr('id', 'control'); $('#learning_path_main').append(panel); minipb(); $('#learning_path_main #control .buttons').attr('text-align','center'); - - $('#learning_path_main #control').css({ - margin: "auto", - width: "132px", - height: "34px", - position: "absolute", - top: "5px", - right:"15px", - backgroundColor: "white", - backgroundImage: "url(../img/minipanelback.png)", - paddingTop: "8px", - paddingBottom: "8px", - borderRadius: "4px 4px 4px 4px", - opacity: "0.8", - cursor: "move", - }); - - //$('#learning_path_main #control').css("text-align", "center"); - - $('#learning_path_main #control table').attr('align','center'); - $('#learning_path_main #control').draggable({ - iframeFix: true, - stack: "#learning_path_right_zone", - cursor: "move" - }); - - $('#learning_path_main #control .buttons img').click(function(){ + $('#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_left_zone').hide(50); $('#learning_path_right_zone').css('margin-left','10px'); $('#hide_bar table').css('backgroundImage','url(../img/hide2.png)').css('backgroundColor','#EEEEEE'); } - }, + }, function(){ - // Show navigation left zone - $('#hide_bar table').css('backgroundImage','url(../img/hide0.png)').css('backgroundColor','#EEEEEE'); - $('#learning_path_right_zone').css('marginLeft','290px'); - $('#learning_path_left_zone').show(50); - $('#learning_path_main #control').remove(); + // Show navigation left zone + $('#learning_path_left_zone').show(50); + $('#learning_path_right_zone').css('marginLeft', left_width + 10 + 'px'); + $('#hide_bar table').css('backgroundImage','url(../img/hide0.png)').css('backgroundColor','#EEEEEE'); + $('#learning_path_main #control').remove(); + $('#content_id').css({ height: original}); } ); }); diff --git a/main/newscorm/lp_view.php b/main/newscorm/lp_view.php index 2c6480cb44..3a8d214b02 100644 --- a/main/newscorm/lp_view.php +++ b/main/newscorm/lp_view.php @@ -11,7 +11,6 @@ * @author Denes Nagy, principal author * @author Isthvan Mandak, several new features * @author Roan Embrechts, code improvements and refactoring -* @license GNU/GPL - See Chamilo license directory for details */ /** * Code