$("headlines-frame").scrollTop = 0;
$("floatingTitle").style.visibility = "hidden";
- $("floatingTitle").setAttribute("rowid", 0);
+ $("floatingTitle").setAttribute("data-article-id", 0);
$("floatingTitle").innerHTML = "";
}
} catch (e) { };
var ft = $("floatingTitle");
- if (ft && ft.getAttribute("rowid") == "RROW-" + id) {
+ if (ft && ft.getAttribute("data-article-id") == id) {
var fte = ft.getElementsByClassName("markedPic");
for (var i = 0; i < fte.length; i++)
var ft = $("floatingTitle");
- if (ft && ft.getAttribute("rowid") == "RROW-" + id) {
+ if (ft && ft.getAttribute("data-article-id") == id) {
var fte = ft.getElementsByClassName("pubPic");
for (var i = 0; i < fte.length; i++)
$$("#headlines-frame > div[id*=RROW][class*=Selected]").each(
function(child) {
- rv.push(child.id.replace("RROW-", ""));
+ rv.push(child.getAttribute("data-article-id"));
});
return rv;
children.each(function(child) {
if (Element.visible(child)) {
- rv.push(child.id.replace("RROW-", ""));
+ rv.push(child.getAttribute("data-article-id"));
}
});
var children = $$(query);
children.each(function(child) {
- var id = child.id.replace("RROW-", "");
+ var id = child.getAttribute("data-article-id");
var cb = dijit.getEnclosingWidget(
child.getElementsByClassName("rchk")[0]);
});
var tmph = dojo.connect(dialog, 'onLoad', function() {
- dojo.disconnect(tmph);
+ dojo.disconnect(tmph);
new Ajax.Autocompleter('tags_str', 'tags_choices',
"backend.php?op=article&method=completeTags",
if (child.offsetTop <= $("headlines-frame").scrollTop +
$("headlines-frame").offsetHeight) {
- var cencw = $("CENCW-" + child.id.replace("RROW-", ""));
+ var cencw = $("CENCW-" + child.getAttribute("data-article-id"));
if (cencw) {
cencw.innerHTML = htmlspecialchars_decode(cencw.innerHTML);
if ($("headlines-frame").scrollTop <= child.offsetTop &&
child.offsetTop - $("headlines-frame").scrollTop < 100 &&
- child.id.replace("RROW-", "") != _active_article_id) {
+ child.getAttribute("data-article-id") != _active_article_id) {
if (_active_article_id) {
var row = $("RROW-" + _active_article_id);
if (row) row.removeClassName("active");
}
- _active_article_id = child.id.replace("RROW-", "");
+ _active_article_id = child.getAttribute("data-article-id");
showArticleInHeadlines(_active_article_id, true);
updateSelectedPrompt();
break;
if (child.hasClassName("Unread") && $("headlines-frame").scrollTop >
(child.offsetTop + child.offsetHeight/2)) {
- var id = child.id.replace("RROW-", "");
+ var id = child.getAttribute("data-article-id")
if (catchup_id_batch.indexOf(id) == -1)
catchup_id_batch.push(id);
scrollToRowId(row.id);
$("floatingTitle").style.visibility = "hidden";
- $("floatingTitle").setAttribute("rowid", false);
+ $("floatingTitle").setAttribute("data-article-id", 0);
}
} catch (e) {
var callerNode = event.target, match = null, tries = 0;
while (match == null && callerNode && tries <= 3) {
- match = callerNode.getAttribute("rowid").match("^[A-Z]+[-]([0-9]+)$");
+ match = callerNode.getAttribute("data-article-id");
callerNode = callerNode.parentNode;
++tries;
}
- if (match) this.callerRowId = parseInt(match[1]);
+ if (match) this.callerRowId = match;
});
var callerNode = event.target, match = null, tries = 0;
while (match == null && callerNode && tries <= 3) {
- match = callerNode.id.match("^[A-Z]+[-]([0-9]+)$");
+
+ match = callerNode.getAttribute("data-article-id")
callerNode = callerNode.parentNode;
++tries;
}
- if (match) this.callerRowId = parseInt(match[1]);
+ if (match) this.callerRowId = match;
});
var callerNode = event.target, match = null, tries = 0;
while (match == null && callerNode && tries <= 3) {
- match = callerNode.id.match("^[A-Z]+[-]([0-9]+)$");
+ match = callerNode.getAttribute("data-feed-id")
callerNode = callerNode.parentNode;
++tries;
}
- if (match) this.callerRowId = parseInt(match[1]);
+ if (match) this.callerRowId = match;
});
onClick: function(event) {
selectArticles("all",
"#headlines-frame > div[id*=RROW]"+
- "[orig-feed-id='"+menu.callerRowId+"']");
+ "[data-orig-feed-id='"+menu.callerRowId+"']");
}}));
selectArticles("none");
selectArticles("all",
"#headlines-frame > div[id*=RROW]"+
- "[orig-feed-id='"+menu.callerRowId+"']");
+ "[data-orig-feed-id='"+menu.callerRowId+"']");
catchupSelection();
}}));
var header = child.getElementsByClassName("cdmHeader")[0];
- if (unread_only || child.id != $("floatingTitle").getAttribute("rowid")) {
- if (child.id != $("floatingTitle").getAttribute("rowid")) {
- $("floatingTitle").setAttribute("rowid", child.id);
+ if (unread_only || child.getAttribute("data-article-id") != $("floatingTitle").getAttribute("data-article-id")) {
+ if (child.getAttribute("data-article-id") != $("floatingTitle").getAttribute("data-article-id")) {
+
+ $("floatingTitle").setAttribute("data-article-id", child.getAttribute("data-article-id"));
$("floatingTitle").innerHTML = header.innerHTML;
$("floatingTitle").firstChild.innerHTML = "<img class='anchor markedPic' src='images/page_white_go.png' onclick=\"scrollToRowId('"+child.id+"')\">" + $("floatingTitle").firstChild.innerHTML;