var date = new Date();
-/* if (!xmlhttp_ready(xmlhttp) && last_article_view < date.getTime() / 1000 - 15) {
- debug("<b>xmlhttp seems to be stuck at view, aborting</b>");
- xmlhttp.abort();
- if (is_safari()) {
- debug("trying alternative reset method for Safari");
- xmlhttp = Ajax.getTransport();
- }
- }
-
- if (xmlhttp_ready(xmlhttp)) { */
-
var neighbor_ids = getRelativePostIds(active_post_id);
/* only request uncached articles */
function selectionToggleUnread(cdm_mode, set_state, callback_func, no_error) {
try {
-/* if (!xmlhttp_ready(xmlhttp_rpc)) {
- printLockingError();
- return;
- } */
-
var rows;
if (cdm_mode) {
var query = "backend.php?op=rpc&subop=catchupSelected&ids=" +
param_escape(rows.toString()) + "&cmode=" + cmode;
-// _catchup_callback_func = callback_func;
-
- debug(callback_func);
-
notify_progress("Loading, please wait...");
-/* xmlhttp_rpc.open("GET", query, true);
- xmlhttp_rpc.onreadystatechange=catchup_callback;
- xmlhttp_rpc.send(null); */
-
new Ajax.Request(query, {
onComplete: function(transport) {
catchup_callback2(transport, callback_func);
"&title=" + param_escape(title);
debug("LFS: " + query);
-
- xmlhttp_rpc.open("GET", query, true);
- xmlhttp_rpc.onreadystatechange=dlg_frefresh_callback;
- xmlhttp_rpc.send(null);
- }
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ dlg_frefresh_callback(transport);
+ } });
+ }
}
function editArticleTags(id, feed_id, cdm_enabled) {
}
-function tag_saved_callback() {
- if (xmlhttp_rpc.readyState == 4) {
- try {
- debug("in tag_saved_callback");
+function tag_saved_callback(transport) {
+ try {
+ debug("in tag_saved_callback");
- closeInfoBox();
- notify("");
+ closeInfoBox();
+ notify("");
- if (tagsAreDisplayed()) {
- _reload_feedlist_after_view = true;
- }
+ if (tagsAreDisplayed()) {
+ _reload_feedlist_after_view = true;
+ }
- if (!_tag_active_cdm) {
- if (active_post_id == _tag_active_post_id) {
- debug("reloading current article");
- view(_tag_active_post_id, _tag_active_feed_id);
- }
- } else {
- debug("reloading current feed");
- viewCurrentFeed();
+ if (!_tag_active_cdm) {
+ if (active_post_id == _tag_active_post_id) {
+ debug("reloading current article");
+ view(_tag_active_post_id, _tag_active_feed_id);
}
-
- } catch (e) {
- exception_error("catchup_callback", e);
+ } else {
+ debug("reloading current feed");
+ viewCurrentFeed();
}
+
+ } catch (e) {
+ exception_error("catchup_callback", e);
}
}
function editTagsSave() {
- if (!xmlhttp_ready(xmlhttp_rpc)) {
- printLockingError();
- }
-
notify_progress("Saving article tags...");
var form = document.forms["tag_edit_form"];
debug(query);
- xmlhttp_rpc.open("GET", query, true);
- xmlhttp_rpc.onreadystatechange=tag_saved_callback;
- xmlhttp_rpc.send(null);
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ tag_saved_callback(transport);
+ } });
}