From 1d5cf085a37e8e016242c9cfea631a90861ab306 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Mar 2013 18:32:49 +0400 Subject: implement mail plugin using mailto: links; deprecate mail plugin --- plugins/mailto/init.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 plugins/mailto/init.js (limited to 'plugins/mailto/init.js') diff --git a/plugins/mailto/init.js b/plugins/mailto/init.js new file mode 100644 index 000000000..8f7656a07 --- /dev/null +++ b/plugins/mailto/init.js @@ -0,0 +1,32 @@ +function mailtoArticle(id) { + try { + if (!id) { + var ids = getSelectedArticleIds2(); + + if (ids.length == 0) { + alert(__("No articles are selected.")); + return; + } + + id = ids.toString(); + } + + if (dijit.byId("emailArticleDlg")) + dijit.byId("emailArticleDlg").destroyRecursive(); + + var query = "backend.php?op=pluginhandler&plugin=mailto&method=emailArticle¶m=" + param_escape(id); + + dialog = new dijit.Dialog({ + id: "emailArticleDlg", + title: __("Forward article by email"), + style: "width: 600px", + href: query}); + + dialog.show(); + + } catch (e) { + exception_error("emailArticle", e); + } +} + + -- cgit v1.2.3