jquery.lp_minipanel.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* For licensing terms, see /license.txt */
  2. /**
  3. Learning Path minipanel - Chamilo 1.8.8
  4. Adding mini panel to browse Learning Paths
  5. Requirements: JQuery 1.4.4, JQuery UI 1.8.7
  6. @author Alberto Torreblanca @albert1t0
  7. @author Julio Montoya Cleaning/fixing code
  8. @author Alex Aragon Cleaning/fixing code update
  9. **/
  10. $(document).ready(function() {
  11. $('#touch-button').click(function() {
  12. $('#learning_path_left_zone').toggle("slow", function(){
  13. $('#learning_path_right_zone').toggleClass('total');
  14. $(function(){
  15. $('#learning_path_right_zone').slideToggle(300);
  16. $('#control-bottom').toggle("slow");
  17. });
  18. });
  19. $(this).toggleClass('show-touch');
  20. $('#learning_path_right_zone').slideToggle(300);
  21. });
  22. // effects items scorm content
  23. $('.scorm_item_normal, .scorm-previous, .scorm-next').on('click', function () {
  24. $('#learning_path_right_zone').fadeOut('slow');
  25. var loadLearningPathRigthZone = function () {
  26. $('#learning_path_right_zone').fadeIn(100);
  27. $('#learning_path_right_zone iframe').off('load', loadLearningPathRigthZone);
  28. };
  29. $('#learning_path_right_zone iframe').on('load', loadLearningPathRigthZone);
  30. });
  31. });