diff options
author | Andrew Dolgov <[email protected]> | 2008-07-25 08:48:15 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-07-25 08:48:15 +0100 |
commit | 7bce63e76833eea0e1de4887cfad63127ca755c9 (patch) | |
tree | 001c31a4197fc515593a50faba7cd3fafe15969e /prefs.js | |
parent | abaf02111e4dac9f1e36cc63d2aa324deae05f96 (diff) |
add quick unsubscribe button to prefs/feedlist
Diffstat (limited to 'prefs.js')
-rw-r--r-- | prefs.js | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -508,6 +508,7 @@ function editFeed(feed) { xmlhttp.onreadystatechange=infobox_callback; xmlhttp.send(null); + return false; } function editFeedCat(cat) { @@ -691,6 +692,33 @@ function removeSelectedFeeds() { return false; } +function removeFeed(id, title) { + + if (!xmlhttp_ready(xmlhttp)) { + printLockingError(); + return + } + + if (id) { + + var msg = __("Unsubscribe from %s?").replace("%s", title); + + var ok = confirm(msg); + + if (ok) { + + notify_progress("Unsubscribing..."); + + xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=remove&ids="+ + param_escape(id), true); + xmlhttp.onreadystatechange=feedlist_callback; + xmlhttp.send(null); + } + } + + return false; +} + function clearSelectedFeeds() { if (!xmlhttp_ready(xmlhttp)) { |