From 2f6ea8b387ee4717516cbc96140f58542fbfa30c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 4 Mar 2021 15:09:56 +0300 Subject: split a bunch of plugins into separate repos --- plugins/mail/mail.js | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 plugins/mail/mail.js (limited to 'plugins/mail/mail.js') diff --git a/plugins/mail/mail.js b/plugins/mail/mail.js deleted file mode 100644 index d2bafe0e9..000000000 --- a/plugins/mail/mail.js +++ /dev/null @@ -1,51 +0,0 @@ -/* global Plugins, Headlines, dojo, App, xhr, Notify, fox, __ */ - -Plugins.Mail = { - send: function(id) { - if (!id) { - const ids = Headlines.getSelected(); - - if (ids.length == 0) { - alert(__("No articles selected.")); - return; - } - - id = ids.toString(); - } - - const dialog = new fox.SingleUseDialog({ - title: __("Forward article by email"), - execute: function () { - if (this.validate()) { - xhr.json("backend.php", this.attr('value'), (reply) => { - if (reply) { - const error = reply['error']; - - if (error) { - alert(__('Error sending email:') + ' ' + error); - } else { - Notify.info('Your message has been sent.'); - dialog.hide(); - } - - } - }); - } - }, - content: __("Loading, please wait...") - }); - - const tmph = dojo.connect(dialog, 'onShow', function () { - dojo.disconnect(tmph); - - xhr.post("backend.php", App.getPhArgs("mail", "emailArticle", {ids: id}), (reply) => { - dialog.attr('content', reply); - }); - }); - - dialog.show(); - }, - onHotkey: function(id) { - Plugins.Mail.send(id); - } -}; -- cgit v1.2.3