summaryrefslogtreecommitdiff
path: root/plugins/mail
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-19 13:44:56 +0300
committerAndrew Dolgov <[email protected]>2021-02-19 13:44:56 +0300
commit660a1bbe011fef5f0fa6bb0af43521fed7598cc7 (patch)
treef31ee123db91e479b93a6d086fd78de2ecfae014 /plugins/mail
parentbb4e4282f46824308aebc2eaeac29fa29f8687ad (diff)
* switch to xhr.post() almost everywhere
* call App.handlerpcjson() automatically on json request (if possible) * show net/log indicators in prefs
Diffstat (limited to 'plugins/mail')
-rw-r--r--plugins/mail/init.php4
-rw-r--r--plugins/mail/mail.js6
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mail/init.php b/plugins/mail/init.php
index 16e22f342..467f8294a 100644
--- a/plugins/mail/init.php
+++ b/plugins/mail/init.php
@@ -51,8 +51,8 @@ class Mail extends Plugin {
evt.preventDefault();
if (this.validate()) {
Notify.progress('Saving data...', true);
- xhrPost("backend.php", this.getValues(), (transport) => {
- Notify.info(transport.responseText);
+ xhr.post("backend.php", this.getValues(), (reply) => {
+ Notify.info(reply);
})
}
</script>
diff --git a/plugins/mail/mail.js b/plugins/mail/mail.js
index fc0898085..d2bafe0e9 100644
--- a/plugins/mail/mail.js
+++ b/plugins/mail/mail.js
@@ -1,4 +1,4 @@
-/* global Plugins, Headlines, dojo, xhrPost, xhrJson, Notify, fox, __ */
+/* global Plugins, Headlines, dojo, App, xhr, Notify, fox, __ */
Plugins.Mail = {
send: function(id) {
@@ -38,8 +38,8 @@ Plugins.Mail = {
const tmph = dojo.connect(dialog, 'onShow', function () {
dojo.disconnect(tmph);
- xhrPost("backend.php", App.getPhArgs("mail", "emailArticle", {ids: id}), (transport) => {
- dialog.attr('content', transport.responseText);
+ xhr.post("backend.php", App.getPhArgs("mail", "emailArticle", {ids: id}), (reply) => {
+ dialog.attr('content', reply);
});
});