if ($num_starred > 0) $class .= "Unread";
printFeedEntry(-1, $class, __("Starred articles"), $num_starred,
- "images/mark_set.png", $link);
+ "images/mark_set.gif", $link);
$class = "virt";
if ($num_published > 0) $class .= "Unread";
printFeedEntry(-2, $class, __("Published articles"), $num_published,
- "images/pub_set.png", $link);
+ "images/pub_set.gif", $link);
if (get_pref($link, 'ENABLE_FEED_CATS')) {
print "</ul>";
}
if ($line["marked"] == "t" || $line["marked"] == "1") {
- $marked_pic = "<img id=\"FMPIC-$id\" src=\"images/mark_set.png\"
+ $marked_pic = "<img id=\"FMPIC-$id\" src=\"images/mark_set.gif\"
class=\"markedPic\"
- alt=\"Reset mark\" onclick='javascript:tMark($id)'>";
+ alt=\"Unstar article\" onclick='javascript:tMark($id)'>";
} else {
- $marked_pic = "<img id=\"FMPIC-$id\" src=\"images/mark_unset.png\"
+ $marked_pic = "<img id=\"FMPIC-$id\" src=\"images/mark_unset.gif\"
class=\"markedPic\"
- alt=\"Set mark\" onclick='javascript:tMark($id)'>";
+ alt=\"Star article\" onclick='javascript:tMark($id)'>";
}
if ($line["published"] == "t" || $line["published"] == "1") {
- $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_set.png\"
+ $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_set.gif\"
class=\"markedPic\"
- alt=\"Unpublish\" onclick='javascript:tPub($id)'>";
+ alt=\"Unpublish article\" onclick='javascript:tPub($id)'>";
} else {
- $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_unset.png\"
+ $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_unset.gif\"
class=\"markedPic\"
- alt=\"Publish\" onclick='javascript:tPub($id)'>";
+ alt=\"Publish article\" onclick='javascript:tPub($id)'>";
}
# $content_link = "<a target=\"_new\" href=\"".$line["link"]."\">" .
debug("tMark_afh_off : " + elem.id);
if (elem) {
- elem.src = "images/mark_unset.png";
- elem.alt = "Set mark";
+ elem.src = elem.src.replace("mark_set", "mark_unset");
+ elem.alt = __("Star article");
Element.show(elem);
}
debug("tPub_afh_off : " + elem.id);
if (elem) {
- elem.src = "images/pub_unset.png";
- elem.alt = "Publish";
+ elem.src = elem.src.replace("pub_set", "pub_unset");
+ elem.alt = __("Publish article");
Element.show(elem);
}
}
}
-function toggleMark(id) {
+function toggleMark(id, client_only, no_effects) {
try {
var vfeedu = document.getElementById("FEEDU--1");
var crow = document.getElementById("RROW-" + id);
- if (mark_img.alt != "Reset mark") {
- mark_img.src = "images/mark_set.png";
- mark_img.alt = "Reset mark";
+ if (mark_img.src.match("mark_unset")) {
+ mark_img.src = mark_img.src.replace("mark_unset", "mark_set");
+ mark_img.alt = __("Unstar article");
query = query + "&mark=1";
/* if (vfeedu && crow.className.match("Unread")) {
} else {
//mark_img.src = "images/mark_unset.png";
- mark_img.alt = "Please wait...";
+ mark_img.alt = __("Please wait...");
query = query + "&mark=0";
/* if (vfeedu && crow.className.match("Unread")) {
vfeedu.innerHTML = (+vfeedu.innerHTML) - 1;
} */
- if (document.getElementById("headlinesList")) {
+ if (document.getElementById("headlinesList") && !no_effects) {
Effect.Puff(mark_img, {duration : 0.25, afterFinish: tMark_afh_off});
} else {
- mark_img.src = "images/mark_unset.png";
- mark_img.alt = "Set mark";
+ mark_img.src = mark_img.src.replace("mark_set", "mark_unset");
+ mark_img.alt = __("Star article");
}
}
//new Ajax.Request(query); */
- debug(query);
+ if (!client_only) {
+ debug(query);
- xmlhttp_rpc.open("GET", query, true);
- xmlhttp_rpc.onreadystatechange=all_counters_callback;
- xmlhttp_rpc.send(null);
+ xmlhttp_rpc.open("GET", query, true);
+ xmlhttp_rpc.onreadystatechange=all_counters_callback;
+ xmlhttp_rpc.send(null);
+ }
} catch (e) {
exception_error("toggleMark", e);
}
}
-function togglePub(id) {
+function togglePub(id, client_only, no_effects) {
try {
var vfeedu = document.getElementById("FEEDU--2");
var crow = document.getElementById("RROW-" + id);
- if (mark_img.alt != "Unpublish") {
- mark_img.src = "images/pub_set.png";
- mark_img.alt = "Unpublish";
+ if (mark_img.src.match("pub_unset")) {
+ mark_img.src = mark_img.src.replace("pub_unset", "pub_set");
+ mark_img.alt = __("Unpublish article");
query = query + "&pub=1";
/* if (vfeedu && crow.className.match("Unread")) {
} else {
//mark_img.src = "images/pub_unset.png";
- mark_img.alt = "Please wait...";
+ mark_img.alt = __("Please wait...");
query = query + "&pub=0";
/* if (vfeedu && crow.className.match("Unread")) {
vfeedu.innerHTML = (+vfeedu.innerHTML) - 1;
} */
- if (document.getElementById("headlinesList")) {
+ if (document.getElementById("headlinesList") && !no_effects) {
Effect.Puff(mark_img, {duration : 0.25, afterFinish: tPub_afh_off});
} else {
- mark_img.src = "images/pub_unset.png";
- mark_img.alt = "Publish";
+ mark_img.src = mark_img.src.replace("pub_set", "pub_unset");
+ mark_img.alt = __("Publish article");
}
}
new Ajax.Request(query); */
- xmlhttp_rpc.open("GET", query, true);
- xmlhttp_rpc.onreadystatechange=all_counters_callback;
- xmlhttp_rpc.send(null);
+ if (!client_only) {
+ xmlhttp_rpc.open("GET", query, true);
+ xmlhttp_rpc.onreadystatechange=all_counters_callback;
+ xmlhttp_rpc.send(null);
+ }
} catch (e) {
}
for (i = 0; i < rows.length; i++) {
- var row = document.getElementById("RROW-" + rows[i]);
- var mark_img = document.getElementById("FMPIC-" + rows[i]);
-
- if (row && mark_img) {
-
- if (mark_img.alt == "Set mark") {
- mark_img.src = "images/mark_set.png";
- mark_img.alt = "Reset mark";
- //mark_img.setAttribute('onclick',
- // 'javascript:toggleMark('+rows[i]+', false)');
-
- } else {
- mark_img.src = "images/mark_unset.png";
- mark_img.alt = "Set mark";
-
- //mark_img.alt = "Please wait...";
-
- //mark_img.setAttribute('onclick',
- // 'javascript:toggleMark('+rows[i]+', true)');
-
- //Effect.Puff(mark_img, {duration : 0.25, afterFinish: tMark_afh_off});
-
- }
- }
+ toggleMark(rows[i], true, true);
}
if (rows.length > 0) {
}
for (i = 0; i < rows.length; i++) {
- var row = document.getElementById("RROW-" + rows[i]);
- var mark_img = document.getElementById("FPPIC-" + rows[i]);
-
- if (row && mark_img) {
-
- if (mark_img.alt == "Publish") {
- mark_img.src = "images/pub_set.png";
- mark_img.alt = "Unpublish";
-// mark_img.setAttribute('onclick',
-// 'javascript:togglePub('+rows[i]+', false)');
-
- } else {
- mark_img.src = "images/pub_unset.png";
- mark_img.alt = "Publish";
-// mark_img.setAttribute('onclick',
-// 'javascript:togglePub('+rows[i]+', true)');
-
-// Effect.Puff(mark_img, {duration : 0.25, afterFinish: tPub_afh_off});
-
- }
- }
+ togglePub(rows[i], true, true);
}
if (rows.length > 0) {