instead of by just clearing out the innerHTML of the table row div, because
IE barfs on the latter.
+Sun Nov 6 12:26:43 EST 2005
+* Message delete: table row delete is now handled by a script.aculo.us effect
+ instead of by just clearing out the innerHTML of the table row div, because
+ IE barfs on the latter.
+
Sat Nov 5 22:53:29 EST 2005 ajc
* Found and removed more absolute URL's.
Sat Nov 5 22:53:29 EST 2005 ajc
* Found and removed more absolute URL's.
// This function activates the ajax-powered recipient autocompleters on the message entry screen.
function activate_entmsg_autocompleters() {
// 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', {} );
+ 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', {} );
}
// Update the preview pane
}
// Update the preview pane
- new Ajax.Updater('preview_pane', '/msg/'+msgnum, { method: 'get' } );
+ new Ajax.Updater('preview_pane', 'msg/'+msgnum, { method: 'get' } );
// Mark the message as read
new Ajax.Request(
// Mark the message as read
new Ajax.Request(
method: 'post',
parameters: 'g_cmd=SEEN '+msgnum+'|1',
onComplete: CtdlRemoveTheUnseenBold(msgnum)
method: 'post',
parameters: 'g_cmd=SEEN '+msgnum+'|1',
onComplete: CtdlRemoveTheUnseenBold(msgnum)
return false; // try to defeat the default click behavior
}
return false; // try to defeat the default click behavior
}
-// Take the boldface away from a message to indicate that it has been seen.
-function CtdlRemoveTheUnseenBold(msgnum) {
- $('m'+msgnum).style.fontWeight='normal' ;
-}
-
-// A message has been deleted, so yank it from the list.
-function CtdlClearDeletedMsg(msgnum) {
- $('m'+msgnum).innerHTML = '' ;
-}
-
-
// Delete selected messages.
function CtdlDeleteSelectedMessages(evt) {
// Delete selected messages.
function CtdlDeleteSelectedMessages(evt) {
if (CtdlNumMsgsSelected < 1) {
// Nothing to delete, so exit silently.
return false;
}
for (i=0; i<CtdlNumMsgsSelected; ++i) {
new Ajax.Request(
if (CtdlNumMsgsSelected < 1) {
// Nothing to delete, so exit silently.
return false;
}
for (i=0; i<CtdlNumMsgsSelected; ++i) {
new Ajax.Request(
method: 'post',
parameters: 'g_cmd=MOVE ' + CtdlMsgsSelected[i] + '|_TRASH_|0',
onComplete: CtdlClearDeletedMsg(CtdlMsgsSelected[i])
method: 'post',
parameters: 'g_cmd=MOVE ' + CtdlMsgsSelected[i] + '|_TRASH_|0',
onComplete: CtdlClearDeletedMsg(CtdlMsgsSelected[i])
// This gets called when the user touches the keyboard after selecting messages...
function CtdlMsgListKeyPress(evt) {
// This gets called when the user touches the keyboard after selecting messages...
function CtdlMsgListKeyPress(evt) {
- if (evt.which == 46) { // DELETE key
+ if (evt.keyCode == 46) { // DELETE key
CtdlDeleteSelectedMessages(evt);
}
return true;
}
CtdlDeleteSelectedMessages(evt);
}
return true;
}
+// Take the boldface away from a message to indicate that it has been seen.
+function CtdlRemoveTheUnseenBold(msgnum) {
+ $('m'+msgnum).style.fontWeight='normal';
+}
+
+// A message has been deleted, so yank it from the list.
+// (IE barfs on m9999.innerHTML='' so we use a script.aculo.us effect instead.)
+function CtdlClearDeletedMsg(msgnum) {
+ new Effect.Squish('m'+msgnum);
+}
+
+ /* lprintf(9, "Sending cmd: %s\n", bstr("g_cmd")); */
serv_printf("%s", bstr("g_cmd"));
serv_getln(buf, sizeof buf);
serv_printf("%s", bstr("g_cmd"));
serv_getln(buf, sizeof buf);
+ /* lprintf(9, " Response: %s\n", buf); */
if (buf[0] == '8') {
serv_printf("\n\n000");
if (buf[0] == '8') {
serv_printf("\n\n000");