summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-08-06 09:18:02 +0100
committerAndrew Dolgov <[email protected]>2008-08-06 09:18:02 +0100
commitc8d5dcfe2b640d0a0d8d9d6904fcc0f0ce9d1b1c (patch)
treec454274d4b10dabad6d7395467bb9778828860f8 /tt-rss.js
parenta44db887de77a0d2284a375c8af6d765f8fc4eb9 (diff)
feed editor: add button to unsubscribe feed
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 71ebf13bc..879fff23c 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -604,17 +604,21 @@ function quickMenuGo(opid) {
}
}
-function unsubscribeFeed(feed_id) {
+function unsubscribeFeed(feed_id, title) {
- notify_progress("Removing feed...");
- var query = "backend.php?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
+ var msg = __("Unsubscribe from %s?").replace("%s", title);
- new Ajax.Request(query, {
- onComplete: function(transport) {
- dlg_frefresh_callback(transport, feed_id);
- } });
+ if (title == undefined || confirm(msg)) {
+ notify_progress("Removing feed...");
+
+ var query = "backend.php?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ dlg_frefresh_callback(transport, feed_id);
+ } });
+ }
return false;
}