From: Andrew Dolgov Date: Fri, 25 Jul 2008 07:48:15 +0000 (+0100) Subject: add quick unsubscribe button to prefs/feedlist X-Git-Tag: 1.2.26~56 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7bce63e76833eea0e1de4887cfad63127ca755c9;p=tt-rss.git add quick unsubscribe button to prefs/feedlist --- diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 8041b8cc..f1c9bfd6 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -968,6 +968,7 @@ $cat_id = $line["cat_id"]; $edit_title = htmlspecialchars($line["title"]); + $feed_title = $edit_title; $edit_cat = htmlspecialchars($line["category"]); $hidden = sql_bool_to_bool($line["hidden"]); @@ -1063,6 +1064,11 @@ $parent_title)"; } + $ops = " + (x) + "; + print "" . "$edit_title $parent_title" . ""; if ($show_last_article_info) { @@ -1070,7 +1076,7 @@ "$last_article"; } - print "$last_updated"; + print "$ops $last_updated"; print ""; diff --git a/prefs.js b/prefs.js index c405a4f1..dd80aee4 100644 --- a/prefs.js +++ b/prefs.js @@ -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)) { diff --git a/tt-rss.css b/tt-rss.css index 43a76229..a7e8ff84 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -442,6 +442,15 @@ div.feedEditSearch { float : right; } +table.prefFeedList span.feedOps { + display : none; + margin-right : 1em; +} + +table.prefFeedList tr:hover span.feedOps { + display : inline; +} + table.prefFeedList td.feedEditCat { font-weight : bold; border-width : 0px 0px 1px 0px;