1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 10:46:49 +00:00

bring back update button, it makes async update request to the daemon

This commit is contained in:
Andrew Dolgov
2010-11-13 18:48:56 +03:00
parent a18a4f387a
commit 428b704dbc
6 changed files with 87 additions and 7 deletions

View File

@@ -1286,3 +1286,39 @@ function handle_rpc_reply(transport, scheduled_call) {
return true;
}
function scheduleFeedUpdate() {
try {
if (!getActiveFeedId()) {
alert(__("Please select some feed first."));
return;
}
var query = "?op=rpc&subop=scheduleFeedUpdate&id=" +
param_escape(getActiveFeedId()) +
"&is_cat=" + param_escape(activeFeedIsCat());
console.log(query);
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
if (transport.responseXML) {
var message = transport.responseXML.getElementsByTagName("message")[0];
if (message) {
notify_info(message.firstChild.nodeValue);
return;
}
}
notify_error("Error communicating with server.");
} });
} catch (e) {
exception_error("scheduleFeedUpdate", e);
}
}