mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 16:41:29 +00:00
plugins: load dialogs via xhr instead of http
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* global Plugins, Headlines, fox, __ */
|
||||
/* global Plugins, Headlines, xhrPost, dojo, fox, __ */
|
||||
|
||||
Plugins.Mailto = {
|
||||
send: function (id) {
|
||||
@@ -13,12 +13,19 @@ Plugins.Mailto = {
|
||||
id = ids.toString();
|
||||
}
|
||||
|
||||
const query = "backend.php?op=pluginhandler&plugin=mailto&method=emailArticle¶m=" + encodeURIComponent(id);
|
||||
|
||||
const dialog = new fox.SingleUseDialog({
|
||||
id: "emailArticleDlg",
|
||||
title: __("Forward article by email"),
|
||||
href: query});
|
||||
content: __("Loading, please wait...")
|
||||
});
|
||||
|
||||
const tmph = dojo.connect(dialog, 'onShow', function () {
|
||||
dojo.disconnect(tmph);
|
||||
|
||||
xhrPost("backend.php", {op: "pluginhandler", plugin: "mailto", method: "emailArticle", ids: id}, (transport) => {
|
||||
dialog.attr('content', transport.responseText);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user