rem: debug("processAlarmType: " + alarmMenu.selectedItem.value ); switch( alarmMenu.selectedItem.value ) { case "none": disableElement("alarm-length-field"); disableElement("alarm-length-units"); disableElement("alarm-email-field-label"); disableElement("alarm-email-field"); break;  case "popup": enableElement("alarm-length-field"); enableElement("alarm-length-units"); disableElement("alarm-email-field-label"); disableElement("alarm-email-field"); break; case "email": enableElement("alarm-length-field"); enableElement("alarm-length-units"); enableElement("alarm-email-field-label"); enableElement("alarm-email-field"); break; } 
add: if( componentType == "event" ) { debug("processAlarmType: EVENT " + alarmMenu.selectedItem.value ); switch( alarmMenu.selectedItem.value ) { case "none": disableElement("alarm-length-field"); disableElement("alarm-length-units"); disableElement("alarm-trigger-relation"); disableElement("before-this-event-label"); disableElement("alarm-email-field-label"); disableElement("alarm-email-field"); break;  case "popup": enableElement("alarm-length-field"); enableElement("alarm-length-units"); enableElement("alarm-trigger-relation"); enableElement("before-this-event-label"); disableElement("alarm-email-field-label"); disableElement("alarm-email-field"); break; case "email": enableElement("alarm-length-field"); enableElement("alarm-length-units"); enableElement("alarm-trigger-relation"); enableElement("before-this-event-label"); enableElement("alarm-email-field-label"); enableElement("alarm-email-field"); break; } } else if( componentType == "todo" ) { debug("processAlarmType: TODO " + alarmMenu.selectedItem.value ); var startChecked = getFieldValue("start-checkbox", "checked"); var dueChecked = getFieldValue("due-checkbox", "checked");   if ( (!startChecked && !dueChecked) ) { menuListSelectItem("alarm-type", "none"); disableElement("alarm-length-field"); disableElement("alarm-length-units"); disableElement("alarm-trigger-relation"); disableElement("before-this-todo-label"); disableElement("alarm-email-field-label"); disableElement("alarm-email-field"); disableElement("alarm-type"); } else { enableElement("alarm-type") switch( alarmMenu.selectedItem.value ) { case "none": disableElement("alarm-length-field"); disableElement("alarm-length-units"); disableElement("alarm-trigger-relation"); disableElement("before-this-todo-label"); disableElement("alarm-email-field-label"); disableElement("alarm-email-field"); break;  case "popup": enableElement("alarm-length-field"); enableElement("alarm-length-units"); enableElement("before-this-todo-label"); disableElement("alarm-email-field-label"); disableElement("alarm-email-field"); if (startChecked && !dueChecked) { menuListSelectItem("alarm-trigger-relation", "START"); disableElement("alarm-trigger-relation"); } else if (!startChecked && dueChecked) { menuListSelectItem("alarm-trigger-relation", "END"); disableElement("alarm-trigger-relation"); } else { enableElement("alarm-trigger-relation"); } break; case "email": enableElement("alarm-length-field"); enableElement("alarm-length-units"); enableElement("before-this-todo-label"); enableElement("alarm-email-field-label"); enableElement("alarm-email-field"); if (startChecked && !dueChecked) { menuListSelectItem("alarm-trigger-relation", "START"); disableElement("alarm-trigger-relation"); } else if (!startChecked && dueChecked) { menuListSelectItem("alarm-trigger-relation", "END"); disableElement("alarm-trigger-relation"); } else { enableElement("alarm-trigger-relation"); } break; } } } else dump("processAlarmType: ERROR! Invalid componentType passed: \n"); 
context: function processAlarmType(){    var alarmMenu = document.getElementById("alarm-type");    if( alarmMenu.selectedItem ) {        debug("processAlarmType: " + alarmMenu.selectedItem.value );        switch( alarmMenu.selectedItem.value ) {        case "none":            disableElement("alarm-length-field");            disableElement("alarm-length-units");            disableElement("alarm-email-field-label");            disableElement("alarm-email-field");            break;        //case "popupAndSound":        case "popup":            enableElement("alarm-length-field");            enableElement("alarm-length-units");            disableElement("alarm-email-field-label");            disableElement("alarm-email-field");            break;        case "email":            enableElement("alarm-length-field");            enableElement("alarm-length-units");            enableElement("alarm-email-field-label");            enableElement("alarm-email-field");            break;        }    } else        dump("processAlarmType: no alarmMenu.selectedItem!\n");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/cc16beece2ec24c8045da6cb5d801616852dd68f/eventDialog.js/clean/calendar/resources/content/eventDialog.js