diff options
author | friendica <info@friendica.com> | 2012-08-06 23:10:37 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-08-06 23:10:37 -0700 |
commit | 5f619d3254052cb48fc47bc36e7aaabf9d33ce50 (patch) | |
tree | 4d0782455689d34265947f30344e4026f2c7a03c /js/main.js | |
parent | c673c70c25143f18b2ef6aef9ee6633d0eac46ae (diff) | |
download | volse-hubzilla-5f619d3254052cb48fc47bc36e7aaabf9d33ce50.tar.gz volse-hubzilla-5f619d3254052cb48fc47bc36e7aaabf9d33ce50.tar.bz2 volse-hubzilla-5f619d3254052cb48fc47bc36e7aaabf9d33ce50.zip |
the dynamic "show more" sort of works - but with a nagging delay. But I need to move on to bigger things. We'll leave it for now.
Diffstat (limited to 'js/main.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(); }); |