* The JavaScript code to activate the ajax-powered recipient autocompleters
authorArt Cancro <ajc@citadel.org>
Sat, 17 Sep 2005 16:44:30 +0000 (16:44 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 17 Sep 2005 16:44:30 +0000 (16:44 +0000)
  has been moved to a function in wclib.js (it's still activated from an
  inline script in messages.c)

webcit/ChangeLog
webcit/messages.c
webcit/static/wclib.js

index 65607ec1661454126f2af9502a2af7ca4e007f71..fc67c10d324edd59f80b2a28bc0aa8ba226733b5 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 625.8  2005/09/17 16:44:30  ajc
+* The JavaScript code to activate the ajax-powered recipient autocompleters
+  has been moved to a function in wclib.js (it's still activated from an
+  inline script in messages.c)
+
 Revision 625.7  2005/09/17 13:18:05  ajc
 * fmt_date.c: changes to "brief" mode.  It now displays time only if the
   date is today, month/day/time if the date is within the last six months,
@@ -2981,4 +2986,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 96c597cf10d60258040aa2b4417609c1a39695b2..7fcee6f240d5f6b1a553926fb693caf7f1785325 100644 (file)
@@ -2350,7 +2350,7 @@ void display_enter(void)
 
        /*
         * Otherwise proceed normally.
-`       * Do a custom room banner with no navbar...
+        * Do a custom room banner with no navbar...
         */
        output_headers(1, 1, 2, 0, 0, 0, 0);
        wprintf("<div id=\"banner\">\n");
@@ -2433,17 +2433,11 @@ void display_enter(void)
                wprintf("<div class=\"auto_complete\" id=\"bcc_name_choices\"></div>");
                wprintf("</td><td></td></tr>\n");
 
-               /* Initialize the autocomplete ajax helpers */
-               wprintf("<script type=\"text/javascript\">                              \n"
-                       " new Ajax.Autocompleter('cc_id', 'cc_name_choices',            \n"
-                       "       '/cc_autocomplete', {} );                               \n"
-                       " new Ajax.Autocompleter('bcc_id', 'bcc_name_choices',          \n"
-                       "       '/bcc_autocomplete', {} );                              \n"
-                       " new Ajax.Autocompleter('recp_id', 'recp_name_choices',        \n"
-                       "       '/recp_autocomplete', {} );                             \n"
-                       "</script>                                                      \n"
+               /* Initialize the autocomplete ajax helpers (found in wclib.js) */
+               wprintf("<script type=\"text/javascript\">      \n"
+                       " activate_entmsg_autocompleters();     \n"
+                       "</script>                              \n"
                );
-
        }
 
        wprintf("<tr><td>");
index 90266777e3539a610c141261968dd46d8add54a8..52b6a65bcff4ccde398773e59bb81ad7c48c18d7 100644 (file)
@@ -44,3 +44,11 @@ function hide_imsg_popup() {
        // new Effect.FadeTo('important_message', 0.0, 1000, 20, {complete:function() { hide_imsg_popup_old(); }} );
        hide_imsg_popup_old();  // Do it the old way for now, to avoid library conflicts
 }
+
+
+// This function activates the ajax-powered recipient autocompleters on the message entry screen.
+function activate_entmsg_autocompleters() {
+       new Ajax.Autocompleter('cc_id', 'cc_name_choices', '/cc_autocomplete', {} );
+       new Ajax.Autocompleter('bcc_id', 'bcc_name_choices', '/bcc_autocomplete', {} );
+       new Ajax.Autocompleter('recp_id', 'recp_name_choices', '/recp_autocomplete', {} );
+}