$Id$
+Fri Nov 4 17:04:49 EST 2005 ajc
+ * Multi select (using the ctrl key) is now working.
+
Thu Nov 3 23:44:55 EST 2005 ajc
* Removed all of the absolute URL's.
char datebuf[64];
wprintf("<tr id=\"m%ld\" style=\"width:100%%;font-weight:%s;background-color:#fff\" "
- "onClick=\"CtdlSingleClickMsg(%ld)\">",
+ "onClick=\"CtdlSingleClickMsg(event,%ld)\">",
WC->summ[num].msgnum,
(WC->summ[num].is_new ? "bold" : "normal"),
WC->summ[num].msgnum
// This gets called when you single click on a message in the mailbox view.
// We know that the element id of the table row will be the letter 'm' plus the message number.
//
-function CtdlSingleClickMsg(msgnum) {
-
- // $('preview_pane').innerHTML = '<div align="center">Loading...</div>' ;
-
- if (CtdlNumMsgsSelected > 0) {
- for (i=0; i<CtdlNumMsgsSelected; ++i) {
- $('m'+CtdlMsgsSelected[i]).style.backgroundColor = '#fff';
- $('m'+CtdlMsgsSelected[i]).style.color = '#000';
+function CtdlSingleClickMsg(evt, msgnum) {
+
+ // Clear the preview pane until we load the new message
+ $('preview_pane').innerHTML = '';
+
+ // De-select any messages that were already selected, *unless* the Ctrl key
+ // is being pressed, in which case the user wants multi select.
+ if (!evt.ctrlKey) {
+ if (CtdlNumMsgsSelected > 0) {
+ for (i=0; i<CtdlNumMsgsSelected; ++i) {
+ $('m'+CtdlMsgsSelected[i]).style.backgroundColor = '#fff';
+ $('m'+CtdlMsgsSelected[i]).style.color = '#000';
+ }
+ CtdlNumMsgsSelected = 0;
}
- CtdlNumMsgsSelected = 0;
}
$('m'+msgnum).style.backgroundColor='#69aaff';
function CtdlRemoveTheUnseenBold(msgnum) {
$('m'+msgnum).style.fontWeight='normal' ;
}
-