]> code.citadel.org Git - citadel.git/commitdiff
Set up the view dispatcher for mailbox rooms
authorArt Cancro <ajc@citadel.org>
Thu, 30 Jun 2022 18:44:45 +0000 (14:44 -0400)
committerArt Cancro <ajc@citadel.org>
Thu, 30 Jun 2022 18:44:45 +0000 (14:44 -0400)
webcit-ng/static/index.html
webcit-ng/static/js/views.js

index 4100bb8c02ba0a958b45c059299dfda15e1c3283..4cd56fe423f499268dcd4a314e95a740206814e9 100644 (file)
@@ -2,8 +2,8 @@
 
 <!-- 
 ---- Copyright (c) 1996-2022 by Art Cancro and the citadel.org team.
----- This program is open source software.  You can redistribute it and/or
----- modify it under the terms of the GPL (General Public License) version 3.
+---- This program is open source software.  Use, duplication, or
+---- disclosure are subject to the GNU General Public License v3.
 -->
 
 <html>
@@ -28,7 +28,7 @@ LOADING
                <span class="w3-bar-item" id="ctdl-logo">CITADEL</span>
        </span>
        <span class="w3-center">
-               <span id="ctdl_banner_title" class="w3-bar-item">XXX</span>
+               <span id="ctdl_banner_title" class="w3-bar-item">---</span>
        </span>
        <span class="w3-right">
                <button id="ctdl-newmsg-button" style="display:none" class="w3-bar-item w3-button" onclick="entmsg_dispatcher();">enter</button>
@@ -55,7 +55,7 @@ LOADING
        <hr>
        <div id="ctdl-sidebar" class="w3-bar-block">
                <a href="#" class="w3-bar-item w3-button w3-padding-16 w3-hide-large w3-dark-grey w3-hover-black" onclick="w3_close()" title="close menu"><i class="fa fa-remove fa-fw"></i>  Close Menu</a>
-               <a href="#" id="ctdl-sidebar-mail-button" class="w3-bar-item w3-button w3-padding"><i class="fa fa-envelope fa-fw"></i>  Mail</a>
+               <a href="#" id="ctdl-sidebar-button-mail" class="w3-bar-item w3-button w3-padding" onClick="gotoroom('_MAIL_');"><i class="fa fa-envelope fa-fw"></i>  Mail</a>
                <div id="ctdl_mail_folder_list" style="display:none"></div>
                <a href="#" id="ctdl-sidebar-button-forums" class="w3-bar-item w3-button w3-padding" onClick="render_room_list();"><i class="fas fa-comments fa-fw"></i>  Forums</a>
                <a href="#" id="ctdl-sidebar-button-calendar" class="w3-bar-item w3-button w3-padding"><i class="fa fa-calendar-alt fa-fw"></i>  Calendar</a>
index 4d22118ec49dd4e48f622d33c628f5172d68b003..31914079a7df94ddf03055196b7f28263688e290 100644 (file)
@@ -1,4 +1,3 @@
-//
 // Copyright (c) 2016-2022 by the citadel.org team
 //
 // This program is open source software.  Use, duplication, or
@@ -20,11 +19,20 @@ function render_room_view(gt_msg, lt_msg) {
        }
 
        switch(current_view) {
+
+               // The "forum" module displays rooms with the "VIEW_BBS" view as classic style web forums.
                case views.VIEW_BBS:
                        document.getElementById("ctdl-sidebar-button-forums").classList.add("w3-blue");
                        document.getElementById("ctdl-main").innerHTML = "<div id=\"ctdl-mrp\" class=\"ctdl-msg-reading-pane\"></div>";
                        forum_readmessages("ctdl-mrp", gt_msg, lt_msg);
                        break;
+
+               // The "mail" module displays rooms with the VIEW_MAILBOX view as a webmail program.
+               case views.VIEW_MAILBOX:
+                       document.getElementById("ctdl-sidebar-button-mail").classList.add("w3-blue");
+                       document.getElementById("ctdl-main").innerHTML = "mailbox view";
+                       break;
+
                default:
                        document.getElementById("ctdl-main").innerHTML =
                                "<center>The view for " + current_room + " is " + current_view + " but there is no renderer.</center>";