rem: if ( SelectedItems.length > 1 && !confirm( confirmDeleteAllEvents ) ) break outerLoop; else if ( calendarEvent.title != "" && !confirm( confirmDeleteEvent+" "+calendarEvent.title+"?" ) ) break outerLoop; else if ( !confirm( confirmDeleteUntitledEvent ) ) 
add: if ( SelectedItems.length > 1 ) confirmText = confirmDeleteAllEvents; else if ( calendarEvent.title ) confirmText = (confirmDeleteEvent+" "+calendarEvent.title+"?" ); else confirmText = confirmDeleteUntitledEvent;  if ( !confirm( confirmText ) ) 
context: function deleteEventCommand( DoNotConfirm ){   var SelectedItems = gCalendarWindow.EventSelection.selectedEvents;   outerLoop:      if ( SelectedItems )      {         if ( !DoNotConfirm )         {            var calendarEvent = SelectedItems[0];            if ( SelectedItems.length > 1 && !confirm( confirmDeleteAllEvents ) )               break outerLoop;            else if ( calendarEvent.title != "" && !confirm( confirmDeleteEvent+" "+calendarEvent.title+"?" ) )               break outerLoop;            else if ( !confirm( confirmDeleteUntitledEvent ) )               break outerLoop;         }         calendarsToPublish = new Array();         var autoPublishEnabled = false;         var serverInArray = false;         for( i = 0; i < SelectedItems.length; i++ )         {            var calendarServer = gCalendarWindow.calendarManager.getCalendarByName( SelectedItems[i].parent.server );            if( calendarServer.getAttribute( "http://home.netscape.com/NC-rdf#publishAutomatically" ) == "true" )            {               // If the calendarsToPublish array is empty, add this alarm's calendar's parent server to the array               if( calendarsToPublish.length == 0 )                  serverInArray = false;               else               {                  // Check if this alarm's parent calendar's server is already in the calendarsToPublish array                  serverInArray = false;                  for( var j = 0; j < calendarsToPublish.length; j++ )                  {                     if( calendarsToPublish[j].getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ) ==                         calendarServer.getAttribute( "http://home.netscape.com/NC-rdf#remotePath" ) )                     {                        serverInArray = true;                     }                  }               }               // If this event's parent calendar's server isn't in the array, add it               if( !serverInArray )                  calendarsToPublish.push(calendarServer);            }         }         gICalLib.batchMode = true;         for( i = 0; i < SelectedItems.length; i++ )         {            gCalendarWindow.clearSelectedEvent( SelectedItems[i] );            gICalLib.deleteEvent( SelectedItems[i].id );         }         gICalLib.batchMode = false;         // If we need to publish at least one calendar, publish to each calendarServer in the array         if( calendarsToPublish.length )         {            for( i = 0; i < calendarsToPublish.length; i++ )            {               gCalendarWindow.calendarManager.publishCalendar( calendarsToPublish[i] );            }         }      }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5f43167cfb2d768d9549d992cd6a86618407a1f6/calendar.js/clean/calendar/resources/content/calendar.js