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.

This commit is contained in:
friendica
2012-08-06 23:10:37 -07:00
parent c673c70c25
commit 5f619d3254
15 changed files with 316 additions and 49 deletions

View File

@@ -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();
});