* Delete room is now confirmed through a JavaScript popup instead of
authorArt Cancro <ajc@citadel.org>
Wed, 9 Mar 2005 04:08:30 +0000 (04:08 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 9 Mar 2005 04:08:30 +0000 (04:08 +0000)
  a transition page
* New icon for "Tasks."  In order to keep it consistent with the rest of
  the icons, it is ugly.
* Modified page popup style slightly.

webcit/ChangeLog
webcit/iconbar.c
webcit/roomops.c
webcit/static/head.html
webcit/static/tasks.gif [new file with mode: 0644]
webcit/webcit.c

index 90383bbf2fd36fe3a1a57f2072bfae2a01ff6408..37bf3fed7a15be38d36f9546ed348d7476ab93b1 100644 (file)
@@ -1,4 +1,11 @@
 $Log$
+Revision 603.11  2005/03/09 04:08:30  ajc
+* Delete room is now confirmed through a JavaScript popup instead of
+  a transition page
+* New icon for "Tasks."  In order to keep it consistent with the rest of
+  the icons, it is ugly.
+* Modified page popup style slightly.
+
 Revision 603.10  2005/03/08 04:59:31  ajc
 * More attractive display of vCards (hide unknown fields)
 * Added "title" and "organization" to vCard display/edit
@@ -2474,4 +2481,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 4940f7710fb4f91f00de2c7398bb4baabd7dc71e..3733703899ef6ea887c3d8ab5db6b9f56f605a3a 100644 (file)
@@ -192,7 +192,7 @@ void do_iconbar(void) {
                );
                if (ib_displayas != IB_TEXTONLY) {
                        wprintf("<IMG BORDER=\"0\" WIDTH=\"32\" HEIGHT=\"32\" "
-                       "SRC=\"/static/vcalendar.gif\">");
+                       "SRC=\"/static/tasks.gif\">");
                }
                if (ib_displayas != IB_PICONLY) {
                        wprintf("Tasks");
@@ -478,7 +478,7 @@ void display_customize_iconbar(void) {
                "<INPUT TYPE=\"checkbox\" NAME=\"ib_tasks\" VALUE=\"yes\" %s>"
                "</TD><TD>"
                "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
-               "SRC=\"/static/vcalendar.gif\" ALT=\"&nbsp;\">"
+               "SRC=\"/static/tasks.gif\" ALT=\"&nbsp;\">"
                "</TD><TD>"
                "<B>Tasks</B><br />"
                "A shortcut to your personal task list."
index 8840d127f3d7d40ed9932734173eeeab23b4654e..3d40fb3ec30e77429dcd7c1973d5ad8dd6cedbcf 100644 (file)
@@ -947,7 +947,8 @@ void display_editroom(void)
 
        if (!strcmp(tab, "admin")) {
                wprintf("<UL>"
-                       "<LI><A HREF=\"/confirm_delete_room\">\n"
+                       "<LI><A HREF=\"/delete_room\" "
+                       "onClick=\"return confirm('Are you sure you want to delete this room?');\">\n"
                        "Delete this room</A>\n"
                        "<LI><A HREF=\"/display_editroompic\">\n"
                        "Set or change the graphic for this room's banner</A>\n"
@@ -2048,59 +2049,13 @@ void zap(void)
 
 
 
-
-/*
- * Confirm deletion of the current room
- */
-void confirm_delete_room(void)
-{
-       char buf[SIZ];
-
-       serv_puts("KILL 0");
-       serv_gets(buf);
-       if (buf[0] != '2') {
-               strcpy(WC->ImportantMessage, &buf[4]);
-               display_main_menu();
-               return;
-       }
-       output_headers(1, 1, 2, 0, 0, 0, 0);
-       wprintf("<div id=\"banner\">\n");
-       wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#770000\"><TR><TD>");
-       wprintf("<SPAN CLASS=\"titlebar\">Confirm deletion of room</SPAN>\n");
-       wprintf("</TD></TR></TABLE>\n");
-       wprintf("</div>\n<div id=\"content\">\n");
-
-       wprintf("<CENTER>");
-       wprintf("<FORM METHOD=\"GET\" ACTION=\"/delete_room\">\n");
-
-       wprintf("Are you sure you want to delete <FONT SIZE=+1>");
-       escputs(WC->wc_roomname);
-       wprintf("</FONT>?<br />\n");
-
-       wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Delete\">");
-       wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">");
-
-       wprintf("</FORM></CENTER>\n");
-       wDumpContent(1);
-}
-
-
 /*
  * Delete the current room
  */
 void delete_room(void)
 {
        char buf[SIZ];
-       char sc[SIZ];
 
-       strcpy(sc, bstr("sc"));
-
-       if (strcasecmp(sc, "Delete")) {
-               strcpy(WC->ImportantMessage,
-                       "Cancelled.  This room was not deleted.");
-               display_main_menu();
-               return;
-       }
        serv_puts("KILL 1");
        serv_gets(buf);
        if (buf[0] != '2') {
index d544708fdea76676bb0603960adebc74fec244b6..3b1f1286c092d9fa95ecae1edf812f15695b0c85 100644 (file)
@@ -67,8 +67,7 @@ body {
 
 #page_popup {
        position:absolute;
-       width=600px;
-       height=400px;
+       top:100px; left:100px;
        background-color: #880000;
        z-index: 2;
 }
diff --git a/webcit/static/tasks.gif b/webcit/static/tasks.gif
new file mode 100644 (file)
index 0000000..62dbe57
Binary files /dev/null and b/webcit/static/tasks.gif differ
index 38639d2f51f69c6d7f8b62129392244bf1d63472..9264b6309d41a585e9f3c7ad6552d3d29ffa1c36 100644 (file)
@@ -1231,8 +1231,6 @@ void session_loop(struct httprequest *req)
                save_edit("Your bio", "EBIO", 0);
        } else if (!strcasecmp(action, "confirm_move_msg")) {
                confirm_move_msg();
-       } else if (!strcasecmp(action, "confirm_delete_room")) {
-               confirm_delete_room();
        } else if (!strcasecmp(action, "delete_room")) {
                delete_room();
        } else if (!strcasecmp(action, "validate")) {