]> code.citadel.org Git - citadel.git/commitdiff
Began CSS stylizing the mailbox view
authorArt Cancro <ajc@citadel.org>
Mon, 4 Jul 2022 20:05:10 +0000 (16:05 -0400)
committerArt Cancro <ajc@citadel.org>
Mon, 4 Jul 2022 20:05:10 +0000 (16:05 -0400)
webcit-ng/static/css/webcit.css
webcit-ng/static/js/view_forum.js
webcit-ng/static/js/view_mail.js

index 8967e00e17023dc8e9ee93974cbc729c085786e2..3b3abd753b58f71990dc33e006a37ed52cacfa6a 100644 (file)
@@ -1,7 +1,7 @@
 /*
-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 GNU General Public License, version 3.
+** Copyright (c) 1996-2022 by Art Cancro and the citadel.org team.
+** This program is open source software.  Use, duplication, or disclosure
+** are subject to the terms of the GNU General Public License, version 3.
 */
 
 html,body,h1,h2,h3,h4,h5 {
@@ -22,10 +22,10 @@ html,body,h1,h2,h3,h4,h5 {
 
 .ctdl-mmsg-wrapper {           /* message wrapper for mailbox view */
        overflow: hidden;
-       /* border-radius: 10px; */
        background-color: white;
-       /* margin: 1vw; */
        padding: 5px;           /* inside the box */
+       border-style: solid;    /* could also be: dotted, dashed, solid, double, groove, ridge, inset, outset, none, hidden */
+       border-width: 1px;
 }
 
 .ctdl-msg-reply {
@@ -91,10 +91,14 @@ html,body,h1,h2,h3,h4,h5 {
        font-weight: bold;
 }
 
-.ctdl-msg-content {
+.ctdl-fmsg-content {                   /* message text, when in forum view */
        margin-left: 32px;
 }
 
+.ctdl-mmsg-content {                   /* message text, when in mailbox view */
+       margin-left: 0;
+}
+
 .ctdl-avatar {
        float: left;
        padding-right: 2px;
@@ -186,3 +190,9 @@ blockquote pre {
 
 .ctdl-roomlist-mtime {
 }
+
+.ctdl-mailbox-pane {           /* list of messages when in mailbox view */
+}
+
+.ctdl-reading-pane {           /* message reading/composing pane when in mailbox view */
+}
index aee3666d7217eeaf52776a4a2b554d6fac2121f3..f9c4b2d184fa5ee80ec7c024194f72df2ee0d53c 100644 (file)
@@ -180,7 +180,7 @@ function forum_render_one(msg, existing_div) {
                + "<img src=\"/ctdl/u/" + msg.from + "/userpic\" width=\"32\" "
                + "onerror=\"this.parentNode.innerHTML='&lt;i class=&quot;fa fa-user-circle fa-2x&quot;&gt;&lt;/i&gt; '\">"
                + "</div>"                                                      // end avatar
-               + "<div class=\"ctdl-msg-content\">"                            // begin content
+               + "<div class=\"ctdl-fmsg-content\">"                           // begin content
                + "<div class=\"ctdl-msg-header\">"                             // begin header
                + "<span class=\"ctdl-msg-header-info\">"                       // begin header info on left side
                + "<span class=\"ctdl-username\" onClick=\"javascript:user_profile('" + msg.from + "');\">"
@@ -289,7 +289,7 @@ function open_reply_box(parent_div, is_quoted, references, msgid) {
        + "<img src=\"/ctdl/u/" + current_user + "/userpic\" width=\"32\" "
        + "onerror=\"this.parentNode.innerHTML='&lt;i class=&quot;fa fa-user-circle fa-2x&quot;&gt;&lt;/i&gt; '\">"
        + "</div>"                                                      // end avatar
-       + "<div class=\"ctdl-msg-content\">"                            // begin content
+       + "<div class=\"ctdl-fmsg-content\">"                           // begin content
        + "<div class=\"ctdl-msg-header\">"                             // begin header
        + "<span class=\"ctdl-msg-header-info\">"                       // begin header info on left side
        + "<span class=\"ctdl-username\">"
index 9642886405bba271402817c76cf2fda548e02693..eef879c566d11fbe3efac67e0235888e82782f80 100644 (file)
@@ -10,7 +10,7 @@ var selected_message = 0;                                                     // Remember the last message that was selected
 var RefreshMailboxInterval;                                                    // We store our refresh timer here
 
 
-// Render a message into the mailbox view (FIXME make this different from the forum view)
+// Render a message into the mailbox view
 function mail_render_one(msg, target_div) {
        let div = "FIXME";
        try {
@@ -20,7 +20,7 @@ function mail_render_one(msg, target_div) {
                + "<img src=\"/ctdl/u/" + msg.from + "/userpic\" width=\"32\" "
                + "onerror=\"this.parentNode.innerHTML='&lt;i class=&quot;fa fa-user-circle fa-2x&quot;&gt;&lt;/i&gt; '\">"
                + "</div>"                                                      // end avatar
-               + "<div class=\"ctdl-msg-content\">"                            // begin content
+               + "<div class=\"ctdl-mmsg-content\">"                           // begin content
                + "<div class=\"ctdl-msg-header\">"                             // begin header
                + "<span class=\"ctdl-msg-header-info\">"                       // begin header info on left side
                + "<span class=\"ctdl-username\" onClick=\"javascript:user_profile('" + msg.from + "');\">"
@@ -69,7 +69,7 @@ function mail_render_one(msg, target_div) {
                ;
        }
        catch(err) {
-               outmsg = "<div class=\"ctdl-fmsg-wrapper\">" + err.message + "</div>";
+               outmsg = "<div class=\"ctdl-mmsg-wrapper\">" + err.message + "</div>";
        }
 
        target_div.innerHTML = outmsg;
@@ -130,7 +130,9 @@ function mail_render_row(msg) {
 
 // Set up the mailbox view
 function mail_display() {
-       document.getElementById("ctdl-main").innerHTML = "<div id=\"ctdl-mailbox-pane\">mailbox pane</div><div id=\"ctdl-reading-pane\">reading pane</div>";
+       document.getElementById("ctdl-main").innerHTML =
+               "<div id=\"ctdl-mailbox-pane\" class=\"ctdl-mailbox-pane\"></div>"
+               + "<div id=\"ctdl-reading-pane\" class=\"ctdl-reading-pane\"></div>";
        refresh_mail_display();
        try {                                                   // if this was already set up, clear it so there aren't multiple
                clearInterval(RefreshMailboxInterval);