diff options
author | Thomas Willingham <founder@kakste.com> | 2012-08-09 01:35:46 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2012-08-09 01:35:46 +0100 |
commit | 29b8b8f82b72f646ea4c55d66766bd0e0c950657 (patch) | |
tree | 4b0b3a7c7fe941cddbdb359d4a7e3384e6b33dd6 /js | |
parent | 5b1a4100e07db023b0f6dae89aa009e74992b7e6 (diff) | |
parent | c28da5673731acbedecb4209c38b72046db597e1 (diff) | |
download | volse-hubzilla-29b8b8f82b72f646ea4c55d66766bd0e0c950657.tar.gz volse-hubzilla-29b8b8f82b72f646ea4c55d66766bd0e0c950657.tar.bz2 volse-hubzilla-29b8b8f82b72f646ea4c55d66766bd0e0c950657.zip |
Merge remote-tracking branch 'upstream/master'
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(); }); |