/*
-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 {
.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 {
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;
.ctdl-roomlist-mtime {
}
+
+.ctdl-mailbox-pane { /* list of messages when in mailbox view */
+}
+
+.ctdl-reading-pane { /* message reading/composing pane when in mailbox view */
+}
+ "<img src=\"/ctdl/u/" + msg.from + "/userpic\" width=\"32\" "
+ "onerror=\"this.parentNode.innerHTML='<i class="fa fa-user-circle fa-2x"></i> '\">"
+ "</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 + "');\">"
+ "<img src=\"/ctdl/u/" + current_user + "/userpic\" width=\"32\" "
+ "onerror=\"this.parentNode.innerHTML='<i class="fa fa-user-circle fa-2x"></i> '\">"
+ "</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\">"
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 {
+ "<img src=\"/ctdl/u/" + msg.from + "/userpic\" width=\"32\" "
+ "onerror=\"this.parentNode.innerHTML='<i class="fa fa-user-circle fa-2x"></i> '\">"
+ "</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 + "');\">"
;
}
catch(err) {
- outmsg = "<div class=\"ctdl-fmsg-wrapper\">" + err.message + "</div>";
+ outmsg = "<div class=\"ctdl-mmsg-wrapper\">" + err.message + "</div>";
}
target_div.innerHTML = outmsg;
// 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);