summaryrefslogtreecommitdiff
path: root/viewfeed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-03-21 22:58:32 +0300
committerAndrew Dolgov <[email protected]>2009-03-21 22:58:32 +0300
commit2b38f79c86ad9199f39fa8efac1c0e89c6f3a465 (patch)
tree3297382269d09a3fbba1ad071c789bdc9708bdad /viewfeed.js
parentf6fed1b26bf60bf508aa186503566df0b64aac92 (diff)
update translations
Diffstat (limited to 'viewfeed.js')
-rw-r--r--viewfeed.js61
1 files changed, 4 insertions, 57 deletions
diff --git a/viewfeed.js b/viewfeed.js
index d21e3e623..be1a442e0 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -15,39 +15,6 @@ var post_under_pointer = false;
var last_requested_article = false;
-function toggle_published_callback(transport) {
- try {
- if (transport.responseXML) {
-
- all_counters_callback2(transport);
-
- var note = transport.responseXML.getElementsByTagName("note")[0];
-
- if (note) {
- var note_id = note.getAttribute("id");
- var note_size = note.getAttribute("size");
- var note_content = note.firstChild.nodeValue;
-
- var container = $('POSTNOTE-' + note_id);
-
- cache_invalidate(note_id);
-
- if (container) {
- if (note_size == "0") {
- Element.hide(container);
- } else {
- container.innerHTML = note_content;
- Element.show(container);
- }
- }
- }
- }
-
- } catch (e) {
- exception_error("toggle_published_callback", e, transport);
- }
-}
-
function catchup_callback2(transport, callback) {
try {
debug("catchup_callback2 " + transport + ", " + callback);
@@ -625,19 +592,13 @@ function toggleMark(id, client_only, no_effects) {
}
}
-function togglePub(id, client_only, no_effects, note) {
+function togglePub(id, client_only, no_effects) {
try {
var query = "backend.php?op=rpc&id=" + id + "&subop=publ";
query = query + "&afid=" + getActiveFeedId();
-
- if (note != undefined) {
- query = query + "&note=" + param_escape(note);
- } else {
- query = query + "&note=undefined";
- }
if (tagsAreDisplayed()) {
query = query + "&omode=tl";
@@ -652,10 +613,11 @@ function togglePub(id, client_only, no_effects, note) {
var vfeedu = $("FEEDU--2");
var crow = $("RROW-" + id);
- if (mark_img.src.match("pub_unset") || note != undefined) {
+ 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";
+
} else {
//mark_img.src = "images/pub_unset.png";
@@ -673,7 +635,7 @@ function togglePub(id, client_only, no_effects, note) {
if (!client_only) {
new Ajax.Request(query, {
onComplete: function(transport) {
- toggle_published_callback(transport);
+ all_counters_callback2(transport);
} });
}
@@ -2185,18 +2147,3 @@ function toggleHeadlineActions() {
exception_error("toggleHeadlineActions", e);
}
}
-
-function publishWithNote(id, def_note) {
- try {
- if (!def_note) def_note = '';
-
- var note = prompt(__("Please enter a note for this article:"), def_note);
-
- if (note != undefined) {
- togglePub(id, false, false, note);
- }
-
- } catch (e) {
- exception_error("publishWithNote", e);
- }
-}