]> code.citadel.org Git - citadel.git/blobdiff - webcit/roomops.c
More work on the wiki view. Don't try to use it yet.
[citadel.git] / webcit / roomops.c
index 81ac71a8849700a8d1ecd10e750a9914abbb2d91..9573fc9b3860bc681a5593b38d2fd35fbb0fc88f 100644 (file)
@@ -8,7 +8,7 @@
 
 char floorlist[128][SIZ];
 
-char *viewdefs[6];
+char *viewdefs[7];
 
 void initialize_viewdefs(void) {
        viewdefs[0] = _("Bulletin Board");
@@ -17,6 +17,7 @@ void initialize_viewdefs(void) {
        viewdefs[3] = _("Calendar");
        viewdefs[4] = _("Task List");
        viewdefs[5] = _("Notes List");
+       viewdefs[6] = _("Wiki");
 }
 
 
@@ -225,6 +226,9 @@ void readinfo(void)
        if (buf[0] == '1') {
                fmout("CENTER");
        }
+       else {
+               wprintf(" ");
+       }
 }
 
 
@@ -513,6 +517,9 @@ void embed_room_banner(char *got, int navbar_style) {
                                                "</span></a></td>\n", _("Add new note")
                                        );
                                        break;
+                               case VIEW_WIKI:
+                                       /* Don't let users create unlinked pages. */
+                                       break;
                                default:
                                        wprintf(
                                                "<td><a href=\"display_enter\">"
@@ -878,7 +885,7 @@ void display_editroom(void)
 
        /* print the tabbed dialog */
        wprintf("<br />"
-               "<div id=\"fix_scrollbar_bug\">"
+               "<div class=\"fix_scrollbar_bug\">"
                "<TABLE border=0 cellspacing=0 cellpadding=0 width=100%%>"
                "<TR ALIGN=CENTER>"
                "<TD>&nbsp;</TD>\n");
@@ -983,7 +990,7 @@ void display_editroom(void)
        /* end tabbed dialog */ 
 
        /* begin content of whatever tab is open now */
-       wprintf("<div id=\"fix_scrollbar_bug\">"
+       wprintf("<div class=\"fix_scrollbar_bug\">"
                "<TABLE border=0 width=100%% bgcolor=\"#FFFFFF\">\n"
                "<TR><TD>\n");
 
@@ -1835,7 +1842,7 @@ void display_entroom(void)
                "</div>\n<div id=\"content\">\n"
        );
 
-       wprintf("<div id=\"fix_scrollbar_bug\">"
+       wprintf("<div class=\"fix_scrollbar_bug\">"
                "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
 
        wprintf("<form name=\"create_room_form\" method=\"POST\" action=\"entroom\">\n");
@@ -1858,14 +1865,15 @@ void display_entroom(void)
         wprintf("</SELECT>\n");
 
        /* Our clever little snippet of JavaScript automatically selects
-        * a public room if the view is set to Bulletin Board, and it
-        * selects a mailbox room otherwise.  The user can override this,
-        * of course.
+        * a public room if the view is set to Bulletin Board or wiki, and
+        * it selects a mailbox room otherwise.  The user can override this,
+        * of course.  We also disable the floor selector for mailboxes.
         */
        wprintf("<LI>");
        wprintf(_("Default view for room: "));
         wprintf("<SELECT NAME=\"er_view\" SIZE=\"1\" OnChange=\""
-               "       if (this.form.er_view.value == 0) {     "       
+               "       if ( (this.form.er_view.value == 0)             "
+               "          || (this.form.er_view.value == 6) ) {        "
                "               this.form.type[0].checked=true;         "
                "               this.form.er_floor.disabled = false;    "
                "       }                                               "
@@ -2044,7 +2052,7 @@ void display_private(char *rname, int req_pass)
                "</div>\n<div id=\"content\">\n"
        );
 
-       wprintf("<div id=\"fix_scrollbar_bug\">"
+       wprintf("<div class=\"fix_scrollbar_bug\">"
                "<table border=0 width=100%% bgcolor=\"#ffffff\"><tr><td>\n");
 
        wprintf("<CENTER>\n");