Reply/ReplyAll/Forward need some things that are not strings
and the source arrays seem to still be in scope, so we go with
that. Need to tune this up some more. Some things are still
missing, such as the references and reply msgnum.
;
if (include_controls) { // omit controls if this is a pull quote
;
if (include_controls) { // omit controls if this is a pull quote
+
+ let subject = msg.subj ? escapeJS(msg.subj) : "" ;
+
outmsg +=
render_userpic(msg.from) // user avatar
+ "<div class=\"ctdl-mmsg-content\">" // begin content
outmsg +=
render_userpic(msg.from) // user avatar
+ "<div class=\"ctdl-mmsg-content\">" // begin content
+ "</a></span>"
+ "<span class=\"ctdl-msg-button\">" // Reply-All (mail is always Quoted)
+ "</a></span>"
+ "<span class=\"ctdl-msg-button\">" // Reply-All (mail is always Quoted)
- + "<a href=\"javascript:mail_compose(true,'"+msg.wefw+"','"+msgnum+"', replyall_to(msg), msg.cccc, 'Re: '+msg.subj);\">"
+ + `<a href="javascript:mail_compose(true, msg.wefw, ${msgnum}, replyall_to(msg), msg.cccc, 'Re: ${subject}');">`
+ "<i class=\"fa fa-reply-all\"></i> "
+ _("ReplyAll")
+ "</a></span>"
+ "<i class=\"fa fa-reply-all\"></i> "
+ _("ReplyAll")
+ "</a></span>"
// Compose a new mail message (called by the Reply button here, or by the dispatcher in views.js)
// Compose a new mail message (called by the Reply button here, or by the dispatcher in views.js)
+//
+// is_quoted true or false depending on whether the user selected "reply quoted" (is this appropriate for mail?)
+// references list of references, be sure to use this in a reply
+// quoted_msgnum if a reply, the msgid of the most recent message in the chain, the one to which we are replying
+// m_to an ARRAY of zero or more recipients to pre-insert into the To: field
+// m_cc an ARRAY of zero or more recipients to pre-insert into the Cc: field
+// m_subject a string to pre-insert into the Subject: field
+//
function mail_compose(is_quoted, references, quoted_msgnum, m_to, m_cc, m_subject) {
let is_reply = 0;
function mail_compose(is_quoted, references, quoted_msgnum, m_to, m_cc, m_subject) {
let is_reply = 0;
// Make the "Write mail" button disappear. We're already there!
document.getElementById("ctdl-newmsg-button").style.display = "none";
// Make the "Write mail" button disappear. We're already there!
document.getElementById("ctdl-newmsg-button").style.display = "none";
- // is_quoted true or false depending on whether the user selected "reply quoted" (is this appropriate for mail?)
- // references list of references, be sure to use this in a reply
- // msgid if a reply, the msgid of the most recent message in the chain, the one to which we are replying
-
// Now display the screen. (Yes, I combined regular strings + template literals. I just learned template literals. Converting to all template literals would be fine.)
compose_screen =
// Hidden values that we are storing right here in the document tree for later
// Now display the screen. (Yes, I combined regular strings + template literals. I just learned template literals. Converting to all template literals would be fine.)
compose_screen =
// Hidden values that we are storing right here in the document tree for later