summaryrefslogtreecommitdiff
path: root/viewfeed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-08-01 08:54:46 +0100
committerAndrew Dolgov <[email protected]>2006-08-01 08:54:46 +0100
commit88040f5795f5217bbd2713bf756d97e16c6936a5 (patch)
tree153d11ea49def8a03f1e614aeb5884801fd3026c /viewfeed.js
parente939722a14b8c806d74e611336f3472a3546f06b (diff)
add search-to-label converter, ability to unsubscribe from label, various label fixes
Diffstat (limited to 'viewfeed.js')
-rw-r--r--viewfeed.js27
1 files changed, 26 insertions, 1 deletions
diff --git a/viewfeed.js b/viewfeed.js
index 58b7d3ecb..e5109b223 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -325,6 +325,31 @@ function catchupPage() {
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
}
+function labelFromSearch(search, search_mode, match_on, feed_id, is_cat) {
+
+ if (!xmlhttp_ready(xmlhttp_rpc)) {
+ printLockingError();
+ }
+
+ var title = prompt("Please enter label title:", "");
+
+ if (title) {
+
+ var query = "backend.php?op=labelFromSearch&search=" + param_escape(search) +
+ "&smode=" + param_escape(search_mode) + "&match=" + param_escape(match_on) +
+ "&feed=" + param_escape(feed_id) + "&is_cat=" + param_escape(is_cat) +
+ "&title=" + param_escape(title);
+
+ debug("LFS: " + query);
+
+ xmlhttp_rpc.open("GET", query, true);
+ xmlhttp_rpc.onreadystatechange=getMainContext().dlg_frefresh_callback;
+ xmlhttp_rpc.send(null);
+ }
+
+}
+
+
function init() {
if (arguments.callee.done) return;
@@ -341,5 +366,5 @@ function init() {
var bt = document.getElementById("headlineActionsBottom");
bt.className = "headlinesSubToolbar";
}
-
+
}