From c8a893409ac62ea5ef3fe7270df745ed9297aa2c Mon Sep 17 00:00:00 2001 From: "michael.buettner%sun.com" Date: Mon, 20 Nov 2006 12:11:43 +0000 Subject: [PATCH] bug #359961 attendee list has some usability issues, r=tbe --- .../sun-calendar-event-dialog-attendees.xml | 74 ++++++++++++++----- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/calendar/prototypes/wcap/sun-calendar-event-dialog-attendees.xml b/calendar/prototypes/wcap/sun-calendar-event-dialog-attendees.xml index d45cc4e33e1..4ed5c2a3e15 100644 --- a/calendar/prototypes/wcap/sun-calendar-event-dialog-attendees.xml +++ b/calendar/prototypes/wcap/sun-calendar-event-dialog-attendees.xml @@ -75,7 +75,7 @@ searchSessions="addrbook" timeout="300" maxrows="4" autoFill="true" autoFillAfterMatch="true" forceComplete="true" minResultsForPopup="1" ignoreBlurWhileSearching="true" - ontextcommand="" + ontextcommand="this.focus();" onerrorcommand="" oninput="this.setAttribute('dirty','true');"> @@ -105,6 +105,7 @@ null false false + false @@ -799,21 +803,23 @@ = (firstVisibleRow+numOfVisibleRows)) + listbox.scrollToIndex(aRow-numOfVisibleRows); - // do we need to scroll in order to see the selected row? - var listbox = document.getAnonymousElementByAttribute(this, "anonid", "listbox"); - var firstVisibleRow = listbox.getIndexOfFirstVisibleRow(); - var numOfVisibleRows = listbox.getNumberOfVisibleRows(); - if (aRow <= firstVisibleRow) - listbox.scrollToIndex(aRow-1); - else - if (aRow-1 >= (firstVisibleRow+numOfVisibleRows)) - listbox.scrollToIndex(aRow-numOfVisibleRows); - - var input = document.getAnonymousElementByAttribute(node, "anonid", "input"); - input.focus(); + var input = document.getAnonymousElementByAttribute(node, "anonid", "input"); + input.focus(); + } + setTimeout(set_focus,0); ]]> @@ -867,13 +873,16 @@ if(row > this.mMaxAttendees) { this.appendNewRow(true); } else { + var input = this.getInputElement(row); + if(input.hasAttribute("disabled")) + return; this.setFocus(row); } + var event = document.createEvent('Events'); + event.initEvent('rowchange', true, false); + event.details = row; + this.dispatchEvent(event); } - var event = document.createEvent('Events'); - event.initEvent('rowchange', true, false); - event.details = row; - this.dispatchEvent(event); ]]> @@ -1329,6 +1338,18 @@ ]]> + + + + + + + + - +