]> code.citadel.org Git - citadel.git/commitdiff
more divs
authorArt Cancro <ajc@citadel.org>
Fri, 28 Jan 2022 05:01:12 +0000 (00:01 -0500)
committerArt Cancro <ajc@citadel.org>
Fri, 28 Jan 2022 05:01:12 +0000 (00:01 -0500)
webcit-ng/static/css/webcit.css
webcit-ng/static/js/roomlist.js

index 7af7bb1f956e4ae5bbef23d7b7f91870654e742d..ccf78ece7ab0cad7d6c388f4d6ab482e9dc1176a 100644 (file)
@@ -133,7 +133,18 @@ blockquote pre {
        margin-right: 1%;
 }
 
+.ctdl-roomlist-top {
+       margin: 1%;
+}
+
 .ctdl-roomlist-floor {
+}
+
+.ctdl-roomlist-floor-label {
        font-weight: bold;
        font-size: x-large;
 }
+
+.ctdl-roomlist-floor-rooms {
+}
+
index c6abd8bd3fa444e13277c15535a36caca14ade95..5d22a85972dcd839e7290086b9b8ca4f26b489a1 100644 (file)
@@ -48,26 +48,29 @@ function display_room_list_renderer(floor_list, room_list) {
        output = [];
 
        for (var f in floor_list) {
-               output[floor_list[f].num] = "<div><div class=\"ctdl-roomlist-floor\">" + floor_list[f].name + "</div>";
+               output[floor_list[f].num] = "";
        }
 
        for (var i in room_list) {
-               output[room_list[i].floor] += (room_list[i].hasnewmsgs ? "<b>" : "");
-               output[room_list[i].floor] += "<a href=\"javascript:gotoroom('" + escapeJS(escapeHTML(room_list[i].name)) + "');\">";
-               output[room_list[i].floor] += escapeHTML(room_list[i].name);
-               output[room_list[i].floor] += (room_list[i].hasnewmsgs ? "</b>" : "");
-               output[room_list[i].floor] += "</a>";
                if (room_list[i].current_view == views.VIEW_BBS) {
-                       output[room_list[i].floor] += "(FORUM)";
+                       output[room_list[i].floor] += (room_list[i].hasnewmsgs ? "<b>" : "");
+                       output[room_list[i].floor] += "<a href=\"javascript:gotoroom('" + escapeJS(escapeHTML(room_list[i].name)) + "');\">";
+                       output[room_list[i].floor] += escapeHTML(room_list[i].name);
+                       output[room_list[i].floor] += (room_list[i].hasnewmsgs ? "</b>" : "");
+                       output[room_list[i].floor] += "</a>";
+                       output[room_list[i].floor] += "<br>";
                }
-               output[room_list[i].floor] += "<br>";
        }
 
-       final_output = "";
+       final_output = "<div class=\"ctdl-roomlist-top\">";
        for (var f in floor_list) {
+               final_output += "<div class=\"ctdl-roomlist-floor\">";
+               final_output += "<div class=\"ctdl-roomlist-floor-label\">" + floor_list[f].name + "</div>";
+               final_output += "<div class=\"ctdl-roomlist-floor-rooms\">";
                final_output += output[floor_list[f].num];
-               final_output += "<br>";
+               final_output += "</div></div>";
        }
+       final_output += "</div>";
        document.getElementById("ctdl-main").innerHTML = final_output ;
 }