-/* Copyright (c) 1996-2019 by Art Cancro and the citadel.org team.
+/* Copyright (c) 1996-2021 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.
*/
-html,body,h1,h2,h3,h4,h5
-{
+html,body,h1,h2,h3,h4,h5 {
font-family: verdana, sans-serif
}
-div.ctdl-msg-wrapper
-{
+.ctdl-msg-reading-pane {
+ background-color: #123456;
+}
+
+.ctdl-msg-wrapper {
+ border-radius: 25px;
background-color: white;
- margin-left: 2px;
+ margin-left: 4px;
margin-top: 4px;
margin-bottom: 4px;
- margin-right: 2px;
+ margin-right: 4px;
padding: 4px; /* inside the box */
}
-div.ctdl-avatar
-{
+.ctdl-avatar {
width: 32px;
}
-div.ctdl-msg-content
-{
+.ctdl-username {
+ font-weight: bold;
+ color: #000055;
+}
+
+.ctdl-username a {
+ text-decoration: none;
+}
+
+.ctdl-msg-content {
margin-left: 32px;
}
-div.ctdl-avatar
-{
+.ctdl-avatar {
float: left;
padding-right: 2px;
}
// This function is the dispatcher that determines the correct view for a room,
// and calls the correct renderer. Greater/Less than bounds are accepted.
//
-function render_room_view(gt_msg, lt_msg)
-{
+function render_room_view(gt_msg, lt_msg) {
switch(current_view) {
case views.VIEW_MAILBOX: // FIXME view mail rooms as forums for now
case views.VIEW_BBS:
- forum_readmessages("ctdl-main", gt_msg, lt_msg);
+ document.getElementById("ctdl-main").innerHTML = "<div id=\"ctdl-mrp\" class=\"ctdl-msg-reading-pane\"></div>";
+ forum_readmessages("ctdl-mrp", gt_msg, lt_msg);
break;
default:
document.getElementById("ctdl-main").innerHTML =
// Forum view (flat) -- let's have another go at this with the rendering done client-side
//
-function forum_readmessages(target_div, gt_msg, lt_msg)
-{
+function forum_readmessages(target_div, gt_msg, lt_msg) {
original_text = document.getElementById(target_div).innerHTML; // in case we need to replace it after an error
document.getElementById(target_div).innerHTML =
"<div align=\"center\"><i class=\"fas fa-spinner fa-spin\"></i> "
// Render a range of messages, with the div prefix specified
//
-function forum_render_messages(msgs, prefix, scroll_to)
-{
+function forum_render_messages(msgs, prefix, scroll_to) {
for (i=0; i<msgs.length; ++i) {
forum_render_one(prefix+msgs[i], msgs[i], scroll_to);
}