add quick unsubscribe button to prefs/feedlist

This commit is contained in:
Andrew Dolgov
2008-07-25 08:48:15 +01:00
parent abaf02111e
commit 7bce63e768
3 changed files with 44 additions and 1 deletions
+28
View File
@@ -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)) {