Make the 'Write mail' button disappear when we're already in the mail compose screen.
authorArt Cancro <ajc@citadel.org>
Wed, 12 Oct 2022 03:19:24 +0000 (23:19 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 12 Oct 2022 03:19:24 +0000 (23:19 -0400)
webcit-ng/static/js/view_mail.js

index 27a5a0b9bba3c70811a2d502e858dc5ab3dc0435..bf500e5a03ea1d90f4e6bf47769736d88e8c91a9 100644 (file)
@@ -204,10 +204,14 @@ 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, msgid) {
 
+       // Make the "Write mail" button disappear.  We're already there!
+       document.getElementById("ctdl-newmsg-button").style.display = "none";
+
        // 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
        // msgid        if a reply, the msgid of the most recent message in the chain, the one to which we are replying
 
+       // Now display the screen.
        document.getElementById("ctdl-main").innerHTML
 
                // Hidden values that we are storing right here in the document tree for later