* Changed keypress handling so that it works not only in web browsers, but in
authorArt Cancro <ajc@citadel.org>
Mon, 7 Nov 2005 03:31:31 +0000 (03:31 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 7 Nov 2005 03:31:31 +0000 (03:31 +0000)
  Internet Explorer as well.

webcit/ChangeLog
webcit/static/wclib.js

index a9902fd1b1cec388306b149bdeced34a827995be..5005e18aa89ca0dd451b366a992773e743d9c4a5 100644 (file)
@@ -1,5 +1,9 @@
 $Id$
 
+Sun Nov  6 22:30:54 EST 2005
+* Changed keypress handling so that it works not only in web browsers, but in
+  Internet Explorer as well.
+
 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
index 6e9d0cfff313720beb93ffa36464c7e5f63adcf9..c2572b8c74a55698e779b086f5f121a5fbcbe59d 100644 (file)
@@ -134,7 +134,13 @@ function CtdlDeleteSelectedMessages(evt) {
 
 // This gets called when the user touches the keyboard after selecting messages...
 function CtdlMsgListKeyPress(evt) {
-       if (evt.keyCode == 46) {                                // DELETE key
+       if(document.all) {                              // aIEeee
+               var whichKey = window.event.keyCode;
+       }
+       else {                                          // non-sux0r browsers
+               var whichKey = evt.which;
+       }
+       if (whichKey == 46) {                           // DELETE key
                CtdlDeleteSelectedMessages(evt);
        }
        return true;