Fix new course progress section on homepage to be folded by default - refs #7218

1.9.x
Yannick Warnier 12 years ago
parent 6f5823afa6
commit 7354e11ffd
  1. 14
      main/course_home/course_home.php
  2. 7
      main/css/base.css
  3. 6
      main/inc/introductionSection.inc.php

@ -49,16 +49,16 @@ require_once dirname(__FILE__).'/../inc/global.inc.php';
$htmlHeadXtra[] ='<script>
/* option show/hidden thematic-postit */
/* option show/hide thematic-block */
$(document).ready(function(){
$("#thematic-show").click(function(){
$(".btn-hidden-thematic").hide();
$(".btn-show-thematic").show(); //show using class
});
$("#thematic-hidden").click(function(){
$("#thematic-show").click(function(){
$(".btn-hide-thematic").hide();
$(".btn-show-thematic").show(); //show using class
});
$("#thematic-hide").click(function(){
$(".btn-show-thematic").hide(); //show using class
$(".btn-hidden-thematic").show();
$(".btn-hide-thematic").show();
});
});

@ -142,8 +142,13 @@ header #logo img{
.items-progress p{
margin-bottom: 3px;
}
.collapse.in {
.accordion-body.collapse {
height: 0;
display: none;
}
.accordion-body.collapse.in {
height: auto;
display: block;
}
/* END COURSE PROGRESS*/

@ -254,10 +254,10 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
</div>';
$thematic_description_html .=
'<div class="span4">
<a id="thematic-hidden" class="btn btn-small btn-primary accordion-toggle btn-show-thematic" href="#pross" data-toggle="collapse" data-parent="#progress-bar-course">
<a id="thematic-show" class="btn btn-small btn-primary accordion-toggle btn-hide-thematic" href="#pross" data-toggle="collapse" data-parent="#progress-bar-course">
' . get_lang('SeeDetail') . '
</a>
<a id="thematic-show" class="btn btn-small accordion-toggle btn-hidden-thematic" href="#pross" data-toggle="collapse" data-parent="#progress-bar-course" style="display:none;">
<a id="thematic-hide" class="btn btn-small accordion-toggle btn-show-thematic" href="#pross" data-toggle="collapse" data-parent="#progress-bar-course" style="display:none;">
' . get_lang('Hide') . '
</a>
</div>
@ -265,7 +265,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
</div>
</div>';
$thematic_description_html .=
'<div class="accordion-body collapse in" id="pross" style="height:auto;">
'<div class="accordion-body collapse in" id="pross" style="height: auto;">
<div class="accordion-inner">
<div class="row-fluid">
<div class="span4">

Loading…
Cancel
Save