1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

move several methods from dlg; fix displayed tags not updated after editing

This commit is contained in:
Andrew Dolgov
2013-04-01 11:14:27 +04:00
parent a7edcc5585
commit 1c9bda915b
7 changed files with 238 additions and 233 deletions

View File

@@ -1067,7 +1067,7 @@ function catchupSelection() {
}
function editArticleTags(id) {
var query = "backend.php?op=dlg&method=editArticleTags&param=" + param_escape(id);
var query = "backend.php?op=article&method=editArticleTags&param=" + param_escape(id);
if (dijit.byId("editTagsDlg"))
dijit.byId("editTagsDlg").destroyRecursive();
@@ -1085,22 +1085,25 @@ function editArticleTags(id) {
new Ajax.Request("backend.php", {
parameters: query,
onComplete: function(transport) {
notify('');
dialog.hide();
try {
notify('');
dialog.hide();
var data = JSON.parse(transport.responseText);
var data = JSON.parse(transport.responseText);
if (data) {
var tags_str = article.tags;
var id = tags_str.id;
if (data) {
var id = data.id;
var tags = $("ATSTR-" + id);
var tooltip = dijit.byId("ATSTRTIP-" + id);
console.log(id);
if (tags) tags.innerHTML = tags_str.content;
if (tooltip) tooltip.attr('label', tags_str.content_full);
var tags = $("ATSTR-" + id);
var tooltip = dijit.byId("ATSTRTIP-" + id);
cache_delete("article:" + id);
if (tags) tags.innerHTML = data.content;
if (tooltip) tooltip.attr('label', data.content_full);
}
} catch (e) {
exception_error("editArticleTags/inner", e);
}
}});