[Vtigercrm-developers] reset min-height?

Alan Lord alanslists at gmail.com
Fri Jan 8 15:32:55 GMT 2016


In layouts/vlayout/Vtiger/header.js and in app.js are functions which 
calculate and update the min-height attributes of the bodyContents, 
mainContainer and contentsDiv divs.

In a module I am writing, when I use Ajax to redraw the contents within 
the mainContainer div, one or more of these functions are recalculating 
the min-height but it is incrementing each time the dom is written to 
with the new data irrespective of whether the data being written is 
heigher than the previous contents or not - so consequently the page 
gets longer and longer with every write.

I am using jQuery('.mycontainerclass').parent().html(data); to redraw 
the contents. The parent() of mycontainerclass is the mainContainer div.

Any suggestions as to how to stop the height from growing? (Other than 
setting them all to 0 and getting it recalculated afterwards which seems 
bit hacky...

jQuery('.bodyContents').css('min-height', 0);
jQuery('.mainContainer').css('min-height', 0);
jQuery('.contentsDiv').css('min-height', 0);
app.setContentsHeight();


Thanks

Al



More information about the vtigercrm-developers mailing list