when in list mode, make the max height half of the normal height before 'divgrow' kicks in.
This commit is contained in:
parent
591f10e235
commit
acc8c69242
@ -458,25 +458,17 @@ function updateConvItems(mode,data) {
|
|||||||
if(isVisible)
|
if(isVisible)
|
||||||
showHideComments(itmId);
|
showHideComments(itmId);
|
||||||
$(".autotime").timeago();
|
$(".autotime").timeago();
|
||||||
// divgrow doesn't prevent itself from attaching a second (or 500th)
|
|
||||||
// "show more" div to a content region - it also has a few other
|
|
||||||
// issues related to how we're trying to use it.
|
|
||||||
// disable for now.
|
|
||||||
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('img',this).each(function() {
|
$('img',this).each(function() {
|
||||||
$(this).attr('src',$(this).attr('dst'));
|
$(this).attr('src',$(this).attr('dst'));
|
||||||
});
|
});
|
||||||
// more FIXME related to expanded comments
|
|
||||||
if($('#collapsed-comments-'+itmId).is(':visible'))
|
if($('#collapsed-comments-'+itmId).is(':visible'))
|
||||||
isVisible = true;
|
isVisible = true;
|
||||||
$('#' + ident).replaceWith($(this));
|
$('#' + ident).replaceWith($(this));
|
||||||
if(isVisible)
|
if(isVisible)
|
||||||
showHideComments(itmId);
|
showHideComments(itmId);
|
||||||
$(".autotime").timeago();
|
$(".autotime").timeago();
|
||||||
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
|
|
||||||
|
|
||||||
}
|
}
|
||||||
prev = ident;
|
prev = ident;
|
||||||
});
|
});
|
||||||
@ -508,8 +500,6 @@ function updateConvItems(mode,data) {
|
|||||||
if(isVisible)
|
if(isVisible)
|
||||||
showHideComments(itmId);
|
showHideComments(itmId);
|
||||||
$(".autotime").timeago();
|
$(".autotime").timeago();
|
||||||
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('img',this).each(function() {
|
$('img',this).each(function() {
|
||||||
@ -521,7 +511,6 @@ function updateConvItems(mode,data) {
|
|||||||
if(isVisible)
|
if(isVisible)
|
||||||
showHideComments(itmId);
|
showHideComments(itmId);
|
||||||
$(".autotime").timeago();
|
$(".autotime").timeago();
|
||||||
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -557,7 +546,6 @@ function updateConvItems(mode,data) {
|
|||||||
showHideComments(itmId);
|
showHideComments(itmId);
|
||||||
$(".autotime").timeago();
|
$(".autotime").timeago();
|
||||||
|
|
||||||
// $("div.wall-item-body").divgrow({ initialHeight: 400 });
|
|
||||||
}
|
}
|
||||||
prev = ident;
|
prev = ident;
|
||||||
});
|
});
|
||||||
@ -596,18 +584,29 @@ function updateConvItems(mode,data) {
|
|||||||
|
|
||||||
|
|
||||||
function collapseHeight() {
|
function collapseHeight() {
|
||||||
$(".wall-item-body").each(function() {
|
var isListMode = false;
|
||||||
if($(this).height() > 410) {
|
$(".wall-item-listbody").each(function() {
|
||||||
|
isListMode = true;
|
||||||
|
if($(this).height() > 210) {
|
||||||
if(! $(this).hasClass('divmore')) {
|
if(! $(this).hasClass('divmore')) {
|
||||||
$(this).divgrow({ initialHeight: 400, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false });
|
$(this).divgrow({ initialHeight: 200, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false });
|
||||||
$(this).addClass('divmore');
|
$(this).addClass('divmore');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".wall-item-body").each(function() {
|
||||||
|
if(! isListMode) {
|
||||||
|
if($(this).height() > 410) {
|
||||||
|
if(! $(this).hasClass('divmore')) {
|
||||||
|
$(this).divgrow({ initialHeight: 400, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false });
|
||||||
|
$(this).addClass('divmore');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function liveUpdate() {
|
function liveUpdate() {
|
||||||
if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').spin(false); return; }
|
if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').spin(false); return; }
|
||||||
if(($('.comment-edit-text-full').length) || (in_progress)) {
|
if(($('.comment-edit-text-full').length) || (in_progress)) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="wall-item-content" id="wall-item-content-{{$item.id}}">
|
<div class="wall-item-content" id="wall-item-content-{{$item.id}}">
|
||||||
<div class="wall-item-title-end"></div>
|
<div class="wall-item-title-end"></div>
|
||||||
<div class="wall-item-body" id="wall-item-body-{{$item.id}}" >
|
<div class="wall-item-body wall-item-listbody" id="wall-item-body-{{$item.id}}" >
|
||||||
{{$item.body}}
|
{{$item.body}}
|
||||||
{{if $item.tags}}
|
{{if $item.tags}}
|
||||||
<div class="body-tag">
|
<div class="body-tag">
|
||||||
|
Reference in New Issue
Block a user