You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tt-rss/plugins/note/note.js

41 lines
885 B
JavaScript

Plugins.Note = {
edit: function(id) {
const query = "backend.php?op=pluginhandler&plugin=note&method=edit&param=" + encodeURIComponent(id);
13 years ago
if (dijit.byId("editNoteDlg"))
dijit.byId("editNoteDlg").destroyRecursive();
const dialog = new dijit.Dialog({
13 years ago
id: "editNoteDlg",
title: __("Edit article note"),
style: "width: 600px",
execute: function () {
13 years ago
if (this.validate()) {
Notify.progress("Saving article note...", true);
13 years ago
xhrJson("backend.php", this.attr('value'), (reply) => {
Notify.close();
dialog.hide();
13 years ago
if (reply) {
ArticleCache.del(id);
13 years ago
var elem = $("POSTNOTE-" + id);
13 years ago
if (elem) {
Element.hide(elem);
elem.innerHTML = reply.note;
13 years ago
if (reply.raw_length != 0)
new Effect.Appear(elem);
}
}
});
13 years ago
}
},
href: query,
});
dialog.show();
}
};