summaryrefslogtreecommitdiff
path: root/feedlist.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-24 05:59:12 +0100
committerAndrew Dolgov <[email protected]>2007-08-24 05:59:12 +0100
commita49f5e055e0076e689924a992e87ad3503e67b3d (patch)
treef4d33c86b984cc309b871cc75be7a7984a320751 /feedlist.js
parent0df398da2c83693646605c91f29670405da2d22f (diff)
headlines_callback: async
Diffstat (limited to 'feedlist.js')
-rw-r--r--feedlist.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/feedlist.js b/feedlist.js
index ec1a653de..c78a47d5c 100644
--- a/feedlist.js
+++ b/feedlist.js
@@ -1,6 +1,6 @@
//var xmlhttp = Ajax.getTransport();
-var feed_cur_page = 0;
+var _feed_cur_page = 0;
function viewCategory(cat) {
active_feed_is_cat = true;
@@ -50,10 +50,10 @@ function viewNextFeedPage() {
try {
if (!getActiveFeedId()) return;
- feed_cur_page++;
+ _feed_cur_page++;
viewfeed(getActiveFeedId(), undefined, undefined, undefined,
- undefined, feed_cur_page);
+ undefined, _feed_cur_page);
} catch (e) {
exception_error(e, "viewFeedGoPage");
@@ -71,11 +71,11 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
page_offset = offset;
} else {
page_offset = 0;
- feed_cur_page = 0;
+ _feed_cur_page = 0;
}
if (getActiveFeedId() != feed) {
- feed_cur_page = 0;
+ _feed_cur_page = 0;
active_post_id = 0;
}
@@ -178,13 +178,18 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
// xmlhttp.abort();
- if (xmlhttp_ready(xmlhttp)) {
+/* if (xmlhttp_ready(xmlhttp)) {
xmlhttp.open("GET", query, true);
xmlhttp.onreadystatechange=headlines_callback;
xmlhttp.send(null);
} else {
debug("xmlhttp busy (@feeds)");
- }
+ } */
+
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ headlines_callback2(transport, feed, is_cat, _feed_cur_page);
+ } });
} catch (e) {
exception_error("viewfeed", e);