aboutsummaryrefslogtreecommitdiffstats
path: root/js/main.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-24 21:03:15 -0700
committerfriendica <info@friendica.com>2012-07-24 21:03:15 -0700
commitea13ece8901519d6a0f765eb573b75a2f13aa4c1 (patch)
treec19eccf73ec2e12cc87e474794d1e6d7498bb62f /js/main.js
parent4b36e41b098ae805d8a25e1c4ce7f38161418eea (diff)
downloadvolse-hubzilla-ea13ece8901519d6a0f765eb573b75a2f13aa4c1.tar.gz
volse-hubzilla-ea13ece8901519d6a0f765eb573b75a2f13aa4c1.tar.bz2
volse-hubzilla-ea13ece8901519d6a0f765eb573b75a2f13aa4c1.zip
rev update
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js69
1 files changed, 33 insertions, 36 deletions
diff --git a/js/main.js b/js/main.js
index 47ce61704..29af7eb59 100644
--- a/js/main.js
+++ b/js/main.js
@@ -260,6 +260,10 @@ function updateConvItems(mode,data) {
}
if(mode === 'replace') {
// clear existing content
+ $('.thread-wrapper').remove();
+
+ prev = 'threads-begin';
+
$('.thread-wrapper',data).each(function() {
var ident = $(this).attr('id');
@@ -677,42 +681,6 @@ function previewTheme(elm) {
}
-// This can be used for dynamic "show more" based purely on the
-// height of the enclosed HTML (which has overflow: hidden).
-// if ($(el).vScrollable()) {
-// show_more_link(el);
-// }
-// when link is clicked do $(el).css('overflow','visible')
-//
-// We do this by cloning the element in question but in a hidden div which displays overflow content and compare the heights
-// of the two elements. Then we remove the hidden div we just created.
-
-(function($) {
- $.fn.vScrollable = function() {
- return this.each(function() {
- var el = $(this);
- var tooHigh = false;
-
- if(el.css("overflow") == "hidden") {
- var text = el.html();
- var t = $(this.cloneNode(true))
- .hide()
- .css('position', 'absolute')
- .css('overflow', 'visible')
- .width(el.width())
- .height('auto')
- ;
- el.after(t);
- tooHigh = (t.height() > el.height());
- el.parentNode.removeChild(el);
- }
- return tooHigh;
- });
- };
-})(jQuery);
-
-
-
$(document).ready(function() {
jQuery.timeago.settings.strings = {
@@ -735,6 +703,35 @@ jQuery.timeago.settings.strings = {
numbers: tago17
};
+//$('.wall-item-content').each(function() {
+
+// var totalHeight = 0;
+// $(this).children().each(function(){
+// totalHeight += $(this).outerHeight(true); // true = include margins
+// });
+// if(totalHeight > 400) {
+// $(this).css({'overflow-y':'hidden','max-height' : '400px'});
+
+// }
+// else {
+// $(this).css('overflow-y','visible');
+// }
+// });
+
+
+$('.wall-item-content').css({'overflow-y':'hidden','max-height' : '400px'});
+
+$('.wall-item-content').focus(
+ function() {
+ $(this).css('overflow-y','visible')
+ });
+
+$('.wall-item-content').focusout(
+ function() {
+ $(this).css( { 'overflow-y' : 'hidden','max-height' : '400px'});
+ }
+);
+
$("abbr.wall-item-ago-time").timeago();
}); \ No newline at end of file