From 19c7350770788edf3ae0bb1fd6d95876667adbf6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 23 Dec 2012 14:52:18 +0400 Subject: experimental new plugin system --- js/mail_button.js | 61 ------------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 js/mail_button.js (limited to 'js/mail_button.js') diff --git a/js/mail_button.js b/js/mail_button.js deleted file mode 100644 index 0fcb0d80f..000000000 --- a/js/mail_button.js +++ /dev/null @@ -1,61 +0,0 @@ -function emailArticle(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=rpc&method=buttonPlugin&plugin=mail&plugin_method=emailArticle¶m=" + param_escape(id); - - dialog = new dijit.Dialog({ - id: "emailArticleDlg", - title: __("Forward article by email"), - style: "width: 600px", - execute: function() { - if (this.validate()) { - - new Ajax.Request("backend.php", { - parameters: dojo.objectToQuery(this.attr('value')), - onComplete: function(transport) { - - var reply = JSON.parse(transport.responseText); - - var error = reply['error']; - - if (error) { - alert(__('Error sending email:') + ' ' + error); - } else { - notify_info('Your message has been sent.'); - dialog.hide(); - } - - } }); - } - }, - href: query}); - - var tmph = dojo.connect(dialog, 'onLoad', function() { - dojo.disconnect(tmph); - - new Ajax.Autocompleter('emailArticleDlg_destination', 'emailArticleDlg_dst_choices', - "backend.php?op=rpc&method=buttonPlugin&plugin=mail&plugin_method=completeEmails", - { tokens: '', paramName: "search" }); - }); - - dialog.show(); - - } catch (e) { - exception_error("emailArticle", e); - } -} - - -- cgit v1.2.3