mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:45:56 +00:00
add experimental hack to show row unread status in floating title
This commit is contained in:
@@ -268,6 +268,11 @@ div#floatingTitle a.title {
|
|||||||
color : #999;
|
color : #999;
|
||||||
font-weight : bold;
|
font-weight : bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div#floatingTitle.Unread a.title {
|
||||||
|
color : black;
|
||||||
|
}
|
||||||
|
|
||||||
div#floatingTitle img.anchor {
|
div#floatingTitle img.anchor {
|
||||||
margin-right : 1px;
|
margin-right : 1px;
|
||||||
margin-left : 0px;
|
margin-left : 0px;
|
||||||
|
|||||||
@@ -835,6 +835,8 @@ function selectionToggleUnread(set_state, callback, no_error, ids) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateFloatingTitle(true);
|
||||||
|
|
||||||
if (rows.length > 0) {
|
if (rows.length > 0) {
|
||||||
|
|
||||||
var cmode = "";
|
var cmode = "";
|
||||||
@@ -1742,6 +1744,7 @@ function cdmClicked(event, id) {
|
|||||||
|
|
||||||
if (article_is_unread) {
|
if (article_is_unread) {
|
||||||
decrementFeedCounter(getActiveFeedId(), activeFeedIsCat());
|
decrementFeedCounter(getActiveFeedId(), activeFeedIsCat());
|
||||||
|
updateFloatingTitle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
var query = "?op=rpc&method=catchupSelected" +
|
var query = "?op=rpc&method=catchupSelected" +
|
||||||
@@ -2257,8 +2260,10 @@ function scrollToRowId(id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateFloatingTitle() {
|
function updateFloatingTitle(unread_only) {
|
||||||
try {
|
try {
|
||||||
|
if (!isCdmMode()) return;
|
||||||
|
|
||||||
var hf = $("headlines-frame");
|
var hf = $("headlines-frame");
|
||||||
|
|
||||||
var elems = $$("#headlines-frame > div[id*=RROW]");
|
var elems = $$("#headlines-frame > div[id*=RROW]");
|
||||||
@@ -2271,17 +2276,24 @@ function updateFloatingTitle() {
|
|||||||
|
|
||||||
var header = child.getElementsByClassName("cdmHeader")[0];
|
var header = child.getElementsByClassName("cdmHeader")[0];
|
||||||
|
|
||||||
if (child.id != $("floatingTitle").getAttribute("rowid")) {
|
if (unread_only || child.id != $("floatingTitle").getAttribute("rowid")) {
|
||||||
$("floatingTitle").setAttribute("rowid", child.id);
|
if (child.id != $("floatingTitle").getAttribute("rowid")) {
|
||||||
$("floatingTitle").innerHTML = header.innerHTML;
|
$("floatingTitle").setAttribute("rowid", child.id);
|
||||||
$("floatingTitle").firstChild.innerHTML = "<img class='anchor markedPic' src='images/page_white_go.png' onclick=\"scrollToRowId('"+child.id+"')\">" + $("floatingTitle").firstChild.innerHTML;
|
$("floatingTitle").innerHTML = header.innerHTML;
|
||||||
|
$("floatingTitle").firstChild.innerHTML = "<img class='anchor markedPic' src='images/page_white_go.png' onclick=\"scrollToRowId('"+child.id+"')\">" + $("floatingTitle").firstChild.innerHTML;
|
||||||
|
|
||||||
initFloatingMenu();
|
initFloatingMenu();
|
||||||
|
|
||||||
var cb = $$("#floatingTitle .dijitCheckBox")[0];
|
var cb = $$("#floatingTitle .dijitCheckBox")[0];
|
||||||
|
|
||||||
if (cb)
|
if (cb)
|
||||||
cb.parentNode.removeChild(cb);
|
cb.parentNode.removeChild(cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child.hasClassName("Unread"))
|
||||||
|
$("floatingTitle").addClassName("Unread");
|
||||||
|
else
|
||||||
|
$("floatingTitle").removeClassName("Unread");
|
||||||
|
|
||||||
PluginHost.run(PluginHost.HOOK_FLOATING_TITLE, child);
|
PluginHost.run(PluginHost.HOOK_FLOATING_TITLE, child);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user