From 33f31dfdfc2ca303c55c1f8b6ef7d002053228a1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 20 Nov 2010 15:36:42 +0300 Subject: [PATCH] misc feed edit dialog fixes --- functions.js | 4 +++- tt-rss.js | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/functions.js b/functions.js index 5e315612..e303c404 100644 --- a/functions.js +++ b/functions.js @@ -1564,8 +1564,10 @@ function getSelectedTableRowIds(id) { } function editFeed(feed, event) { - try { + if (feed <= 0) + return alert(__("You can't edit this kind of feed.")); + var query = "backend.php?op=pref-feeds&subop=editfeed&id=" + param_escape(feed); diff --git a/tt-rss.js b/tt-rss.js index 1559530b..4ab35736 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -376,7 +376,11 @@ function quickMenuGo(opid) { } if (opid == "qmcEditFeed") { - editFeed(getActiveFeedId()); + if (activeFeedIsCat()) + alert(__("You can't edit this kind of feed.")); + else + editFeed(getActiveFeedId()); + return; } if (opid == "qmcRemoveFeed") { @@ -843,7 +847,13 @@ function hotkey_handler(e) { } if (keycode == 69) { // e - editFeed(getActiveFeedId()); + + if (activeFeedIsCat()) + alert(__("You can't edit this kind of feed.")); + else + editFeed(getActiveFeedId()); + return; + return false; } -- 2.39.2