diff options
author | Habeas Codice <habeascodice@federated.social> | 2014-11-18 12:14:14 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2014-11-18 12:14:14 -0800 |
commit | 6413395a76d57960708f17016f04a682b3643aa7 (patch) | |
tree | 32ba1c7156f4e7c4bc72dcea384bfedf2d35834c /view/js/main.js | |
parent | 6cc906fd1d7226e4db2f546551c14fe04ea815e7 (diff) | |
parent | 1d96e165e00ed54df0573bda79c2a274f21aeb16 (diff) | |
download | volse-hubzilla-6413395a76d57960708f17016f04a682b3643aa7.tar.gz volse-hubzilla-6413395a76d57960708f17016f04a682b3643aa7.tar.bz2 volse-hubzilla-6413395a76d57960708f17016f04a682b3643aa7.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/view/js/main.js b/view/js/main.js index bec35ba72..8939f4a09 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -180,6 +180,13 @@ timer = setTimeout(NavUpdate,2000); } + function markItemRead(itemId) { + $.get('ping?f=&markItemRead='+itemId); + $('.unseen-wall-indicator-'+itemId).hide(); + } + + + var src = null; var prev = null; var livetime = null; @@ -200,6 +207,7 @@ var loadingPage = true; var pageHasMoreContent = true; var updateCountsOnly = false; + var divmore_height = 400; $(function() { $.ajaxSetup({cache: false}); @@ -584,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() { |