rem:      var tab = document.getElementById("dialog-tab"); if(tab.selectedIndex == 2) { var attendees = document.getElementById("attendees-page"); if(attendees.startDate) { setElementValue("event-starttime",   attendees.startDate.jsDate); setElementValue("event-endtime",     attendees.endDate.jsDate); } }   var originalItem = window.calendarItem; var item = (originalItem.isMutable) ? originalItem : originalItem.clone();  var mainpage = document.getElementById("main-page"); mainpage.onSave(item); var recurrencepage = document.getElementById("recurrence-page"); item.recurrenceInfo = recurrencepage.onSave(item); var attendeespage = document.getElementById("attendees-page"); attendeespage.onSave(item); dump(item.icalString + "\n");  var calendar = document.getElementById("item-calendar").selectedItem.calendar; window.onAcceptCallback(item, calendar, originalItem); 
add: onCommandSave(); 
context: function onAccept(){  // the start/enddate is unfortunately duplicated [once on the  // mainpage and once more on the attendees-page]. that's why  // we need to check if we're called while being on the attendees-page.  // in this case we manually transfer the start/enddate to the appropriate  // controls on the mainpage.  var tab = document.getElementById("dialog-tab");  if(tab.selectedIndex == 2) {    var attendees = document.getElementById("attendees-page");    if(attendees.startDate) {      setElementValue("event-starttime",   attendees.startDate.jsDate);      setElementValue("event-endtime",     attendees.endDate.jsDate);    }  }  // if this event isn't mutable, we need to clone it like a sheep  var originalItem = window.calendarItem;  var item = (originalItem.isMutable) ? originalItem : originalItem.clone();  var mainpage = document.getElementById("main-page");  mainpage.onSave(item);  var recurrencepage = document.getElementById("recurrence-page");  item.recurrenceInfo = recurrencepage.onSave(item);  var attendeespage = document.getElementById("attendees-page");  attendeespage.onSave(item);  dump(item.icalString + "\n");  var calendar = document.getElementById("item-calendar").selectedItem.calendar;  window.onAcceptCallback(item, calendar, originalItem);  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c78b2e15e04d4a1764ad73cc3f8de62e66cd0c88/sun-calendar-event-dialog.js/clean/calendar/prototypes/wcap/sun-calendar-event-dialog.js