1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 00:55:55 +00:00

added support for marking posts

This commit is contained in:
Andrew Dolgov
2005-09-05 05:04:31 +01:00
parent 6cc36202c7
commit f4c10d4408
4 changed files with 65 additions and 6 deletions

View File

@@ -554,6 +554,36 @@ function localHotkeyHandler(keycode) {
}
function toggleMark(id, toggle) {
// notify("Toggle mark: " + id + ", " + toggle);
if (!xmlhttp_ready(xmlhttp_rpc)) {
printLockingError();
return;
}
var mark_img = document.getElementById("FMARKPIC-" + id);
var query = "backend.php?op=rpc&id=" + id + "&subop=mark";
if (toggle == true) {
mark_img.src = "images/mark_set.png";
mark_img.alt = "Reset mark";
mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+', false)');
query = query + "&mark=1";
} else {
mark_img.src = "images/mark_unset.png";
mark_img.alt = "Set mark";
mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+', true)');
query = query + "&mark=0";
}
xmlhttp_rpc.open("GET", query, true);
xmlhttp_rpc.onreadystatechange=rpc_notify_callback;
xmlhttp_rpc.send(null);
}
function init() {