<div class="w3-col s8 w3-bar">
<span id="current_user">Not logged in.</span><br>
<a href="#" class="w3-bar-item w3-button"><i class="fa fa-envelope" onClick="gotoroom('_MAIL_');"></i></a>
- <a href="#" class="w3-bar-item w3-button"><i class="fa fa-user"></i></a>
- <a href="#" class="w3-bar-item w3-button"><i class="fa fa-cog" onClick="user_profile(current_user);"></i></a>
+ <a href="#" class="w3-bar-item w3-button"><i class="fa fa-user" onClick="user_profile(current_user);"></i></a>
+ <a href="#" class="w3-bar-item w3-button"><i class="fa fa-cog"></i></a>
</div>
</div>
<hr>
function render_room_list() {
+ stuffbar("none"); // No stuffbar on this screen
document.getElementById("ctdl-newmsg-button").style.display = "none"; // There is no "enter" button on this screen
document.getElementById("ctdl-main").innerHTML = "<img src=\"/ctdl/s/images/throbber.gif\" />"; // show throbber while loading
// The "forum" module displays rooms with the "VIEW_BBS" view as classic style web forums.
case views.VIEW_BBS:
+ stuffbar("none");
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);
// The "mail" module displays rooms with the VIEW_MAILBOX view as a webmail program.
case views.VIEW_MAILBOX:
+ stuffbar("block");
document.getElementById("ctdl-sidebar-button-mail").classList.add("w3-blue");
document.getElementById("ctdl-main").innerHTML = "";
mail_display();
break;
default:
+ stuffbar("none");
document.getElementById("ctdl-main").innerHTML =
"<center>The view for " + current_room + " is " + current_view + " but there is no renderer.</center>";
break;
break;
}
}
+
+
+// The "stuffbar" is an extension of the top navigation bar that can be used for elements such as
+// a mailbox view, etc. Many of our operations require activating or deactivating the stuffbar.
+// This is a convenience function to make the stuffbar appear or disappear.
+function stuffbar(state) {
+ document.getElementById("ctdl-stuffbar").style.display = state;
+}