From fe5fca983b1f25fce5ec5a4055819748093746db Mon Sep 17 00:00:00 2001 From: ajc Date: Fri, 27 Mar 2009 17:02:23 +0000 Subject: [PATCH] * Fixed a multiselect bug in the mailbox view. Ctrl-click was selecting a message even if it was already selected. Amended this code to make it toggle the current state instead. git-svn-id: svn://uncensored.citadel.org/trunk@7275 c9418f8e-8c02-0410-9258-ad310909226a --- webcit/static/summaryview.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/webcit/static/summaryview.js b/webcit/static/summaryview.js index 10779327..22c78ca2 100644 --- a/webcit/static/summaryview.js +++ b/webcit/static/summaryview.js @@ -272,6 +272,7 @@ function CtdlMessageListClick(evt) { method: 'post', parameters: 'g_cmd=SEEN ' + msgId + '|1', onComplete: CtdlMarkRowAsRead(parent)}); + // If the shift key modifier is used, mark a range... } else if (event.button != 2 && event.shiftKey) { markRow(parent); var rowId = parent.ctdlRowId; @@ -288,8 +289,14 @@ function CtdlMessageListClick(evt) { WCLog("Marking row "+x); markRow(rowArray[x]); } + // If the ctrl key modifier is used, toggle one message } else if (event.button != 2 && (event.ctrlKey || event.altKey)) { - markRow(parent); + if (parent.ctdlMarked == true) { + unmarkRow(parent); + } + else { + markRow(parent); + } } } function CtdlMarkRowAsRead(rowElement) { @@ -338,7 +345,7 @@ function removeOldSortClass() { currentSorterToggle.className = ""; } } -function markRow( row) { +function markRow(row) { var msgId = row.ctdlMsgId; row.className = row.className += " marked_row"; row.ctdlMarked = true; -- 2.11.4.GIT