aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-07-15 14:53:15 +0200
committerMario Vavti <mario@mariovavti.com>2016-07-15 14:53:15 +0200
commit9048f8cffea94b653e97bed421e2be10c9c6a7d3 (patch)
treeb5627fe8bf83136d354f7a2ccaee97a6cba84b07 /view
parent4a2fb8336e71557757f13136ae62639cc9732c22 (diff)
downloadvolse-hubzilla-9048f8cffea94b653e97bed421e2be10c9c6a7d3.tar.gz
volse-hubzilla-9048f8cffea94b653e97bed421e2be10c9c6a7d3.tar.bz2
volse-hubzilla-9048f8cffea94b653e97bed421e2be10c9c6a7d3.zip
bump minor version because of jquery update
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 90ca92078..8280d2ddb 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -653,7 +653,7 @@ function updateConvItems(mode,data) {
}
function collapseHeight() {
- var origContentHeight = parseInt($("#region_2").height());
+ var origContentHeight = Math.ceil($("#region_2").height());
var cDiff = 0;
var i = 0;
var position = $(window).scrollTop();
@@ -663,19 +663,13 @@ function collapseHeight() {
if(orgHeight > divmore_height) {
if(! $(this).hasClass('divmore')) {
- //var trigger = $(window).scrollTop() < $(this).offset().top ? true : false;
- //console.log($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i));
-
// check if we will collapse some content above the visible content and compensate the diff later
if($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i) < 65) {
- //$(this).css('color', 'red');
- //console.log($(this).offset().top + divmore_height + ' / ' + $(window).scrollTop());
diff = orgHeight - divmore_height;
cDiff = cDiff + diff;
i++;
}
- //if(trigger) {
$(this).readmore({
speed: 0,
heightMargin: 50,
@@ -691,12 +685,11 @@ function collapseHeight() {
}
});
$(this).addClass('divmore');
- //}
}
}
});
- var collapsedContentHeight = parseInt($("#region_2").height());
+ var collapsedContentHeight = Math.ceil($("#region_2").height());
contentHeightDiff = origContentHeight - collapsedContentHeight;
console.log('collapseHeight() - contentHeightDiff: ' + contentHeightDiff + 'px');