From: Art Cancro Date: Wed, 6 Dec 2023 21:20:40 +0000 (-0500) Subject: view_mail.js: fixed handling of references field X-Git-Tag: v997~80 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=b36df46899aa8fe9f4c1c2c5aacec321616a0f66 view_mail.js: fixed handling of references field --- diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index 0641bace4..5179973e8 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -153,7 +153,7 @@ function mail_render_one(msgnum, msg, target_div, include_controls) { + "" // begin buttons on right side + "" // Reply - + "" + + `` + " " + _("Reply") + "" @@ -164,8 +164,8 @@ function mail_render_one(msgnum, msg, target_div, include_controls) { + _("ReplyAll") + "" - + "" // Forward - + "" + + "" // Forward FIXME + + "" + " " + _("Forward") + ""; @@ -457,7 +457,6 @@ function recipient_array_to_string(recps_arr) { // now convert it to a string returned_string = ""; for (i=0; i 0) { returned_string += ", "; } @@ -483,15 +482,6 @@ function mail_compose(is_quoted, references, quoted_msgnum, m_to, m_cc, m_subjec 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); @@ -503,11 +493,11 @@ function mail_compose(is_quoted, references, quoted_msgnum, m_to, m_cc, m_subjec // 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 - "" - + "" + "
" + references + "
" // Header fields, the composition window, and the button bar are arranged using a Grid layout. + "
" @@ -607,7 +597,7 @@ function mail_send_message() { 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)