From: Andrew Dolgov Date: Fri, 26 Jan 2007 05:36:19 +0000 (+0100) Subject: cdm tweaks, misc fixes X-Git-Tag: 1.2.8~32 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c50e2b3004252f5f775741020003c5935560f0f7;p=tt-rss.git cdm tweaks, misc fixes --- diff --git a/backend.php b/backend.php index d61d18f2..326911e3 100644 --- a/backend.php +++ b/backend.php @@ -451,9 +451,11 @@ if ($line["marked"] == "t" || $line["marked"] == "1") { $marked_pic = "\"Reset"; } else { $marked_pic = "\"Set"; } @@ -534,10 +536,7 @@ print "
"; - print "
$updated_fmt - -
"; + print "
$updated_fmt
"; print "" . $line["content_preview"] . "

"; - print "
$marked_pic
-
"; + print ""; diff --git a/feedlist.js b/feedlist.js index 286d972e..3a475ece 100644 --- a/feedlist.js +++ b/feedlist.js @@ -37,7 +37,11 @@ function viewFeedGoPage(i) { function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { try { - if (!offset) page_offset = 0; + //if (!offset) page_offset = 0; + + if (offset != undefined) { + page_offset = offset; + } enableHotkeys(); @@ -106,8 +110,8 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { query = query + "&cat=1"; } - if (offset) { - query = query + "&skip=" + offset; + if (page_offset != 0) { + query = query + "&skip=" + page_offset; } if (navigator.userAgent.match("Opera")) { diff --git a/functions.php b/functions.php index 8b98d142..5f3978ff 100644 --- a/functions.php +++ b/functions.php @@ -949,7 +949,7 @@ } $feed = "$feed_title"; + href=\"javascript:viewfeed('$feed_id', '', false, '', false, 0);\">$feed_title"; print "
  • "; if (get_pref($link, 'ENABLE_FEED_ICONS')) { diff --git a/tt-rss.css b/tt-rss.css index 85f0a8d6..ac44a1b4 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -806,6 +806,16 @@ div.cdmFooter { padding-top : 5px; } +div.cdmFooter img.markedPic { + width : 16px; + height : 16px; + float : right; +} + +div.cdmHeader div.articleUpdated { + float : right; +} + div.cdmFooter input, div.cdmHeader input, div.cdmFooter img { margin : 0px; } @@ -1416,3 +1426,4 @@ ul.headlineDropdownMenu ul li:hover { background-color : #f0f0f0; } + diff --git a/viewfeed.js b/viewfeed.js index 8e3fe422..8492a234 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -553,8 +553,6 @@ function cdmWatchdog() { var ctr = document.getElementById("headlinesInnerContainer"); - if (!ctr.hasChildNodes()) return; - var ids = new Array(); var e = ctr.firstChild; @@ -583,6 +581,15 @@ function cdmWatchdog() { } + // method 2: article bottom is visible and is in upper 1/2 of the viewport + +/* if (e.offsetTop + e.offsetHeight >= ctr.scrollTop && + e.offsetTop + e.offsetHeight <= ctr.scrollTop + ctr.offsetHeight/2) { + + ids.push(e.id.replace("RROW-", "")); + + } */ + } e = e.nextSibling; @@ -604,11 +611,11 @@ function cdmWatchdog() { xmlhttp_rpc.open("GET", query, true); xmlhttp_rpc.onreadystatechange=all_counters_callback; - xmlhttp_rpc.send(null); + xmlhttp_rpc.send(null); } - _cdm_wd_timeout = window.setTimeout("cdmWatchdog()", 5000); + _cdm_wd_timeout = window.setTimeout("cdmWatchdog()", 4000); } catch (e) { exception_error(e, "cdmWatchdog");