summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/FeedTree.js2
-rw-r--r--js/tt-rss.js44
-rw-r--r--js/viewfeed.js15
3 files changed, 23 insertions, 38 deletions
diff --git a/js/FeedTree.js b/js/FeedTree.js
index 6c06f00d5..a9a69187e 100644
--- a/js/FeedTree.js
+++ b/js/FeedTree.js
@@ -393,7 +393,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
if (node) {
var check_unread = tree.model.getFeedUnread(bare_id, true);
- if (hide && cat_unread == 0 && check_unread == 0) {
+ if (hide && cat_unread == 0 && check_unread == 0 && (id != "CAT:-1" || !show_special)) {
Effect.Fade(node[0].rowNode, {duration : 0.3,
queue: { position: 'end', scope: 'FFADE-' + id, limit: 1 }});
} else {
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 84f2e67b1..38182c7ad 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -512,6 +512,8 @@ function init() {
setCookie("ttrss_ci_height", 0);
switchPanelMode(_widescreen_mode);
+ } else {
+ alert(__("Widescreen is not available in combined mode."));
}
};
hotkey_actions["help_dialog"] = function() {
@@ -711,6 +713,8 @@ function quickMenuGo(opid) {
setCookie("ttrss_ci_height", 0);
switchPanelMode(_widescreen_mode);
+ } else {
+ alert(__("Widescreen is not available in combined mode."));
}
break;
case "qmcHKhelp":
@@ -756,15 +760,6 @@ function parse_runtime_info(data) {
// console.log("RI: " + k + " => " + v);
- if (k == "new_version_available") {
- if (v == "1") {
- Element.show(dijit.byId("newVersionIcon").domNode);
- } else {
- Element.hide(dijit.byId("newVersionIcon").domNode);
- }
- return;
- }
-
if (k == "dep_ts" && parseInt(getInitParam("dep_ts")) > 0) {
if (parseInt(getInitParam("dep_ts")) < parseInt(v) && getInitParam("reload_on_ts_change")) {
window.location.reload();
@@ -776,6 +771,16 @@ function parse_runtime_info(data) {
return;
}
+ if (k == "update_result") {
+ var updatesIcon = dijit.byId("updatesIcon").domNode;
+
+ if (v) {
+ Element.show(updatesIcon);
+ } else {
+ Element.hide(updatesIcon);
+ }
+ }
+
if (k == "daemon_stamp_ok" && v != 1) {
notify_error("<span onclick=\"javascript:explainError(3)\">Update daemon is not updating feeds.</span>", true);
return;
@@ -968,27 +973,6 @@ function reverseHeadlineOrder() {
}
}
-function newVersionDlg() {
- try {
- var query = "backend.php?op=dlg&method=newVersion";
-
- if (dijit.byId("newVersionDlg"))
- dijit.byId("newVersionDlg").destroyRecursive();
-
- dialog = new dijit.Dialog({
- id: "newVersionDlg",
- title: __("New version available!"),
- style: "width: 600px",
- href: query,
- });
-
- dialog.show();
-
- } catch (e) {
- exception_error("newVersionDlg", e);
- }
-}
-
function handle_rpc_json(transport, scheduled_call) {
try {
var reply = JSON.parse(transport.responseText);
diff --git a/js/viewfeed.js b/js/viewfeed.js
index c319a8ed0..f236e1f7c 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -56,7 +56,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
if (infscroll_req == false) {
$("headlines-frame").scrollTop = 0;
- Element.hide("floatingTitle");
+ $("floatingTitle").style.visibility = "hidden";
$("floatingTitle").setAttribute("rowid", 0);
$("floatingTitle").innerHTML = "";
}
@@ -1532,7 +1532,7 @@ function cdmCollapseArticle(event, id, unmark) {
if (row.offsetTop < $("headlines-frame").scrollTop)
scrollToRowId(row.id);
- Element.hide("floatingTitle");
+ $("floatingTitle").style.visibility = "hidden";
$("floatingTitle").setAttribute("rowid", false);
}
@@ -2357,7 +2357,7 @@ function scrollToRowId(id) {
var row = $(id);
if (row)
- $("headlines-frame").scrollTop = row.offsetTop;
+ $("headlines-frame").scrollTop = row.offsetTop - 4;
} catch (e) {
exception_error("scrollToRowId", e);
@@ -2402,11 +2402,12 @@ function updateFloatingTitle(unread_only) {
PluginHost.run(PluginHost.HOOK_FLOATING_TITLE, child);
}
- if (child.offsetTop < hf.scrollTop - header.offsetHeight &&
- child.offsetTop + child.offsetHeight - hf.scrollTop > header.offsetHeight)
- Element.show("floatingTitle");
+ $("floatingTitle").style.marginRight = hf.offsetWidth - child.offsetWidth + "px";
+ if (header.offsetTop + header.offsetHeight < hf.scrollTop + $("floatingTitle").offsetHeight - 5 &&
+ child.offsetTop + child.offsetHeight >= hf.scrollTop + $("floatingTitle").offsetHeight - 5)
+ $("floatingTitle").style.visibility = "visible";
else
- Element.hide("floatingTitle");
+ $("floatingTitle").style.visibility = "hidden";
return;