mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-26 00:21:29 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -162,6 +162,13 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
|
||||
tnode._menu = menu;
|
||||
}
|
||||
|
||||
if (id.match("CAT:")) {
|
||||
loading = dojo.doc.createElement('img');
|
||||
loading.className = 'loadingNode';
|
||||
dojo.place(loading, tnode.labelNode, 'after');
|
||||
tnode.loadingNode = loading;
|
||||
}
|
||||
|
||||
if (id.match("CAT:") && bare_id == -1) {
|
||||
var menu = new dijit.Menu();
|
||||
menu.row_id = bare_id;
|
||||
@@ -243,8 +250,15 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
|
||||
|
||||
if (treeNode) {
|
||||
treeNode = treeNode[0];
|
||||
treeNode.expandoNode.src = src;
|
||||
return true;
|
||||
if (is_cat) {
|
||||
if (treeNode.loadingNode) {
|
||||
treeNode.loadingNode.src = src;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
treeNode.expandoNode.src = src;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -309,7 +323,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
|
||||
var node = tree._itemNodesMap[id];
|
||||
|
||||
if (node) {
|
||||
if (hide && unread == 0 && (bare_id > 0 || !show_special)) {
|
||||
if (hide && unread == 0 && (bare_id > 0 || bare_id < -10 || !show_special)) {
|
||||
Effect.Fade(node[0].rowNode, {duration : 0.3,
|
||||
queue: { position: 'end', scope: 'FFADE-' + id, limit: 1 }});
|
||||
} else {
|
||||
|
||||
@@ -125,13 +125,11 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req) {
|
||||
|
||||
Form.enable("main_toolbar_form");
|
||||
|
||||
if (!offset)
|
||||
if (!is_cat) {
|
||||
if (!setFeedExpandoIcon(feed, is_cat, 'images/indicator_white.gif'))
|
||||
notify_progress("Loading, please wait...", true);
|
||||
} else {
|
||||
if (!offset) {
|
||||
if (!setFeedExpandoIcon(feed, is_cat,
|
||||
(is_cat) ? 'images/indicator_tiny.gif' : 'images/indicator_white.gif'))
|
||||
notify_progress("Loading, please wait...", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query += "&cat=" + is_cat;
|
||||
@@ -154,7 +152,6 @@ function feedlist_init() {
|
||||
try {
|
||||
console.log("in feedlist init");
|
||||
|
||||
hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
|
||||
document.onkeydown = hotkey_handler;
|
||||
setTimeout("hotkey_prefix_timeout()", 5*1000);
|
||||
|
||||
|
||||
22
js/tt-rss.js
22
js/tt-rss.js
@@ -248,9 +248,11 @@ function init() {
|
||||
loading_set_progress(20);
|
||||
|
||||
var hasAudio = !!((myAudioTag = document.createElement('audio')).canPlayType);
|
||||
var hasSandbox = "sandbox" in document.createElement("iframe");
|
||||
|
||||
new Ajax.Request("backend.php", {
|
||||
parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio},
|
||||
parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio,
|
||||
hasSandbox: hasSandbox},
|
||||
onComplete: function(transport) {
|
||||
backend_sanity_check_callback(transport);
|
||||
} });
|
||||
@@ -560,7 +562,7 @@ function hotkey_handler(e) {
|
||||
if (keycode == 16) return; // ignore lone shift
|
||||
if (keycode == 17) return; // ignore lone ctrl
|
||||
|
||||
if (!shift_key) keychar = keychar.toLowerCase();
|
||||
keychar = keychar.toLowerCase();
|
||||
|
||||
var hotkeys = getInitParam("hotkeys");
|
||||
|
||||
@@ -581,7 +583,11 @@ function hotkey_handler(e) {
|
||||
Element.hide(cmdline);
|
||||
|
||||
var hotkey = keychar.search(/[a-zA-Z0-9]/) != -1 ? keychar : "(" + keycode + ")";
|
||||
|
||||
// ensure ^*char notation
|
||||
if (shift_key) hotkey = "*" + hotkey;
|
||||
if (ctrl_key) hotkey = "^" + hotkey;
|
||||
|
||||
hotkey = hotkey_prefix ? hotkey_prefix + " " + hotkey : hotkey;
|
||||
hotkey_prefix = false;
|
||||
|
||||
@@ -657,10 +663,14 @@ function hotkey_handler(e) {
|
||||
catchupRelativeToArticle(0);
|
||||
return false;
|
||||
case "article_scroll_down":
|
||||
scrollArticle(50);
|
||||
var ctr = $("content_insert") ? $("content_insert") : $("headlines-frame");
|
||||
|
||||
scrollArticle(ctr.offsetHeight/3);
|
||||
return false;
|
||||
case "article_scroll_up":
|
||||
scrollArticle(-50);
|
||||
var ctr = $("content_insert") ? $("content_insert") : $("headlines-frame");
|
||||
|
||||
scrollArticle(-ctr.offsetHeight/3);
|
||||
return false;
|
||||
case "close_article":
|
||||
closeArticlePanel();
|
||||
@@ -668,6 +678,8 @@ function hotkey_handler(e) {
|
||||
case "email_article":
|
||||
if (typeof emailArticle != "undefined") {
|
||||
emailArticle();
|
||||
} else if (typeof mailtoArticle != "undefined") {
|
||||
mailtoArticle();
|
||||
} else {
|
||||
alert(__("Please enable mail plugin first."));
|
||||
}
|
||||
@@ -893,8 +905,6 @@ function handle_rpc_json(transport, scheduled_call) {
|
||||
if (runtime_info)
|
||||
parse_runtime_info(runtime_info);
|
||||
|
||||
hideOrShowFeeds(getInitParam("hide_read_feeds") == 1);
|
||||
|
||||
Element.hide(dijit.byId("net-alert").domNode);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -560,11 +560,11 @@ function moveToPost(mode, noscroll) {
|
||||
var ctr = $("headlines-frame");
|
||||
|
||||
if (!noscroll && article && article.offsetTop < ctr.scrollTop) {
|
||||
scrollArticle(-ctr.offsetHeight/2);
|
||||
scrollArticle(-ctr.offsetHeight/3);
|
||||
} else if (!noscroll && prev_article &&
|
||||
prev_article.offsetTop < ctr.scrollTop) {
|
||||
cdmExpandArticle(prev_id);
|
||||
scrollArticle(-ctr.offsetHeight/2);
|
||||
scrollArticle(-ctr.offsetHeight/3);
|
||||
} else if (prev_id) {
|
||||
cdmExpandArticle(prev_id);
|
||||
cdmScrollToArticleId(prev_id, noscroll);
|
||||
|
||||
Reference in New Issue
Block a user