Feature #3116 - Improve Learning Path minipanel

skala
Alberto Torreblanca 14 years ago
parent bfbffc99bc
commit 9dbf1d6eb2
  1. BIN
      main/img/hide0.png
  2. BIN
      main/img/hide1.png
  3. BIN
      main/img/hide2.png
  4. BIN
      main/img/hide3.png
  5. BIN
      main/img/hideback.png
  6. 67
      main/inc/lib/javascript/jquery.lp_minipanel.js
  7. 2
      main/newscorm/lp_controller.php
  8. 7
      main/newscorm/lp_view.php

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

@ -1,44 +1,57 @@
// En este archivo se agregaran funcionalidades dependientes de jquery al
// Learning path
/*******************************************
Learning Path minipanel - Chamilo 1.8.8
Adding mini panel to browse Learning Paths
Requirements: JQuery 1.4.4, JQuery UI 1.8.7
Alberto Torreblanca @albert1t0
*******************************************/
(function($){
$(document).ready(function() {
//Agregar botón que ocultará el panel y mostrará un mini panel
$('#learning_path_header table').attr('width','100%');
$('#learning_path_left_zone table td:first').attr('width','32');
$('#learning_path_header td').attr('align','left');
$('#learning_path_header td:last').attr('align','rigth');
$('#learning_path_header td:last').after('<td width="16px"> <a class="hide" href="#"><img src="../img/first.png" alt="Hide" /></a> </td>');
//Adding div to hide panel
// Se asocia funcionalidad al botón para mostrar ocultar learning path
$('.hide').click(function(){
$('#learning_path_right_zone').
before('<div id="hide_bar" style="float: left; width: 10px; height: 100%;">' +
'<table style="border: 0px none; width: 100%; height: 100%; cursor: pointer; background-color: #EEEEEE">' +
'<tr> <td> </td></tr></table></div>');
$('#hide_bar table').css({backgroundImage: "url(../img/hide0.png)", backgroundRepeat: "no-repeat", backgroundPosition: "center center"})
//Adding effects to hide bar
$('#hide_bar table').hover(function (){
if($('#hide_bar').position().left == 280)
$(this).css('backgroundImage','url(../img/hide1.png)').css('backgroundColor','#888888');
else if($('#hide_bar').position().left == 0)
$(this).css('backgroundImage','url(../img/hide3.png)').css('backgroundColor','#888888');
},function (){
if($('#hide_bar').position().left == 280)
$(this).css('backgroundImage','url(../img/hide0.png)').css('backgroundColor','#EEEEEE');
else if($('#hide_bar').position().left == 0)
$(this).css('backgroundImage','url(../img/hide2.png)').css('backgroundColor','#EEEEEE');
}
);
//Adding funcionality
$('#hide_bar table').toggle(function(){
var panel = $('#lp_navigation_elem div:first').clone();
$(panel).attr('id','control');
$('#learning_path_main').append(panel);
$('#learning_path_left_zone').hide(250);
$('#learning_path_right_zone').css('marginLeft','0px');
// Mostrar controles
$('#learning_path_main #control table').after('<td width="16px"> <a class="show" href="#"><img src="../img/first.png" alt="Show" /></a> </td>');
$('#learning_path_left_zone').hide(50);
$('#learning_path_right_zone').css('marginLeft','10px');
$('#hide_bar table').css('backgroundImage','url(../img/hide2.png)').css('backgroundColor','#EEEEEE');
$('#learning_path_main #control').css({width: "120px", height: "32px", opacity: "0.4", zindex: "-1", position: "absolute", top: "0px", left:"15px"});
$('#learning_path_main #control').draggable();
// Muestra panel y destruye panel
$('.show').click(function(){
$('#learning_path_right_zone').css('marginLeft','282px');
$('#learning_path_left_zone').show(250);
$('#learning_path_main #control').draggable({ iframeFix: true, stack: "#learning_path_right_zone" });
$('.ui-draggable .buttons').css('backgroundImage','url(../img/hideback.png)');
},function(){
$('#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();
});
});
});
})(jQuery);

@ -33,7 +33,7 @@ $language_file[] = 'registration';
// Including the global initialization file.
require_once '../inc/global.inc.php';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-1.4.4.min.js" type="text/javascript" language="javascript"></script>'; //jQuery
$htmlHeadXtra[] = api_get_jquery_js(); //jQuery
if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setting('show_glossary_in_documents') == 'isautomatic' ) {
$htmlHeadXtra[] = '<script type="text/javascript">

@ -45,13 +45,12 @@ $my_style = $platform_theme;
// Se incluye la libreria en el lp_controller.php
// $htmlHeadXtra[] = '<script src="../inc/lib/javascript/jquery.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/cupertino/jquery-ui-1.8.7.custom.css" type="text/css" rel="Stylesheet" />';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/cupertino/jquery-ui-1.8.7.custom.min.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = api_get_jquery_ui_js(); //jQuery-UI
// se incluye la librería para el mini panel
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.lp_minipanel.js" type="text/javascript" language="javascript"></script>';
if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setting('show_glossary_in_documents') == 'isautomatic' ) {
$htmlHeadXtra[] = '<script type="text/javascript">
<!--
@ -269,7 +268,7 @@ if ($_SESSION['oLP']->mode == 'fullscreen') {
$_SESSION['loaded_lp_view'] = true;
$display_none = '';
$margin_left = '282px';
$margin_left = '290px';
if ($_SESSION['oLP']->mode == 'embedframe') {
$display_none = ';display:none;';
$margin_left = '0px';

Loading…
Cancel
Save