}
}
-function toggle_mark(mark_img, id) {
+function toggle_mark(img, id) {
try {
var query = "?op=rpc&id=" + id + "&subop=mark";
-
- query = query + "&afid=" + _active_feed_id;
- query = query + "&omode=c";
- if (!mark_img) return;
+ if (!img) return;
- if (mark_img.src.match("mark_unset")) {
- mark_img.src = mark_img.src.replace("mark_unset", "mark_set");
- mark_img.alt = __("Unstar article");
+ if (img.src.match("mark_unset")) {
+ img.src = img.src.replace("mark_unset", "mark_set");
+ img.alt = __("Unstar article");
query = query + "&mark=1";
} else {
- mark_img.alt = __("Please wait...");
+ img.src = img.src.replace("mark_set", "mark_unset");
+ img.alt = __("Star article");
query = query + "&mark=0";
-
- mark_img.src = mark_img.src.replace("mark_set", "mark_unset");
- mark_img.alt = __("Star article");
}
new Ajax.Request("backend.php", {
}
}
-function toggle_pub(mark_img, id, note) {
+function toggle_pub(img, id, note) {
try {
var query = "?op=rpc&id=" + id + "&subop=publ";
- query = query + "&afid=" + _active_feed_id;
-
if (note != undefined) {
query = query + "¬e=" + param_escape(note);
} else {
query = query + "¬e=undefined";
}
- query = query + "&omode=c";
+ if (!img) return;
- if (!mark_img) return;
-
- if (mark_img.src.match("pub_unset") || note != undefined) {
- mark_img.src = mark_img.src.replace("pub_unset", "pub_set");
- mark_img.alt = __("Unpublish article");
+ if (img.src.match("pub_unset") || note != undefined) {
+ img.src = img.src.replace("pub_unset", "pub_set");
+ img.alt = __("Unpublish article");
query = query + "&pub=1";
} else {
- mark_img.alt = __("Please wait...");
+ img.src = img.src.replace("pub_set", "pub_unset");
+ img.alt = __("Publish article");
query = query + "&pub=0";
-
- mark_img.src = mark_img.src.replace("pub_set", "pub_unset");
- mark_img.alt = __("Publish article");
}
new Ajax.Request("backend.php", {
console.log("additional ids: " + cids_to_request.toString());
- /* additional info for piggyback counters */
-
- if (tagsAreDisplayed()) {
- query = query + "&omode=lt";
- } else {
- query = query + "&omode=flc";
- }
-
query = query + "&cids=" + cids_to_request.toString();
var crow = $("RROW-" + id);
}
}
-function toggleMark(id, client_only, no_effects) {
-
+function toggleMark(id, client_only) {
try {
-
var query = "?op=rpc&id=" + id + "&subop=mark";
- query = query + "&afid=" + getActiveFeedId();
-
- if (tagsAreDisplayed()) {
- query = query + "&omode=tl";
- } else {
- query = query + "&omode=flc";
- }
-
- var mark_img = $("FMPIC-" + id);
+ var img = $("FMPIC-" + id);
- if (!mark_img) return;
-
- var vfeedu = $("FEEDU--1");
- var crow = $("RROW-" + id);
+ if (!img) return;
- if (mark_img.src.match("mark_unset")) {
- mark_img.src = mark_img.src.replace("mark_unset", "mark_set");
- mark_img.alt = __("Unstar article");
+ if (img.src.match("mark_unset")) {
+ img.src = img.src.replace("mark_unset", "mark_set");
+ img.alt = __("Unstar article");
query = query + "&mark=1";
if (db) {
}
} else {
- mark_img.alt = __("Please wait...");
+ img.src = img.src.replace("mark_set", "mark_unset");
+ img.alt = __("Star article");
query = query + "&mark=0";
-
- mark_img.src = mark_img.src.replace("mark_set", "mark_unset");
- mark_img.alt = __("Star article");
if (db) {
db.execute("UPDATE articles SET marked = 0 WHERE id = ?", [id]);
}
-
}
- if (!no_effects) update_local_feedlist_counters();
+ update_local_feedlist_counters();
if (!client_only) {
- //console.log(query);
-
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
handle_rpc_reply(transport);
} });
-
}
} catch (e) {
}
function togglePub(id, client_only, no_effects, note) {
-
try {
-
var query = "?op=rpc&id=" + id + "&subop=publ";
- query = query + "&afid=" + getActiveFeedId();
-
if (note != undefined) {
query = query + "¬e=" + param_escape(note);
} else {
query = query + "¬e=undefined";
}
-
- if (tagsAreDisplayed()) {
- query = query + "&omode=tl";
- } else {
- query = query + "&omode=flc";
- }
-
- var mark_img = $("FPPIC-" + id);
- if (!mark_img) return;
+ var img = $("FPPIC-" + id);
- var vfeedu = $("FEEDU--2");
- var crow = $("RROW-" + id);
+ if (!img) return;
- if (mark_img.src.match("pub_unset") || note != undefined) {
- mark_img.src = mark_img.src.replace("pub_unset", "pub_set");
- mark_img.alt = __("Unpublish article");
+ if (img.src.match("pub_unset") || note != undefined) {
+ img.src = img.src.replace("pub_unset", "pub_set");
+ img.alt = __("Unpublish article");
query = query + "&pub=1";
} else {
- mark_img.alt = __("Please wait...");
- query = query + "&pub=0";
-
- mark_img.src = mark_img.src.replace("pub_set", "pub_unset");
- mark_img.alt = __("Publish article");
+ img.src = img.src.replace("pub_set", "pub_unset");
+ img.alt = __("Publish article");
+ query = query + "&pub=0";
}
if (!client_only) {
var query = "?op=rpc&subop=markSelected&ids=" +
param_escape(rows.toString()) + "&cmode=2";
- query = query + "&afid=" + getActiveFeedId();
-
- query = query + "&omode=lc";
-
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
var query = "?op=rpc&subop=publishSelected&ids=" +
param_escape(rows.toString()) + "&cmode=2";
- query = query + "&afid=" + getActiveFeedId();
-
- query = query + "&omode=lc";
-
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {