Skip to content
Snippets Groups Projects
Commit d9c71425 authored by DELARUELLE Myriam's avatar DELARUELLE Myriam
Browse files

Fix description course

parent 75826a3f
Branches
Tags
No related merge requests found
......@@ -27,29 +27,38 @@ define(['jquery', 'core/ajax', 'core/str'],
return{
registerHeader:function(){
$("#button-collapse").click(function(){
if($("#summary-wrapper").hasClass('collapsed')){
$("#summary-wrapper").animate({ "max-height": '13rem' }, "slow" );
var message=str.get_string('displayInfos', 'format_iena');
$.when(message).done(function(localizedEditString) {
$("#button-collapse").text(localizedEditString);
});
var heightWrapper= $("#summary-wrapper").css("height");
console.log(heightWrapper);
if(parseInt(heightWrapper, 10) >= 144){
$("#button-collapse").click(function(){
if($("#summary-wrapper").hasClass('collapsed')){
$("#summary-wrapper").animate({ "max-height": '144px' }, "slow" );
var message=str.get_string('displayInfos', 'format_iena');
$.when(message).done(function(localizedEditString) {
$("#button-collapse").text(localizedEditString);
});
}
else{
var height= $("#summary-collapse").css("height");
$("#summary-wrapper").animate({ "max-height": height }, "slow" );
var message=str.get_string('hideInfos', 'format_iena');
$.when(message).done(function(localizedEditString) {
$("#button-collapse").text(localizedEditString);
});
}
$("#summary-wrapper").toggleClass("collapsed");
})
}
else{
var height= $("#summary-collapse").css("height");
$("#summary-wrapper").animate({ "max-height": height }, "slow" );
var message=str.get_string('hideInfos', 'format_iena');
$.when(message).done(function(localizedEditString) {
$("#button-collapse").text(localizedEditString);
});
}
$("#summary-wrapper").toggleClass("collapsed");
})
}
else{
$("#button-collapse").hide();
}
}
......
......@@ -658,7 +658,7 @@ ul.nav.navbar-nav.ml-auto {
#summary-wrapper{
padding-left: 1px;
display: block;
max-height: 13rem;
max-height: 144px;
height: auto;
overflow: hidden;
margin-bottom: 5px;
......
......@@ -240,6 +240,7 @@
<h3>
{{# str }} aboutcourse, format_iena {{/ str}}
</h3>
<div class=" my-3" data-for="sectioninfo" style="border-bottom: 1px solid #d1d1d1;"></div>
<div id="summary-wrapper">
<div id="summary-collapse" aria-expanded="false">{{{ summary }}}</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment