Skip to content
Snippets Groups Projects
Commit d1d51bda authored by Myriam Delaruelle's avatar Myriam Delaruelle
Browse files

fix height course header

parent f380c866
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ define(['jquery', 'core/ajax', 'core/str'],
registerHeader:function(){
var heightWrapper= $("#summary-wrapper").css("height");
console.log(heightWrapper);
if(parseInt(heightWrapper, 10) >= 144){
$("#button-collapse").click(function(){
if($("#summary-wrapper").hasClass('collapsed')){
......@@ -41,8 +41,10 @@ define(['jquery', 'core/ajax', 'core/str'],
}
else{
var height= $("#summary-collapse").css("height");
$("#summary-wrapper").animate({ "max-height": height }, "slow" );
var height= $("#summary-collapse").height();
var calcHeight=height+20;
$("#summary-wrapper").animate({ "max-height": calcHeight+'px' }, "slow" );
var message=str.get_string('hideInfos', 'format_iena');
$.when(message).done(function(localizedEditString) {
$("#button-collapse").text(localizedEditString);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment