diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/main.js | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/js/main.js b/js/main.js index 438b7db14..b31261065 100644 --- a/js/main.js +++ b/js/main.js @@ -303,12 +303,43 @@ function updateConvItems(mode,data) { /* autocomplete @nicknames */ $(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl"); + + var bimgs = $(".wall-item-body > img").not(function() { return this.complete; }); + var bimgcount = bimgs.length; + if (bimgcount) { + bimgs.load(function() { + bimgcount--; + if (! bimgcount) { + collapseHeight(); + + } + }); + } else { + collapseHeight(); + } -} + // $(".wall-item-body").each(function() { + // if(! $(this).hasClass('divmore')) { + // $(this).divgrow({ initialHeight: 400, showBrackets: false }); + // $(this).addClass('divmore'); + // } + //}); + +} + function collapseHeight() { + $(".wall-item-body").each(function() { + if($(this).height() > 410) { + if(! $(this).hasClass('divmore')) { + $(this).divgrow({ initialHeight: 400, showBrackets: false }); + $(this).addClass('divmore'); + } + } + }); + } @@ -737,6 +768,7 @@ jQuery.timeago.settings.strings = { $("abbr.wall-item-ago-time").timeago(); //$("div.wall-item-body").divgrow({ initialHeight: 400 }); +//reCalcHeight(); }); |