$expand_cdm = get_pref('CDM_EXPANDED');
while ($line = $this->dbh->fetch_assoc($result)) {
- $class = ($lnum % 2) ? "even" : "odd";
-
$id = $line["id"];
$feed_id = $line["feed_id"];
$label_cache = $line["label_cache"];
array_push($topmost_article_ids, $id);
}
+ $class = "";
+
if (sql_bool_to_bool($line["unread"])) {
$class .= " Unread";
++$num_unread;
while ($line = $this->dbh->fetch_assoc($result)) {
- $class = ($lnum % 2) ? "even" : "odd";
$feed_id = $line["id"];
$this_row_id = "id=\"FUPDD-$feed_id\"";
while ($line = $this->dbh->fetch_assoc($result)) {
- $class = ($lnum % 2) ? "even" : "odd";
$feed_id = $line["id"];
$this_row_id = "id=\"FERDD-$feed_id\"";
while ($line = $this->dbh->fetch_assoc($result)) {
- $class = ($lnum % 2) ? "even" : "odd";
-
$profile_id = $line["id"];
$this_row_id = "id=\"FCATR-$profile_id\"";
print "<ul class=\"userFeedList\">";
- $row_class = "odd";
-
while ($line = $this->dbh->fetch_assoc($result)) {
$icon_file = ICONS_URL."/".$line["id"].".ico";
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
}
- print "<li class=\"$row_class\">$feed_icon <a href=\"".$line["site_url"]."\">".$line["title"]."</a></li>";
-
- $row_class = $row_class == "even" ? "odd" : "even";
+ print "<li>$feed_icon <a href=\"".$line["site_url"]."\">".$line["title"]."</a></li>";
}
while ($line = $this->dbh->fetch_assoc($result)) {
- $class = ($lnum % 2) ? "even" : "odd";
-
$uid = $line["id"];
print "<tr id=\"UMRR-$uid\">";
if (!hsp) hsp = new Element("DIV", {"id": "headlines-spacer"});
- fixHeadlinesOrder(getLoadedArticleIds());
-
if (getInitParam("cdm_auto_catchup") == 1) {
c.domNode.appendChild(hsp);
}
return false;
}
-function fixHeadlinesOrder(ids) {
- try {
- for (var i = 0; i < ids.length; i++) {
- var e = $("RROW-" + ids[i]);
-
- if (e) {
- if (i % 2 == 0) {
- e.removeClassName("even");
- e.addClassName("odd");
- } else {
- e.removeClassName("odd");
- e.addClassName("even");
- }
- }
- }
- } catch (e) {
- exception_error("fixHeadlinesOrder", e);
- }
-}
-
function getArticleUnderPointer() {
return post_under_pointer;
}
if (sel.length > 0)
selectionToggleUnread(false);
- fixHeadlinesOrder(tmp);
} catch (e) {
exception_error("dismissSelectedArticles", e);
}
}
- fixHeadlinesOrder(tmp);
-
} catch (e) {
exception_error("dismissSelectedArticles", e);
}
}
}
-function get_visible_article_ids() {
+function parse_article_elements_for_ids(elems) {
try {
- var elems = $("headlines-content").getElementsByTagName("LI");
var ids = [];
for (var i = 0; i < elems.length; i++) {
return ids;
+ } catch (e) {
+ exception_error("parse_article_elements_for_ids", e);
+ }
+}
+
+function get_selected_article_ids() {
+ try {
+ var elems = $$('#headlines-content li.selected');
+
+ return parse_article_elements_for_ids(elems);
+
+ } catch (e) {
+ exception_error("get_visible_article_ids", e);
+ }
+}
+
+function get_visible_article_ids() {
+ try {
+ var elems = $("headlines-content").getElementsByTagName("LI");
+
+ return parse_article_elements_for_ids(elems);
+
} catch (e) {
exception_error("get_visible_article_ids", e);
}
function catchup_visible_articles(callback) {
try {
- var ids = get_visible_article_ids();
+ var ids = get_selected_article_ids();
+ if ( 0 == ids.length ) {
+ ids = get_visible_article_ids();
+ ntext = [ "Mark %d displayed article as read?", "Mark %d displayed articles as read?" ];
+ } else {
+ ntext = [ "Mark %d selected article as read?", "Mark %d selected articles as read?" ];
+ }
- if (confirm(ngettext("Mark %d displayed article as read?", "Mark %d displayed articles as read?", ids.length).replace("%d", ids.length))) {
+ if (confirm(ngettext(ntext[0], ntext[1], ids.length).replace("%d", ids.length))) {
var query = "op=rpc&method=catchupSelected" +
"&cmode=0&ids=" + param_escape(ids);
font-weight : bold;
}
-.hl.even.Grayed {
- background : #f0f0f0;
+.hl.Grayed {
color : #909090;
- border-width : 0px 0px 1px 0px;
- border-style : solid;
- border-color : #c0c0c0;
- border-collapse : collapse;
}
-.hl.odd.Grayed {
- color : #909090;
+#headlines-frame div.hl:nth-child(even) {
+ background : #f0f0f0;
}
.hl {
background : #ecf4ff ! important;
}
-.hl.even {
- background : #f0f0f0;
- border-collapse : collapse;
-}
-
-.hl.odd {
- background : white;
-}
-
div.filterTestHolder {
height : 300px;
overflow : auto;