summaryrefslogtreecommitdiff
path: root/plugins/mail/mail.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-24 21:56:52 +0300
committerAndrew Dolgov <[email protected]>2021-02-24 21:56:52 +0300
commit93940d2a9f80d9e1dac49b5eb7db23230d31c5f6 (patch)
tree71016661f6017918d0934eb462bd9552018d557a /plugins/mail/mail.js
parent8b022c2bfb356d7dddaf334bc931d6dec77086fb (diff)
parent1adacd057230aea4ede29dab510385bf01cf99a3 (diff)
Merge branch 'master' of git.fakecake.org:fox/tt-rss into weblate-integration
Diffstat (limited to 'plugins/mail/mail.js')
-rw-r--r--plugins/mail/mail.js21
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/mail/mail.js b/plugins/mail/mail.js
index 5ddc0dc41..d2bafe0e9 100644
--- a/plugins/mail/mail.js
+++ b/plugins/mail/mail.js
@@ -1,4 +1,4 @@
-/* global Plugins, Headlines, xhrJson, Notify, fox, __ */
+/* global Plugins, Headlines, dojo, App, xhr, Notify, fox, __ */
Plugins.Mail = {
send: function(id) {
@@ -13,14 +13,11 @@ Plugins.Mail = {
id = ids.toString();
}
- const query = "backend.php?op=pluginhandler&plugin=mail&method=emailArticle&param=" + encodeURIComponent(id);
-
const dialog = new fox.SingleUseDialog({
- id: "emailArticleDlg",
title: __("Forward article by email"),
execute: function () {
if (this.validate()) {
- xhrJson("backend.php", this.attr('value'), (reply) => {
+ xhr.json("backend.php", this.attr('value'), (reply) => {
if (reply) {
const error = reply['error'];
@@ -35,16 +32,16 @@ Plugins.Mail = {
});
}
},
- href: query
+ content: __("Loading, please wait...")
});
- /* var tmph = dojo.connect(dialog, 'onLoad', function() {
- dojo.disconnect(tmph);
+ const tmph = dojo.connect(dialog, 'onShow', function () {
+ dojo.disconnect(tmph);
- new Ajax.Autocompleter('emailArticleDlg_destination', 'emailArticleDlg_dst_choices',
- "backend.php?op=pluginhandler&plugin=mail&method=completeEmails",
- { tokens: '', paramName: "search" });
- }); */
+ xhr.post("backend.php", App.getPhArgs("mail", "emailArticle", {ids: id}), (reply) => {
+ dialog.attr('content', reply);
+ });
+ });
dialog.show();
},