﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
4045	some admin Javascript fixes and cleanups	arvin	andrewjesaitis	"I recognised that the calendar behaves a bit different in Konqueror than in
Firefox: When clicking inside the calendar but not on a element with
functionality (e.g. month name) the calendar is closed in Konqueror but not in
Firefox. This lead me to the first part of my patch:

- Attach ""onclick"" events to ""document"" instead of ""window"". Konqueror does
  not deliver the event to ""window"" even when the propagation was stopped.
  Internet Explorer (tested with IE6 SP2 at a friend computer) does not
  deliver the event at all to ""window"". AFAIK ""window"" in not part of DOM so
  ""document"" should be more portable. I have tested the new code with Firefox,
  Explorer, Safari, Konqueror and Opera.

The other parts are only minor cleanups:

- Event handlers set in openClock/openCalendar are removed in
  dismissClock/dismissCalendar (""window.onclick = null;"" does not work since
  handlers are installed with addEvent).

- Calendar inserts dates with leading zeroes.

- Remove duplicates of functions ""quickElement"" and ""addEvent"".

- Move ""removeChildren"" and ""cancelEventPropagation"" to ""core.js"" as they
  might be handy also at other places.

If you want a patch with only some parts included let me know.
"	Bug	closed	contrib.admin	dev	Normal	fixed	admin calendar	andrewjesaitis	Accepted	1	0	0	1	0	0
