From cb0f6cdf8e28afc92e7fcefeb8ce750abea96c71 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 7 Dec 2023 15:29:18 -0500 Subject: [PATCH] view_mail.js: removed the is_quoted parameter. is_quoted is now determined by whether quoted_msgnum is nonzero. In mail, we always pull quote for replies. --- webcit-ng/api.txt | 2 +- webcit-ng/static/js/view_mail.js | 11 ++++++----- webcit-ng/static/js/views.js | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/webcit-ng/api.txt b/webcit-ng/api.txt index 189818ef6..35de78ef3 100644 --- a/webcit-ng/api.txt +++ b/webcit-ng/api.txt @@ -19,7 +19,7 @@ MOVE /ctdl/r// Moves a message to another ro PUT /ctdl/r// DAV operation to insert a new message into a room Accepted parameters: - wefw List of message references + wefw List of message references, separated by "!" delimiter subj Message subject The returned ETag will be the new message number. diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index 5179973e8..98eba01c7 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -153,19 +153,19 @@ function mail_render_one(msgnum, msg, target_div, include_controls) { + "" // begin buttons on right side + "" // Reply - + `` + + `` + " " + _("Reply") + "" + "" // Reply-All - + `` + + `` + " " + _("ReplyAll") + "" + "" // Forward FIXME - + "" + + `` + " " + _("Forward") + ""; @@ -471,16 +471,17 @@ function recipient_array_to_string(recps_arr) { // 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 +// (set to 0 if this is not a reply) // 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) { +function mail_compose(references, quoted_msgnum, m_to, m_cc, m_subject) { let is_reply = 0; + let is_quoted = (quoted_msgnum > 0) ? true : false ; // 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); diff --git a/webcit-ng/static/js/views.js b/webcit-ng/static/js/views.js index f3707d48c..be2d48bdb 100644 --- a/webcit-ng/static/js/views.js +++ b/webcit-ng/static/js/views.js @@ -115,7 +115,7 @@ function entmsg_dispatcher() { forum_entmsg(); break; case views.VIEW_MAILBOX: - mail_compose(false, "", 0, "", "", ""); + mail_compose("", 0, [], [], ""); break; default: break; -- 2.30.2