From 9e22266a86c4652101b70c6a5f4b23a3b4d0ff95 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 5 Nov 2005 04:52:53 +0000 Subject: [PATCH] * Multi select using ctrl now handles the condition of a message already being selected and the user doing ctrl-click to deselect it. --- webcit/ChangeLog | 6 +++++- webcit/static/wclib.js | 25 +++++++++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 3af6843e3..613890bd7 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,7 +1,11 @@ $Id$ +Fri Nov 4 23:47:23 EST 2005 ajc +* Multi select using ctrl now handles the condition of a message already being + selected and the user doing ctrl-click to deselect it. + Fri Nov 4 17:04:49 EST 2005 ajc - * Multi select (using the ctrl key) is now working. +* 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. diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 14ff29858..764801f99 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -73,10 +73,27 @@ function CtdlSingleClickMsg(evt, msgnum) { } } - $('m'+msgnum).style.backgroundColor='#69aaff'; - $('m'+msgnum).style.color='#fff'; - CtdlNumMsgsSelected = CtdlNumMsgsSelected + 1; - CtdlMsgsSelected[CtdlNumMsgsSelected-1] = msgnum; + // For multi select ... is the message being clicked already selected? + already_selected = 0; + if ( (evt.ctrlKey) && (CtdlNumMsgsSelected > 0) ) { + for (i=0; i