mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 17:15:55 +00:00
plugins: add some xhrPost refactoring
This commit is contained in:
@@ -22,15 +22,9 @@ function emailArticle(id) {
|
||||
style: "width: 600px",
|
||||
execute: function() {
|
||||
if (this.validate()) {
|
||||
|
||||
new Ajax.Request("backend.php", {
|
||||
parameters: dojo.objectToQuery(this.attr('value')),
|
||||
onComplete: function(transport) {
|
||||
console.log(transport.responseText);
|
||||
|
||||
var reply = JSON.parse(transport.responseText);
|
||||
|
||||
var error = reply['error'];
|
||||
xhrJson("backend.php", this.attr('value'), (reply) => {
|
||||
if (reply) {
|
||||
const error = reply['error'];
|
||||
|
||||
if (error) {
|
||||
alert(__('Error sending email:') + ' ' + error);
|
||||
@@ -39,7 +33,8 @@ function emailArticle(id) {
|
||||
dialog.hide();
|
||||
}
|
||||
|
||||
} });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
href: query});
|
||||
|
||||
Reference in New Issue
Block a user