From c0ad4763b30238aead8f1187efd669080c52a149 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 17 Nov 2014 15:18:06 -0800 Subject: add unseen count and way to mark unseen to list mode. Also fix automatic mark of unseen so as to work with list mode. --- view/js/main.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'view/js/main.js') diff --git a/view/js/main.js b/view/js/main.js index bec35ba72..9b5c1b1b2 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; -- cgit v1.2.3 From db3015e34ed3827e68d8debc70321ed6df5dc699 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 17 Nov 2014 23:48:03 -0800 Subject: 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) --- view/js/main.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'view/js/main.js') 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() { -- cgit v1.2.3