summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-02-15 15:16:53 +0300
committerAndrew Dolgov <[email protected]>2010-02-15 15:16:53 +0300
commit78bcd2c44cef66adbd377943f2a45dd9d289a892 (patch)
treef722f02ad69a178a8b533757b3a51c80135b9853 /functions.js
parent02b289d6611a535b8d498bfbbccd884164e02f24 (diff)
fix unsubscribeFeed behaving improperly in preferences
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/functions.js b/functions.js
index 3baaffa3a..ff35961e8 100644
--- a/functions.js
+++ b/functions.js
@@ -2156,3 +2156,33 @@ function quickAddFilter() {
displayDlg('quickAddFilter', '',
function () {document.forms['filter_add_form'].reg_exp.focus();});
}
+
+function unsubscribeFeed(feed_id, title) {
+
+ var msg = __("Unsubscribe from %s?").replace("%s", title);
+
+ if (title == undefined || confirm(msg)) {
+ notify_progress("Removing feed...");
+
+ var query = "?op=pref-feeds&quiet=1&subop=remove&ids=" + feed_id;
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+
+ closeInfoBox();
+
+ if (inPreferences()) {
+ updateFeedList();
+ } else {
+ dlg_frefresh_callback(transport, feed_id);
+ }
+
+ } });
+ }
+
+ return false;
+}
+
+
+