aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-17 23:48:03 -0800
committerfriendica <info@friendica.com>2014-11-17 23:48:03 -0800
commitdb3015e34ed3827e68d8debc70321ed6df5dc699 (patch)
tree776e7bf5b437e381e68f7f220d343d585a7cd88d /view/js
parent7b39fac5f07cd2e85e4e978de8b259d40c03a173 (diff)
downloadvolse-hubzilla-db3015e34ed3827e68d8debc70321ed6df5dc699.tar.gz
volse-hubzilla-db3015e34ed3827e68d8debc70321ed6df5dc699.tar.bz2
volse-hubzilla-db3015e34ed3827e68d8debc70321ed6df5dc699.zip
allow members to set the per-item "show more" height (separately for network and matrix, display and search are system pages and therefore set at 400)
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js20
1 files changed, 4 insertions, 16 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 9b5c1b1b2..8939f4a09 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -207,6 +207,7 @@
var loadingPage = true;
var pageHasMoreContent = true;
var updateCountsOnly = false;
+ var divmore_height = 400;
$(function() {
$.ajaxSetup({cache: false});
@@ -591,27 +592,14 @@ function updateConvItems(mode,data) {
function collapseHeight() {
- var isListMode = false;
- $(".wall-item-listbody").each(function() {
- isListMode = true;
- if($(this).height() > 210) {
+ $(".wall-item-body").each(function() {
+ if($(this).height() > divmore_height + 10) {
if(! $(this).hasClass('divmore')) {
- $(this).divgrow({ initialHeight: 200, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false });
+ $(this).divgrow({ initialHeight: divmore_height, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false });
$(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() {