Monotone-Parent: c3ae4b113ff2c8334bbf16d65765c81a85d99929

Monotone-Revision: 4f4e28497288bed0e99c75b59a94a4e1202026c8

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-04-14T19:07:59
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-04-14 19:07:59 +00:00
parent 4ad3eefcdd
commit 72f6916865
2 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2010-04-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/SchedulerUI.js (onDocumentKeydown): new
callback method for handling keypresses. Initial code handles
event/task deletion.
* UI/WebServerResources/generic.js (onRowClick): fixed a typo.
2010-04-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>

View File

@ -2550,6 +2550,17 @@ function drawNowLine () {
}
}
function onDocumentKeydown(event) {
var target = Event.element(event);
if (target.tagName != "INPUT") {
if (event.keyCode == Event.KEY_DELETE
|| (event.keyCode == Event.KEY_BACKSPACE && isMac())) {
deleteEvent();
Event.stop(event);
}
}
}
function initCalendars() {
sorting["attribute"] = "start";
sorting["ascending"] = true;
@ -2572,6 +2583,11 @@ function initCalendars() {
// Calendar import form
$("uploadCancel").observe("click", hideCalendarImport);
$("uploadOK").observe("click", hideImportResults);
if (Prototype.Browser.Gecko)
Event.observe(document, "keypress", onDocumentKeydown); // for FF2
else
Event.observe(document, "keydown", onDocumentKeydown);
}
onWindowResize.defer();