1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-20 11:16:36 +02:00

add hotkey toggle_cdm_expanded (f c)

This commit is contained in:
Andrew Dolgov 2013-03-30 14:28:13 +04:00
parent f940535997
commit 60b88b254c
2 changed files with 16 additions and 1 deletions

View File

@ -1938,7 +1938,8 @@
"feed_debug_update" => __("Debug feed update"),
"catchup_all" => __("Mark all feeds as read"),
"cat_toggle_collapse" => __("Un/collapse current category"),
"toggle_combined_mode" => __("Toggle combined mode")),
"toggle_combined_mode" => __("Toggle combined mode"),
"toggle_cdm_expanded" => __("Toggle auto expand in combined mode")),
__("Go to") => array(
"goto_all" => __("All articles"),
"goto_fresh" => __("Fresh"),
@ -2002,6 +2003,7 @@
"f x" => "feed_reverse",
"f *d" => "feed_debug_update",
"f *c" => "toggle_combined_mode",
"f c" => "toggle_cdm_expanded",
"*q" => "catchup_all",
"x" => "cat_toggle_collapse",
// "goto" => array(

View File

@ -483,6 +483,19 @@ function init() {
window.location.reload();
} });
};
hotkey_actions["toggle_cdm_expanded"] = function() {
notify_progress("Loading, please wait...");
var value = getInitParam("cdm_expanded") ? "false" : "true";
var query = "?op=rpc&method=setpref&key=CDM_EXPANDED&value=" + value;
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
setInitParam("cdm_expanded", !getInitParam("cdm_expanded"));
viewCurrentFeed();
} });
};
} catch (e) {