Bug 313615 Automatically close the alarm window when the last alarm is dismissed. r=dmose

This commit is contained in:
jminta%gmail.com 2006-02-04 15:14:58 +00:00
parent 9ec51e95ba
commit 6217e9d593

View File

@ -95,7 +95,13 @@ function onDismissAlarm(event)
{
// everything is just visual at this point. we don't need to do anything special.
var alarmWidget = event.target;
alarmWidget.parentNode.removeChild(alarmWidget);
var parent = alarmWidget.parentNode;
parent.removeChild(alarmWidget);
if (!parent.hasChildNodes()) {
// If this was the last alarm, close the window.
window.close();
}
}