From 3d11c61f326ef133427f6f37de4429e879c725f2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Feb 2021 15:22:10 +0300 Subject: * OPML import: don't reload everything, just feed tree * dialogs: use auto-destroying dialog for almost all dialogs instead of destroying them manually * some general dialog-related cleanup --- plugins/mail/mail.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/mail/mail.js') diff --git a/plugins/mail/mail.js b/plugins/mail/mail.js index 89e395221..5ddc0dc41 100644 --- a/plugins/mail/mail.js +++ b/plugins/mail/mail.js @@ -1,7 +1,9 @@ +/* global Plugins, Headlines, xhrJson, Notify, fox, __ */ + Plugins.Mail = { send: function(id) { if (!id) { - let ids = Headlines.getSelected(); + const ids = Headlines.getSelected(); if (ids.length == 0) { alert(__("No articles selected.")); @@ -11,12 +13,9 @@ Plugins.Mail = { id = ids.toString(); } - if (dijit.byId("emailArticleDlg")) - dijit.byId("emailArticleDlg").destroyRecursive(); - const query = "backend.php?op=pluginhandler&plugin=mail&method=emailArticle¶m=" + encodeURIComponent(id); - const dialog = new dijit.Dialog({ + const dialog = new fox.SingleUseDialog({ id: "emailArticleDlg", title: __("Forward article by email"), execute: function () { -- cgit v1.2.3