4 // JavaScript function library for WebCit.
10 var room_is_trash = 0;
12 if (document.layers) {browserType = "nn4"}
13 if (document.all) {browserType = "ie"}
14 if (window.navigator.userAgent.toLowerCase().match("gecko")) {
18 var ns6=document.getElementById&&!document.all;
21 function CtdlRandomString() {
22 return((Math.random()+'').substr(3));
27 // We love string tokenizers.
28 function extract_token(source_string, token_num, delimiter) {
30 var extracted_string = source_string;
33 for (i=0; i<token_num; ++i) {
34 var j = extracted_string.indexOf(delimiter);
36 extracted_string = extracted_string.substr(j+1);
41 j = extracted_string.indexOf(delimiter);
43 extracted_string = extracted_string.substr(0, j);
46 return extracted_string;
51 // This code handles the popups for important-messages.
52 function hide_imsg_popup() {
53 if (browserType == "gecko" )
54 document.poppedLayer = eval('document.getElementById(\'important_message\')');
55 else if (browserType == "ie")
56 document.poppedLayer = eval('document.all[\'important_message\']');
58 document.poppedLayer = eval('document.layers[\'`important_message\']');
60 document.poppedLayer.style.visibility = "hidden";
64 // This function activates the ajax-powered recipient autocompleters on the message entry screen.
65 function activate_entmsg_autocompleters() {
66 new Ajax.Autocompleter('cc_id', 'cc_name_choices', 'cc_autocomplete', {} );
67 new Ajax.Autocompleter('bcc_id', 'bcc_name_choices', 'bcc_autocomplete', {} );
68 new Ajax.Autocompleter('recp_id', 'recp_name_choices', 'recp_autocomplete', {} );
73 // Toggle the icon bar between menu/roomlist...
74 var which_div_expanded = null;
75 var num_drop_targets = 0;
76 var drop_targets_elements = new Array();
77 var drop_targets_roomnames = new Array();
79 function switch_to_room_list() {
80 $('iconbar').innerHTML = $('iconbar').innerHTML.substr(0, $('iconbar').innerHTML.indexOf('switch'));
81 CtdlLoadScreen('iconbar');
82 new Ajax.Updater('iconbar', 'iconbar_ajax_rooms', { method: 'get' } );
85 function expand_floor(floor_div) {
86 if (which_div_expanded != null) {
87 if ($(which_div_expanded) != null) {
88 $(which_div_expanded).style.display = 'none' ;
92 // clicking on the already-expanded floor causes the whole list to collapse
93 if (which_div_expanded == floor_div) {
94 which_div_expanded = null;
96 // notify the server that no floors are expanded
98 'set_floordiv_expanded/-1', {
105 // expand the requested floor
106 $(floor_div).style.display = 'block';
107 which_div_expanded = floor_div;
109 // notify the server of which floor is expanded
111 'set_floordiv_expanded/'+floor_div, {
117 function switch_to_menu_buttons() {
118 which_div_expanded = null;
119 num_drop_targets = 0;
120 CtdlLoadScreen('iconbar');
121 new Ajax.Updater('iconbar', 'iconbar_ajax_menu', { method: 'get' } );
125 // Static variables for mailbox view...
127 var CtdlNumMsgsSelected = 0;
128 var CtdlMsgsSelected = new Array();
129 var CtdlLastMsgnumSelected = 0;
131 // This gets called when you single click on a message in the mailbox view.
132 // We know that the element id of the table row will be the letter 'm' plus the message number.
134 function CtdlSingleClickMsg(evt, msgnum) {
136 // Clear the preview pane until we load the new message
137 $('preview_pane').innerHTML = '';
139 // De-select any messages that were already selected, *unless* the Ctrl or
140 // Shift key is being pressed, in which case the user wants multi select
142 if ( (!evt.ctrlKey) && (!evt.shiftKey) ) {
143 if (CtdlNumMsgsSelected > 0) {
144 for (i=0; i<CtdlNumMsgsSelected; ++i) {
145 $('m'+CtdlMsgsSelected[i]).style.backgroundColor = '#fff';
146 $('m'+CtdlMsgsSelected[i]).style.color = '#000';
148 CtdlNumMsgsSelected = 0;
152 // For multi select ... is the message being clicked already selected?
153 already_selected = 0;
154 if ( (evt.ctrlKey) && (CtdlNumMsgsSelected > 0) ) {
155 for (i=0; i<CtdlNumMsgsSelected; ++i) {
156 if (CtdlMsgsSelected[i] == msgnum) {
157 already_selected = 1;
158 already_selected_pos = i;
163 // Now select (or de-select) the message
164 if ( (evt.ctrlKey) && (already_selected == 1) ) {
166 // Deselect: first un-highlight it...
167 $('m'+msgnum).style.backgroundColor = '#fff';
168 $('m'+msgnum).style.color = '#000';
170 // Then remove it from the selected messages list.
171 for (i=already_selected_pos; i<(CtdlNumMsgsSelected-1); ++i) {
172 CtdlMsgsSelected[i] = CtdlMsgsSelected[i+1];
174 CtdlNumMsgsSelected = CtdlNumMsgsSelected - 1;
178 else if (evt.shiftKey) {
180 // Group select: first clear everything out...
181 if (CtdlNumMsgsSelected > 0) {
182 for (i=0; i<CtdlNumMsgsSelected; ++i) {
183 $('m'+CtdlMsgsSelected[i]).style.backgroundColor = '#fff';
184 $('m'+CtdlMsgsSelected[i]).style.color = '#000';
187 CtdlNumMsgsSelected = 0;
189 // Then highlight and select the group.
190 // Traverse the table looking for a row whose ID contains the desired msgnum
192 var in_the_group = 0;
194 var table = $('summary_headers');
196 for (var r = 0; r < table.rows.length; r++) {
197 var thename = table.rows[r].id;
198 if ( (thename.substr(1) == msgnum) || (thename.substr(1) == CtdlLastMsgnumSelected) ) {
199 in_the_group = 1 - in_the_group;
205 if ( (in_the_group == 1) || (is_edge == 1) ) {
207 table.rows[r].style.backgroundColor='#69aaff';
208 table.rows[r].style.color='#fff';
210 // And add it to the selected messages list.
211 CtdlNumMsgsSelected = CtdlNumMsgsSelected + 1;
212 CtdlMsgsSelected[CtdlNumMsgsSelected-1] = thename.substr(1);
219 // Select: first highlight it...
220 $('m'+msgnum).style.backgroundColor='#69aaff';
221 $('m'+msgnum).style.color='#fff';
223 // Then add it to the selected messages list.
224 CtdlNumMsgsSelected = CtdlNumMsgsSelected + 1;
225 CtdlMsgsSelected[CtdlNumMsgsSelected-1] = msgnum;
228 CtdlLoadScreen('preview_pane');
229 // Update the preview pane
230 new Ajax.Updater('preview_pane', 'msg/'+msgnum, { method: 'get' } );
232 // Mark the message as read
236 parameters: 'g_cmd=SEEN '+msgnum+'|1',
237 onComplete: CtdlRemoveTheUnseenBold(msgnum)
242 // Save the selected position in case the user does a group select next time.
243 CtdlLastMsgnumSelected = msgnum;
245 return false; // try to defeat the default click behavior
248 // Delete selected messages.
249 function CtdlDeleteSelectedMessages(evt) {
251 if (CtdlNumMsgsSelected < 1) {
252 // Nothing to delete, so exit silently.
255 for (i=0; i<CtdlNumMsgsSelected; ++i) {
256 if (parseInt(room_is_trash) > 0) {
260 parameters: 'g_cmd=DELE ' + CtdlMsgsSelected[i],
261 onComplete: CtdlClearDeletedMsg(CtdlMsgsSelected[i])
269 parameters: 'g_cmd=MOVE ' + CtdlMsgsSelected[i] + '|_TRASH_|0',
270 onComplete: CtdlClearDeletedMsg(CtdlMsgsSelected[i])
275 CtdlNumMsgsSelected = 0;
277 // Clear the preview pane too.
278 $('preview_pane').innerHTML = '';
282 // Move selected messages.
283 function CtdlMoveSelectedMessages(evt, target_roomname) {
285 if (CtdlNumMsgsSelected < 1) {
286 // Nothing to delete, so exit silently.
289 for (i=0; i<CtdlNumMsgsSelected; ++i) {
293 parameters:'g_cmd=MOVE ' + CtdlMsgsSelected[i] + '|' + target_roomname + '|0',
294 onComplete:CtdlClearDeletedMsg(CtdlMsgsSelected[i])
298 CtdlNumMsgsSelected = 0;
300 // Clear the preview pane too.
301 $('preview_pane').innerHTML = '';
306 // This gets called when the user touches the keyboard after selecting messages...
307 function CtdlMsgListKeyPress(evt) {
308 if(document.all) { // aIEeee
309 var whichKey = window.event.keyCode;
311 else { // non-sux0r browsers
312 var whichKey = evt.which;
314 if (whichKey == 46) { // DELETE key
315 CtdlDeleteSelectedMessages(evt);
320 // Take the boldface away from a message to indicate that it has been seen.
321 function CtdlRemoveTheUnseenBold(msgnum) {
322 $('m'+msgnum).style.fontWeight='normal';
325 // A message has been deleted, so yank it from the list.
326 function CtdlClearDeletedMsg(msgnum) {
329 // Traverse the table looking for a row whose ID contains the desired msgnum
330 var table = $('summary_headers');
332 for (var r = 0; r < table.rows.length; r++) {
333 var thename = table.rows[r].id;
334 if (thename.substr(1) == msgnum) {
339 alert('error: browser failed to clear row ' + r);
344 else { // if we can't delete it,
345 new Effect.Squish('m'+msgnum); // just hide it.
351 // These functions called when the user down-clicks on the message list resizer bar
356 function CtdlResizeMsgListMouseUp(evt) {
357 document.onmouseup = null;
358 document.onmousemove = null;
359 if (document.layers) {
360 document.releaseEvents(Event.MOUSEUP | Event.MOUSEMOVE);
365 function CtdlResizeMsgListMouseMove(evt) {
366 y = (ns6 ? evt.clientY : event.clientY);
367 increment = y - saved_y;
369 // First move the bottom of the message list...
370 d = $('message_list');
372 divHeight = d.offsetHeight;
374 else if (d.style.pixelHeight) {
375 divHeight = d.style.pixelHeight;
377 d.style.height = (divHeight + increment) + 'px';
379 // Then move the top of the preview pane...
380 d = $('preview_pane');
382 divTop = d.offsetTop;
384 else if (d.style.pixelTop) {
385 divTop = d.style.pixelTop;
387 d.style.top = (divTop + increment) + 'px';
389 // Resize the bottom of the preview pane...
390 d = $('preview_pane');
392 divHeight = d.offsetHeight;
394 else if (d.style.pixelHeight) {
395 divHeight = d.style.pixelHeight;
397 d.style.height = (divHeight - increment) + 'px';
399 // Then move the top of the slider bar.
400 d = $('resize_msglist');
402 divTop = d.offsetTop;
404 else if (d.style.pixelTop) {
405 divTop = d.style.pixelTop;
407 d.style.top = (divTop + increment) + 'px';
413 function CtdlResizeMsgListMouseDown(evt) {
414 saved_y = (ns6 ? evt.clientY : event.clientY);
415 document.onmouseup = CtdlResizeMsgListMouseUp;
416 document.onmousemove = CtdlResizeMsgListMouseMove;
417 if (document.layers) {
418 document.captureEvents(Event.MOUSEUP | Event.MOUSEMOVE);
420 return false; // disable the default action
427 // These functions handle moving sticky notes around the screen by dragging them
429 var uid_of_note_being_dragged = 0;
430 var saved_cursor_style = 'default';
431 var note_was_dragged = 0;
433 function NotesDragMouseUp(evt) {
434 document.onmouseup = null;
435 document.onmousemove = null;
436 if (document.layers) {
437 document.releaseEvents(Event.MOUSEUP | Event.MOUSEMOVE);
440 d = $('note-' + uid_of_note_being_dragged);
441 d.style.cursor = saved_cursor_style;
443 // If any motion actually occurred, submit an ajax http call to record it to the server
444 if (note_was_dragged > 0) {
445 p = 'note_uid=' + uid_of_note_being_dragged
446 + '&left=' + d.style.left
447 + '&top=' + d.style.top
448 + '&r=' + CtdlRandomString();
458 uid_of_note_being_dragged = '';
462 function NotesDragMouseMove(evt) {
463 x = (ns6 ? evt.clientX : event.clientX);
464 x_increment = x - saved_x;
465 y = (ns6 ? evt.clientY : event.clientY);
466 y_increment = y - saved_y;
469 d = $('note-' + uid_of_note_being_dragged);
471 divTop = parseInt(d.style.top);
472 divLeft = parseInt(d.style.left);
474 d.style.top = (divTop + y_increment) + 'px';
475 d.style.left = (divLeft + x_increment) + 'px';
479 note_was_dragged = 1;
484 function NotesDragMouseDown(evt, uid) {
485 saved_x = (ns6 ? evt.clientX : event.clientX);
486 saved_y = (ns6 ? evt.clientY : event.clientY);
487 document.onmouseup = NotesDragMouseUp;
488 document.onmousemove = NotesDragMouseMove;
489 if (document.layers) {
490 document.captureEvents(Event.MOUSEUP | Event.MOUSEMOVE);
492 uid_of_note_being_dragged = uid;
493 d = $('note-' + uid_of_note_being_dragged);
494 saved_cursor_style = d.style.cursor;
495 d.style.cursor = 'move';
496 return false; // disable the default action
501 // These functions handle resizing sticky notes by dragging the resize handle
503 var uid_of_note_being_resized = 0;
504 var saved_cursor_style = 'default';
505 var note_was_resized = 0;
507 function NotesResizeMouseUp(evt) {
508 document.onmouseup = null;
509 document.onmousemove = null;
510 if (document.layers) {
511 document.releaseEvents(Event.MOUSEUP | Event.MOUSEMOVE);
514 d = $('note-' + uid_of_note_being_resized);
515 d.style.cursor = saved_cursor_style;
517 // If any motion actually occurred, submit an ajax http call to record it to the server
518 if (note_was_resized > 0) {
519 p = 'note_uid=' + uid_of_note_being_resized
520 + '&width=' + d.style.width
521 + '&height=' + d.style.height
522 + '&r=' + CtdlRandomString();
532 uid_of_note_being_resized = '';
536 function NotesResizeMouseMove(evt) {
537 x = (ns6 ? evt.clientX : event.clientX);
538 x_increment = x - saved_x;
539 y = (ns6 ? evt.clientY : event.clientY);
540 y_increment = y - saved_y;
543 d = $('note-' + uid_of_note_being_resized);
545 divTop = parseInt(d.style.height);
546 divLeft = parseInt(d.style.width);
548 d.style.height = (divTop + y_increment) + 'px';
549 d.style.width = (divLeft + x_increment) + 'px';
553 note_was_resized = 1;
558 function NotesResizeMouseDown(evt, uid) {
559 saved_x = (ns6 ? evt.clientX : event.clientX);
560 saved_y = (ns6 ? evt.clientY : event.clientY);
561 document.onmouseup = NotesResizeMouseUp;
562 document.onmousemove = NotesResizeMouseMove;
563 if (document.layers) {
564 document.captureEvents(Event.MOUSEUP | Event.MOUSEMOVE);
566 uid_of_note_being_resized = uid;
567 d = $('note-' + uid_of_note_being_resized);
568 saved_cursor_style = d.style.cursor;
569 d.style.cursor = 'move';
570 return false; // disable the default action
596 // These functions handle drag and drop message moving
600 function CtdlMoveMsgMouseDown(evt, msgnum) {
602 // do the highlight first
603 CtdlSingleClickMsg(evt, msgnum);
605 // Now handle the possibility of dragging
606 saved_x = (ns6 ? evt.clientX : event.clientX);
607 saved_y = (ns6 ? evt.clientY : event.clientY);
608 document.onmouseup = CtdlMoveMsgMouseUp;
609 document.onmousemove = CtdlMoveMsgMouseMove;
610 if (document.layers) {
611 document.captureEvents(Event.MOUSEUP | Event.MOUSEMOVE);
617 function CtdlMoveMsgMouseMove(evt) {
618 x = (ns6 ? evt.clientX : event.clientX);
619 y = (ns6 ? evt.clientY : event.clientY);
621 if ( (x == saved_x) && (y == saved_y) ) {
625 if (CtdlNumMsgsSelected < 1) {
632 drag_o_text = "<div style=\"overflow:none; background-color:#fff; color:#000; border: 1px solid black; filter:alpha(opacity=75); -moz-opacity:.75; opacity:.75;\"><tr><td>";
633 for (i=0; i<CtdlNumMsgsSelected; ++i) {
634 drag_o_text = drag_o_text +
635 ctdl_ts_getInnerText(
636 $('m'+CtdlMsgsSelected[i]).cells[0]
639 drag_o_text = drag_o_text + "<div>";
641 mm_div = document.createElement("DIV");
642 mm_div.style.position='absolute';
643 mm_div.style.top = y + 'px';
644 mm_div.style.left = x + 'px';
645 mm_div.style.pixelHeight = '300';
646 mm_div.style.pixelWidth = '300';
647 mm_div.innerHTML = drag_o_text;
648 document.body.appendChild(mm_div);
651 mm_div.style.top = y + 'px';
652 mm_div.style.left = x + 'px';
655 return false; // prevent the default mouse action from happening?
658 function CtdlMoveMsgMouseUp(evt) {
659 document.onmouseup = null;
660 document.onmousemove = null;
661 if (document.layers) {
662 document.releaseEvents(Event.MOUSEUP | Event.MOUSEMOVE);
666 document.body.removeChild(mm_div);
670 if (num_drop_targets < 1) { // nowhere to drop
674 // Did we release the mouse button while hovering over a drop target?
675 // NOTE: this only works cross-browser because the iconbar div is always
676 // positioned at 0,0. Browsers differ in whether the 'offset'
677 // functions return pos relative to the document or parent.
679 for (i=0; i<num_drop_targets; ++i) {
681 x = (ns6 ? evt.clientX : event.clientX);
682 y = (ns6 ? evt.clientY : event.clientY);
684 l = parseInt(drop_targets_elements[i].offsetLeft);
685 t = parseInt(drop_targets_elements[i].offsetTop);
686 r = parseInt(drop_targets_elements[i].offsetLeft)
687 + parseInt(drop_targets_elements[i].offsetWidth);
688 b = parseInt(drop_targets_elements[i].offsetTop)
689 + parseInt(drop_targets_elements[i].offsetHeight);
691 /* alert('Offsets are: ' + l + ' ' + t + ' ' + r + ' ' + b + '.'); */
693 if ( (x >= l) && (x <= r) && (y >= t) && (y <= b) ) {
694 // Yes, we dropped it on a hotspot.
695 CtdlMoveSelectedMessages(evt, drop_targets_roomnames[i]);
704 function ctdl_ts_getInnerText(el) {
705 if (typeof el == "string") return el;
706 if (typeof el == "undefined") { return el };
707 if (el.innerText) return el.innerText; //Not needed but it is faster
710 var cs = el.childNodes;
712 for (var i = 0; i < l; i++) {
713 switch (cs[i].nodeType) {
714 case 1: //ELEMENT_NODE
715 str += ts_getInnerText(cs[i]);
718 str += cs[i].nodeValue;
727 // This function handles the creation of new notes in the "Notes" view.
729 function add_new_note() {
731 new_eid = CtdlRandomString();
733 $('new_notes_here').innerHTML = $('new_notes_here').innerHTML
734 + '<IMG ALIGN=MIDDLE src=\"static/storenotes_48x.gif\" id=\"' + new_eid + '\" alt=\"Note\" class=\"notes\">'
735 + '<script type=\"text/javascript\">new Draggable (\"%s\", {revert:true})</script>'
736 + '<span id=\"note' + new_eid + '\">' + Date() + '</span><br />'
739 new Ajax.InPlaceEditor('note' + new_eid,
740 'updatenote?eid=' + new_eid , {rows:5,cols:72});
743 function CtdlShowRaw(msgnum) {
744 var customnav = document.createElement("span");
745 var mode_citadel = document.createElement("a");
746 mode_citadel.appendChild(document.createTextNode("Citadel Source"));
747 var mode_rfc822 = document.createElement("a");
748 mode_rfc822.appendChild(document.createTextNode(" RFC822 Source"));
749 mode_citadel.setAttribute("href","#");
750 mode_rfc822.setAttribute("href","#");
751 mode_rfc822.setAttribute("onclick","rawSwitch822('" + msgnum + "');");
752 mode_citadel.setAttribute("onclick","rawSwitchCitadel('" + msgnum + "');");
753 customnav.appendChild(mode_citadel);
754 customnav.appendChild(mode_rfc822);
755 customnav.setAttribute("class","floatcustomnav");
756 floatwindow("headerscreen","pre",customnav);
757 rawSwitch822(msgnum);
760 function rawSwitch822(msgnum) {
761 CtdlLoadScreen("headerscreen");
762 new Ajax.Updater("headerscreen",
764 { method: 'post',parameters: 'g_cmd=MSG2 ' +msgnum } );
768 function rawSwitchCitadel(msgnum) {
769 CtdlLoadScreen("headerscreen");
770 new Ajax.Updater("headerscreen",
772 { method: 'post',parameters: 'g_cmd=MSG0 ' +msgnum } );
776 function floatwindow(newdivid,contentelementtype,customnav) {
777 var windiv = document.createElement("div");
778 windiv.setAttribute("class","floatwindow");
779 var winid = newdivid+"_window";
780 windiv.setAttribute("id",winid);
781 var nav = document.createElement("div");
782 if (customnav != null) {
783 nav.appendChild(customnav);
785 var minimizeA = document.createElement("a");
786 var minimizeButton = document.createTextNode("Close");
787 minimizeA.appendChild(minimizeButton);
788 minimizeA.setAttribute("onclick","killFloatWindow(this);");
789 minimizeA.setAttribute("href","#");
790 nav.appendChild(minimizeA);
791 nav.setAttribute("class","floatnav");
792 windiv.appendChild(nav);
793 var contentarea = document.createElement("pre");
794 contentarea.setAttribute("class","floatcontent");
795 contentarea.setAttribute("id",newdivid);
796 windiv.appendChild(contentarea);
797 document.body.appendChild(windiv);
799 function killFloatWindow(caller) {
800 var span = caller.parentNode;
801 var fwindow = span.parentNode;
802 fwindow.parentNode.removeChild(fwindow);
804 // Place a gradient loadscreen on an element, e.g to use before Ajax.updater
805 function CtdlLoadScreen(elementid) {
806 var elem = document.getElementById(elementid);
807 elem.innerHTML = "<div align=center><br><table border=0 cellpadding=10 bgcolor=\"#ffffff\"><tr><td><img src=\"static/throbber.gif\" /><font color=\"#AAAAAA\"> Loading....</font></td></tr></table><br /></div>";
811 // Show info for a user, basically replaces showuser()
812 // matt@comalies is to blame for this poorly coded masterpiece.
813 function CtdlShowUserInfoPopup(Element) {
815 // hopefully no one needs to use the class attribute... could be better done
816 // with xmlns though..
817 var user = Element.getAttribute("class");
818 var updname = "biospace_"+user;
819 if (document.getElementById(updname) == null) {
820 // insert a space for the bio
821 var pNode = Element.parentNode;
822 var newdiv = document.createElement("div");
824 newdiv.innerHTML = "Getting user info....";
825 pNode.appendChild(newdiv);
826 CtdlLoadScreen(updname);
827 new Ajax.Updater(updname, 'showuser_ajax?who='+user, { method: 'get' } );
838 // Pop open the address book (target_input is the INPUT field to populate)
840 function PopOpenAddressBook(target_input) {
841 $('address_book_popup').style.display = 'block';
842 p = 'target_input=' + target_input + '&r=' + CtdlRandomString();
844 'address_book_popup_middle_div',
845 'display_address_book_middle_div',
854 function PopulateAddressBookInnerDiv(which_addr_book, target_input) {
855 $('address_book_inner_div').innerHTML = "<div align=center><br><table border=0 cellpadding=10 bgcolor=\"#ffffff\"><tr><td><img src=\"static/throbber.gif\" /><font color=\"#AAAAAA\"> Loading....</font></td></tr></table><br /></div>";
856 p = 'which_addr_book=' + which_addr_book
857 + '&target_input=' + target_input
858 + '&r=' + CtdlRandomString();
860 'address_book_inner_div',
861 'display_address_book_inner_div',
869 // What happens when a contact is selected from the address book popup
870 // (populate the specified target)
872 function AddContactsToTarget(target, whichaddr) {
873 while (whichaddr.selectedIndex != -1) {
874 if (target.value.length > 0) {
875 target.value = target.value + ', ';
877 target.value = target.value + whichaddr.value;
878 whichaddr.options[whichaddr.selectedIndex].selected = false;
882 // Respond to a meeting invitation
883 function RespondToInvitation(question_divname, title_divname, msgnum, cal_partnum, sc) {
884 p = 'msgnum=' + msgnum + '&cal_partnum=' + cal_partnum + '&sc=' + sc ;
885 new Ajax.Updater(title_divname, 'respond_to_request', { method: 'post', parameters: p } );
886 Effect.Fade(question_divname, { duration: 0.5 });
889 // Handle a received RSVP
890 function HandleRSVP(question_divname, title_divname, msgnum, cal_partnum, sc) {
891 p = 'msgnum=' + msgnum + '&cal_partnum=' + cal_partnum + '&sc=' + sc ;
892 new Ajax.Updater(title_divname, 'handle_rsvp', { method: 'post', parameters: p } );
893 Effect.Fade(question_divname, { duration: 0.5 });