summaryrefslogtreecommitdiff
path: root/viewfeed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-29 14:21:28 +0300
committerAndrew Dolgov <[email protected]>2010-11-29 14:21:28 +0300
commitddcbbea2deb6d9d6abc3f3925aac55073c0b38ac (patch)
treed4a1eccb0eb7cfd2ab8f26e4b3cc9449166804fe /viewfeed.js
parent8eb592ec71c27c740fb3339e1e2a413fce6613f7 (diff)
tag setting rpc: use JSON
Diffstat (limited to 'viewfeed.js')
-rw-r--r--viewfeed.js35
1 files changed, 12 insertions, 23 deletions
diff --git a/viewfeed.js b/viewfeed.js
index 22523fa10..7919fe356 100644
--- a/viewfeed.js
+++ b/viewfeed.js
@@ -1065,15 +1065,6 @@ function catchupSelection() {
}
function editArticleTags(id) {
-/* displayDlg('editArticleTags', id,
- function () {
- $("tags_str").focus();
-
- new Ajax.Autocompleter('tags_str', 'tags_choices',
- "backend.php?op=rpc&subop=completeTags",
- { tokens: ',', paramName: "search" });
- }); */
-
var query = "backend.php?op=dlg&id=editArticleTags&param=" + param_escape(id);
if (dijit.byId("editTagsDlg"))
@@ -1095,21 +1086,19 @@ function editArticleTags(id) {
notify('');
dialog.hide();
- if (transport.responseXML) {
- var tags_str = transport.responseXML.getElementsByTagName("tags-str")[0];
-
- if (tags_str) {
- var id = tags_str.getAttribute("id");
-
- if (id) {
- var tags = $("ATSTR-" + id);
- if (tags) {
- tags.innerHTML = tags_str.firstChild.nodeValue;
- }
-
- cache_invalidate(id);
- }
+ var data = JSON.parse(transport.responseText);
+
+ if (data) {
+ var tags_str = data.tags_str;
+ var id = tags_str.id;
+
+ var tags = $("ATSTR-" + id);
+
+ if (tags) {
+ tags.innerHTML = tags_str.content;
}
+
+ cache_invalidate(id);
}
}});