mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 21:45:56 +00:00
support for changing category of selected feeds, misc RPC security fixes and prefs interface improvements
This commit is contained in:
36
prefs.js
36
prefs.js
@@ -171,8 +171,13 @@ function updateFeedList(sort_key) {
|
||||
|
||||
p_notify("Loading, please wait...");
|
||||
|
||||
var feed_search = document.getElementById("feed_search");
|
||||
var search = "";
|
||||
if (feed_search) { search = feed_search.value; }
|
||||
|
||||
xmlhttp.open("GET", "backend.php?op=pref-feeds" +
|
||||
"&sort=" + param_escape(sort_key), true);
|
||||
"&sort=" + param_escape(sort_key) +
|
||||
"&search=" + param_escape(search), true);
|
||||
xmlhttp.onreadystatechange=feedlist_callback;
|
||||
xmlhttp.send(null);
|
||||
|
||||
@@ -1171,3 +1176,32 @@ function closeInfoBox() {
|
||||
box.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function categorizeSelectedFeeds() {
|
||||
|
||||
if (!xmlhttp_ready(xmlhttp)) {
|
||||
printLockingError();
|
||||
return
|
||||
}
|
||||
|
||||
var sel_rows = getSelectedFeeds();
|
||||
|
||||
var cat_sel = document.getElementById("sfeed_set_fcat");
|
||||
var cat_id = cat_sel[cat_sel.selectedIndex].id;
|
||||
|
||||
if (sel_rows.length > 0) {
|
||||
|
||||
notify("Changing category of selected feeds...");
|
||||
|
||||
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=categorize&ids="+
|
||||
param_escape(sel_rows.toString()) + "&cat_id=" + param_escape(cat_id), true);
|
||||
xmlhttp.onreadystatechange=feedlist_callback;
|
||||
xmlhttp.send(null);
|
||||
|
||||
} else {
|
||||
|
||||
notify("Please select some feeds first.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user