<div 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="#" class="w3-bar-item w3-button w3-padding w3-blue"><i class="fa fa-users fa-fw"></i> Rooms</a>
+ <div id="roomlist">rooms go here</div>
<a href="#" class="w3-bar-item w3-button w3-padding"><i class="fa fa-eye fa-fw"></i> Users</a>
<a href="#" class="w3-bar-item w3-button w3-padding"><i class="fa fa-users fa-fw"></i> Bombs</a>
<a href="#" class="w3-bar-item w3-button w3-padding"><i class="fa fa-bullseye fa-fw"></i> Missiles</a>
function display_login_screen(any_message)
{
document.getElementById("main").innerHTML =
- "Put the login screen here, dummary<br><br>" +
+ "<center><br><br>Put the login screen here, dummary<br><br>" +
any_message + "<br><br>" +
- _("User name:") + "<input type=\"text\" id=\"username\"><br>" +
- _("Password:") + "<input type=\"password\" id=\"password\"><br>" +
- "<a href=\"javascript:login_button()\">" + _("Log in") + "</a>"
+ "<table border=0><tr><td>" +
+ _("User name:") + "</td><td><input type=\"text\" id=\"username\"></td></tr><tr><td>" +
+ _("Password:") + "</td><td><input type=\"password\" id=\"password\"></td></tr></table><br>" +
+ "<a href=\"javascript:login_button()\">" + _("Log in") + "</a></center>"
;
update_banner();
// Display a room list in the main div.
//
function display_room_list() {
- document.getElementById("sidebar").innerHTML = "<img src=\"/ctdl/s/throbber.gif\" />" ; // show throbber while loading
+ document.getElementById("roomlist").innerHTML = "<img src=\"/ctdl/s/throbber.gif\" />" ; // show throbber while loading
var request = new XMLHttpRequest();
request.open("GET", "/ctdl/r/", true);
return(a.name < b.name);
});
- new_sidebar_text = "<ul>" ;
+ new_roomlist_text = "<ul>" ;
for (var i in data) {
if (i > 0) {
if (data[i].floor != data[i-1].floor) {
- new_sidebar_text = new_sidebar_text + "<li class=\"divider\"></li>" ;
+ new_roomlist_text = new_roomlist_text + "<li class=\"divider\"></li>" ;
}
}
- new_sidebar_text = new_sidebar_text +
+ new_roomlist_text = new_roomlist_text +
"<li>"
+ "<a href=\"javascript:gotoroom('" + escapeJS(escapeHTML(data[i].name)) + "');\">"
+ escapeHTML(data[i].name)
+ "</a></li>"
;
}
- new_sidebar_text = new_sidebar_text + "</ul>";
- document.getElementById("sidebar").innerHTML = new_sidebar_text ;
+ new_roomlist_text = new_roomlist_text + "</ul>";
+ document.getElementById("roomlist").innerHTML = new_roomlist_text ;
}
// Update the "banner" div with all relevant info.