Added the dispatch function for entering a new mail message
authorArt Cancro <ajc@citadel.org>
Mon, 18 Jul 2022 19:34:41 +0000 (15:34 -0400)
committerArt Cancro <ajc@citadel.org>
Mon, 18 Jul 2022 19:34:41 +0000 (15:34 -0400)
webcit-ng/static/js/view_mail.js
webcit-ng/static/js/views.js

index 64cebf9456adc3288959fe65183f012d53294228..6566808e21416aff7ab5675fb7cc9f97296a9da1 100644 (file)
@@ -130,6 +130,12 @@ function mail_render_row(msg) {
 
 // Set up the mailbox view
 function mail_display() {
+
+       // Put the "enter new message" button into the navbar
+       document.getElementById("ctdl-newmsg-button").innerHTML = "<i class=\"fa fa-edit\"></i>" + _("Write mail");
+       document.getElementById("ctdl-newmsg-button").style.display = "block";
+
+       // Put the mailbox message list into the stuffbar
        document.getElementById("ctdl-stuffbar").style.display = "block";
 
        document.getElementById("ctdl-stuffbar").innerHTML
@@ -209,3 +215,9 @@ function render_mailbox_display() {
        }
        fetch_mailbox();
 }
+
+
+// Enter a new mail message (called by the dispatcher in views.js)
+function mail_entmsg() {
+       alert("no handler for entering new mail yet");
+}
index 12de1a39b8ea0d9034b825aea1f865ec859c2862..3096bfe02ed5607994d8abd1624c6e61eb022d69 100644 (file)
@@ -53,7 +53,7 @@ function entmsg_dispatcher() {
                        forum_entmsg();
                        break;
                default:
-                       alert("no handler");
+                       mail_entmsg();
                        break;
        }
 }