28 lines
555 B
JavaScript
28 lines
555 B
JavaScript
function mailtoArticle(id) {
|
|
if (!id) {
|
|
const ids = Headlines.getSelected();
|
|
|
|
if (ids.length == 0) {
|
|
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¶m=" + encodeURIComponent(id);
|
|
|
|
const dialog = new dijit.Dialog({
|
|
id: "emailArticleDlg",
|
|
title: __("Forward article by email"),
|
|
style: "width: 600px",
|
|
href: query});
|
|
|
|
dialog.show();
|
|
}
|
|
|
|
|