From 2242daaae6de30e799758166e08165ac9a182f2d Mon Sep 17 00:00:00 2001 From: "pavlov%pavlov.net" Date: Fri, 1 Jul 2005 00:46:07 +0000 Subject: [PATCH] fix multi-week view to only show textboxes when editing the title. bug 299312. r=vlad git-svn-id: svn://10.0.0.236/trunk@175441 18797224-902f-48f8-a5cc-f745e15eee43 --- .../base/content/calendar-multiday-view.xml | 73 +++++++++++++------ 1 file changed, 50 insertions(+), 23 deletions(-) diff --git a/mozilla/calendar/base/content/calendar-multiday-view.xml b/mozilla/calendar/base/content/calendar-multiday-view.xml index e2a127098d0..3b678958cb1 100644 --- a/mozilla/calendar/base/content/calendar-multiday-view.xml +++ b/mozilla/calendar/base/content/calendar-multiday-view.xml @@ -1195,8 +1195,9 @@ + + anonid="event-name-textbox" crop="right" hidden="true" wrap="true"/> @@ -1211,7 +1212,15 @@ if (orient == "vertical") otherorient = "horizontal"; var self = this; - this.eventNameElement.onblur = function() { self.stopEditing(); }; + this.eventNameInput.onblur = function() { self.stopEditing(true); }; + this.eventNameInput.onkeypress = function(event) { + // save on enter + if (event.keyCode == 13) + self.stopEditing(true); + // abort on escape + else if (event.keyCode == 27) + self.stopEditing(false); + }; ]]> @@ -1253,8 +1262,12 @@ ]]> - + + + @@ -1301,33 +1316,45 @@ +