From 7bd2ae8388b56ccfbe37dd4ab1653e88963192ef Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 1 Aug 2023 18:54:25 -0900 Subject: [PATCH] began work on enumerating attachments in the mail view --- webcit-ng/static/js/view_mail.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index edf6c7963..a647ed0a3 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -176,7 +176,7 @@ function mail_render_one(msgnum, msg, target_div, include_controls) { // Display the To: recipients, if any are present if (msg.rcpt) { outmsg += "
" + _("To:") + " "; - for (var r=0; r"; // end header } + // Display attachments, if any are present + if (msg.part) { + let display_attachments = 0; + for (let r=0; r " + msg.part[r].partnum + ": " + msg.part[r].filename + ""; + } + } + if (display_attachments > 0) { + outmsg += "
"; + } + } + + outmsg += "
" // begin body + msg.text -- 2.39.2