ttrss/plugins/mailto/init.js

33 lines
630 B
JavaScript
Raw Normal View History

function mailtoArticle(id) {
try {
if (!id) {
const ids = Headlines.getSelected();
if (ids.length == 0) {
2018-12-02 13:30:32 +00:00
alert(__("No articles selected."));
return;
}
id = ids.toString();
}
if (dijit.byId("emailArticleDlg"))
dijit.byId("emailArticleDlg").destroyRecursive();
const query = "backend.php?op=pluginhandler&plugin=mailto&method=emailArticle&param=" + encodeURIComponent(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);
}
}