Changes to instant messenger to work around IE bugs
authorArt Cancro <ajc@citadel.org>
Thu, 12 Jan 2006 05:41:48 +0000 (05:41 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 12 Jan 2006 05:41:48 +0000 (05:41 +0000)
webcit/ChangeLog
webcit/paging.c
webcit/webcit.c

index 9230411098c21cf3551529bf68498f3cf316383c..712a9c0ae43d75338c88bfdedc90ab60b22ffdce 100644 (file)
@@ -1,5 +1,8 @@
 $Id$
 
+Thu Jan 12 00:40:28 EST 2006 ajc
+* Changes to instant messenger to work around IE bugs
+
 Wed Jan 11 23:20:48 EST 2006 ajc
 * More updates to instant messenger:
   - Better delineation of input box.  Added an icon and a slightly darker
index e15515691a4577884507f35d00ae2073b376e9f7..2548c968bbfaeb7dc4634aa6dab1c857ea3e6b4e 100644 (file)
@@ -170,19 +170,20 @@ void page_popup(void)
        }
 
        /* Then schedule it to happen again a minute from now if the user is idle. */
-       wprintf("<script type=\"text/javascript\">      "
-               " function HandleSslp(sslg_xmlresponse) {       "
-               "  sslg_response = sslg_xmlresponse.responseText.substr(0, 1);  "
-               "  if (sslg_response == 'Y') {  "
-               "   window.open('static/instant_messenger.html', 'CTDL_MESSENGER',      "
-               "    'width=700,height=400');   "
-               "   }   "
-               " }     "
-               " function CheckPager() {       "
-               "  new Ajax.Request('sslg', { method: 'get', onSuccess: HandleSslp } ); "
-               " }     "
-               " new PeriodicalExecuter(CheckPager, 30);       "
-               "</script>\n"
+       wprintf("<script type=\"text/javascript\">      \n"
+               " function HandleSslp(sslg_xmlresponse) {       \n"
+               "  sslg_response = sslg_xmlresponse.responseText.substr(0, 1);  \n"
+               "  if (sslg_response == 'Y') {  \n"
+               "   window.open('static/instant_messenger.html', 'CTDL_MESSENGER',      \n"
+               "    'width=700,height=400');   \n"
+               "   }   \n"
+               " }     \n"
+               " function CheckPager() {       \n"
+               "  new Ajax.Request('sslg', { method: 'get', parameters: Math.random(), \n"
+               "   onSuccess: HandleSslp } );  \n"
+               " }     \n"
+               " new PeriodicalExecuter(CheckPager, 30);       \n"
+               "</script>      \n"
        );
 }
 
index 92eed0d9395f666797211bdb70ff84e673ecf71a..81f3281a74da1a9e400800bf80a9d12e156d61a3 100644 (file)
@@ -390,8 +390,6 @@ void output_headers(        int do_httpheaders,     /* 1 = output HTTP headers
        /* ICONBAR */
        if (do_htmlhead) {
 
-               /* check for instant messages (these display in a new window) */
-               page_popup();
 
                /* check for ImportantMessages (these display in a div overlaying the main screen) */
                if (strlen(WC->ImportantMessage) > 0) {
@@ -404,10 +402,16 @@ void output_headers(      int do_httpheaders,     /* 1 = output HTTP headers
                                "</script>\n");
                        safestrncpy(WC->ImportantMessage, "", sizeof WC->ImportantMessage);
                }
+
                if ( (WC->logged_in) && (!unset_cookies) ) {
                        wprintf("<div id=\"iconbar\">");
                        do_selected_iconbar();
+
+                       /* check for instant messages (these display in a new window) */
+                       page_popup();
+                       wprintf("</div>");
                }
+
                if (do_room_banner == 1) {
                        wprintf("<div id=\"banner\">\n");
                        embed_room_banner(NULL, navbar_default);