+ "<span class=\"ctdl-msg-header-buttons\">" // begin buttons on right side
+ "<span class=\"ctdl-msg-button\">" // Reply
- + "<a href=\"javascript:mail_compose(true,'"+msg.wefw+"','"+msgnum+"', reply_addr(msg), [], 'Re: '+msg.subj);\">"
+ + `<a href="javascript:mail_compose(true, msg.wefw, ${msgnum}, reply_addr(msg), [], 'Re: ${subject}');">`
+ "<i class=\"fa fa-reply\"></i> "
+ _("Reply")
+ "</a></span>"
+ _("ReplyAll")
+ "</a></span>"
- + "<span class=\"ctdl-msg-button\">" // Forward
- + "<a href=\"javascript:mail_compose(true,'"+msg.wefw+"','"+msgnum+"', '', '', 'Fwd: '+msg.subj);\">"
+ + "<span class=\"ctdl-msg-button\">" // Forward FIXME
+ + "<a>"
+ "<i class=\"fa fa-mail-forward\"></i> "
+ _("Forward")
+ "</a></span>";
// now convert it to a string
returned_string = "";
for (i=0; i<recps_arr.length; ++i) {
- console.log("to #" + i + ": " + recps_arr[i]);
if (i > 0) {
returned_string += ", ";
}
let is_reply = 0;
- console.log("");
- console.log("mail_compose");
- console.log("is_quoted: " + is_quoted);
- console.log("references: " + references);
- console.log("quoted_msgnum: " + quoted_msgnum);
- console.log("m_to: " + m_to);
- console.log("m_cc: " + m_cc);
- console.log("m_subject: " + m_subject);
-
// m_to will be an array of zero or more recipients for the To: field. Convert it to a string.
m_to_str = recipient_array_to_string(m_to);
// Make the "Write mail" button disappear. We're already there!
document.getElementById("ctdl-newmsg-button").style.display = "none";
- // Now display the screen. (Yes, I combined regular strings + template literals. I just learned template literals. Converting to all template literals would be fine.)
+ // Now display the screen. (Yes, I combined regular strings + template literals.
+ // I just learned template literals. Converting the whole thing to template literals would be fine.)
compose_screen =
// Hidden values that we are storing right here in the document tree for later
- "<input id=\"ctdl_mc_is_quoted\" style=\"display:none\" value=\"" + is_quoted + "\"></input>"
- + "<input id=\"ctdl_mc_references\" style=\"display:none\" value=\"" + references + "\"></input>"
+ "<div id=\"ctdl-mc-references\" style=\"display:none\">" + references + "</div>"
// Header fields, the composition window, and the button bar are arranged using a Grid layout.
+ "<div id=\"ctdl-compose-mail\" class=\"ctdl-compose-mail\">"
deactivate_uploads();
let url = "/ctdl/r/" + escapeHTMLURI(current_room)
+ "/dummy_name_for_new_mail"
- + "?wefw=" + msm_field("ctdl_mc_references", "!") // references (if present)
+ + "?wefw=" + msm_field("ctdl-mc-references", "!") // references (if present)
+ "&subj=" + msm_field("ctdl-compose-subject-field", " ") // subject (if present)
+ "&mailto=" + msm_field("ctdl-compose-to-field", ",") // To: (required)
+ "&mailcc=" + msm_field("ctdl-compose-cc-field", ",") // Cc: (if present)