to, cc, subject in mail_compose()
authorArt Cancro <ajc@citadel.org>
Wed, 26 Oct 2022 03:30:42 +0000 (23:30 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 26 Oct 2022 03:30:42 +0000 (23:30 -0400)
webcit-ng/static/js/view_mail.js
webcit-ng/static/js/views.js

index 75931aa29402c1f96af59b85a20d403e39ec7cd2..0d1f1806611c1e011cb8f4d7c3016c1e1c912ba0 100644 (file)
@@ -33,13 +33,13 @@ function mail_render_one(msgnum, msg, target_div, include_controls) {
                        + "<span class=\"ctdl-msg-header-buttons\">"            // begin buttons on right side
                
                        + "<span class=\"ctdl-msg-button\">"                    // Reply (mail is always Quoted)
-                       + "<a href=\"javascript:mail_compose(true,'"+msg.wefw+"','"+msgnum+"');\">"
+                       + "<a href=\"javascript:mail_compose(true,'"+msg.wefw+"','"+msgnum+"', '', '', '');\">"
                        + "<i class=\"fa fa-reply\"></i> " 
                        + _("Reply")
                        + "</a></span>"
                
                        + "<span class=\"ctdl-msg-button\">"                    // Reply-All (mail is always Quoted)
-                       + "<a href=\"javascript:mail_compose(true,'"+msg.wefw+"','"+msgnum+"');\">"
+                       + "<a href=\"javascript:mail_compose(true,'"+msg.wefw+"','"+msgnum+"', '', '', '');\">"
                        + "<i class=\"fa fa-reply-all\"></i> " 
                        + _("ReplyAll")
                        + "</a></span>";
@@ -216,7 +216,7 @@ function render_mailbox_display() {
 
 
 // Compose a new mail message (called by the Reply button here, or by the dispatcher in views.js)
-function mail_compose(is_quoted, references, msgnum) {
+function mail_compose(is_quoted, references, msgnum, m_to, m_cc, m_subject) {
        quoted_div_name = randomString();
 
        // Make the "Write mail" button disappear.  We're already there!
@@ -238,7 +238,7 @@ function mail_compose(is_quoted, references, msgnum) {
                // Visible To: field, plus a box to make the CC/BCC lines appear
                + "<div class=\"ctdl-compose-to-label\">" + _("To:") + "</div>"
                + "<div class=\"ctdl-compose-to-line\">"
-               + "<div class=\"ctdl-compose-to-field\" id=\"ctdl-compose-to-field\" contenteditable=\"true\"></div>"
+               + "<div class=\"ctdl-compose-to-field\" id=\"ctdl-compose-to-field\" contenteditable=\"true\">" + m_to + "</div>"
                + "<div class=\"ctdl-cc-bcc-buttons ctdl-msg-button\" id=\"ctdl-cc-bcc-buttons\" "
                + "onClick=\"make_cc_bcc_visible()\">"
                + _("CC:") + "/" + _("BCC:") + "</div>"
@@ -246,13 +246,13 @@ function mail_compose(is_quoted, references, msgnum) {
 
                // CC/BCC
                + "<div class=\"ctdl-compose-cc-label\" id=\"ctdl-compose-cc-label\">" + _("CC:") + "</div>"
-               + "<div class=\"ctdl-compose-cc-field\" id=\"ctdl-compose-cc-field\" contenteditable=\"true\"></div>"
+               + "<div class=\"ctdl-compose-cc-field\" id=\"ctdl-compose-cc-field\" contenteditable=\"true\">" + m_cc + "</div>"
                + "<div class=\"ctdl-compose-bcc-label\" id=\"ctdl-compose-bcc-label\">" + _("BCC:") + "</div>"
                + "<div class=\"ctdl-compose-bcc-field\" id=\"ctdl-compose-bcc-field\" contenteditable=\"true\"></div>"
 
                // Visible subject field
                + "<div class=\"ctdl-compose-subject-label\">" + _("Subject:") + "</div>"
-               + "<div class=\"ctdl-compose-subject-field\" id=\"ctdl-compose-subject-field\" contenteditable=\"true\"></div>"
+               + "<div class=\"ctdl-compose-subject-field\" id=\"ctdl-compose-subject-field\" contenteditable=\"true\">" + m_subject + "</div>"
 
                // Message composition box
                + "<div class=\"ctdl-compose-message-box\" id=\"ctdl-editor-body\" contenteditable=\"true\">"
@@ -281,9 +281,9 @@ function mail_compose(is_quoted, references, msgnum) {
 
        document.getElementById("ctdl-main").innerHTML = compose_screen;
        mail_display_message(msgnum, document.getElementById(quoted_div_name), 0);
-
 }
 
+
 function make_cc_bcc_visible() {
        document.getElementById("ctdl-cc-bcc-buttons").style.display = "none";
        document.getElementById("ctdl-compose-cc-label").style.display = "block";
index 971f6397bda49a93583d39ccdce973d3b40045ba..85a3291a00e9229c66831fd2e340c047ec60cc7a 100644 (file)
@@ -61,7 +61,7 @@ function entmsg_dispatcher() {
                        forum_entmsg();
                        break;
                case views.VIEW_MAILBOX:
-                       mail_compose(false, "", 0);
+                       mail_compose(false, "", 0, "", "", "");
                        break;
                default:
                        break;