[Vtigercrm-developers] reset min-height?
Richard Hills - Technologywise
richard at tw.co.nz
Sun Jan 10 20:24:04 GMT 2016
Unfortunately it was quite some time ago, but I believe I likely had the
same problem, I found the following change to this part of our code
which I suspect is related / the solution:
> ./layouts/vlayout/modules/Vtiger/resources/Header.js
> adjustContentHeight: function(){
> if(app.getViewName() === 'Detail' || app.getViewName()
> === 'Calendar' || app.getViewName() === 'ExtensionImport'){
> if(jQuery('div.detailViewInfo >
> .related').outerHeight() > jQuery('div.detailViewInfo > div.details
> ').outerHeight()){
> jQuery('div.detailViewInfo >
> div.details').css('min-height',jQuery('.detailViewInfo >
> .related').outerHeight());
> }
> bodyHeight =
> jQuery('div.detailViewContainer').outerHeight();
> }else{
> # I Changed this adding -10....
> bodyHeight =
> jQuery(".bodyContents").outerHeight() - 10;
> }
> jQuery(".mainContainer").css('min-height', bodyHeight);
> jQuery(".mainContainer > .span2 ").css('min-height',
> bodyHeight);
> jQuery(".contentsDiv").css('min-height', bodyHeight);
>
> },
On 09/01/16 04:32, Alan Lord wrote:
> 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
>
> _______________________________________________
> http://www.vtiger.com/
--
Richard Hills
TechnologyWise Ltd, Tauranga, NZ
richard at tw.co.nz
www.technologywise.co.nz
ph: +64 (0)7 571 1060
fax: +64 (0)7 571 1061
More information about the vtigercrm-developers
mailing list