From 1ac9a4976fe6a84e3f0d9e405d929e45a0c1183c Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Mon, 5 Jan 2015 22:09:05 +0100 Subject: Unbreak readmore --- view/js/main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index f1b41bcbe..85aea9875 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -596,9 +596,11 @@ function updateConvItems(mode,data) { function collapseHeight() { $(".wall-item-body, .contact-info").each(function() { - if(! $(this).hasClass('divmore')) { - $(this).readmore({collapsedHeight: divmore_height, moreLink: ''+aStr['divgrowmore']+'', lessLink: ''+aStr['divgrowless']+''}); - $(this).addClass('divmore'); + if($(this).height() > divmore_height + 10) { + if(! $(this).hasClass('divmore')) { + $(this).readmore({collapsedHeight: divmore_height, moreLink: ''+aStr['divgrowmore']+'', lessLink: ''+aStr['divgrowless']+''}); + $(this).addClass('divmore'); + } } }); } -- cgit v1.2.3