зеркало из https://github.com/mozilla/pjs.git
Removing old useless code.
This commit is contained in:
Родитель
c2fef5c34a
Коммит
16f90b85b1
|
@ -484,65 +484,11 @@ CalendarEventDataSource.prototype.getAllFutureEvents = function()
|
|||
return eventArray;
|
||||
}
|
||||
|
||||
/** PUBLIC
|
||||
*
|
||||
* CalendarEventDataSource/makeNewEvent.
|
||||
*
|
||||
* RETURN
|
||||
* new event, not SAVED yet, use addEvent to save it.
|
||||
*/
|
||||
|
||||
CalendarEventDataSource.prototype.makeNewEvent = function( date )
|
||||
{
|
||||
var iCalEventComponent = Components.classes["@mozilla.org/icalevent;1"].createInstance();
|
||||
var iCalEvent = iCalEventComponent.QueryInterface(Components.interfaces.oeIICalEvent);
|
||||
|
||||
if( date )
|
||||
{
|
||||
iCalEvent.start.setTime( date );
|
||||
}
|
||||
|
||||
return iCalEvent;
|
||||
}
|
||||
|
||||
CalendarEventDataSource.prototype.getICalLib = function()
|
||||
{
|
||||
return this.gICalLib;
|
||||
}
|
||||
|
||||
/*
|
||||
** Start time and end time are optional.
|
||||
*/
|
||||
|
||||
CalendarEventDataSource.prototype.openNewEventDialog = function( onOK, startTime, endTime )
|
||||
{
|
||||
var args = new Object();
|
||||
|
||||
var iCalEventComponent = Components.classes["@mozilla.org/icalevent;1"].createInstance();
|
||||
args.calendarEvent = iCalEventComponent.QueryInterface(Components.interfaces.oeIICalEvent);
|
||||
|
||||
args.mode = "new";
|
||||
|
||||
args.onOk = onOK;
|
||||
|
||||
if( !startTime )
|
||||
args.calendarEvent.start.setTime( new Date() );
|
||||
else
|
||||
args.calendarEvent.start.setTime( startTime );
|
||||
|
||||
if( !endTime )
|
||||
{
|
||||
args.calendarEvent.end.setTime( new Date() );
|
||||
|
||||
args.calendarEvent.end.hour++;
|
||||
}
|
||||
else
|
||||
args.calendarEvent.end.setTime( endTime );
|
||||
|
||||
//this doens't work yet
|
||||
calendar.openDialog("caNewEvent", "chrome://calendar/content/ca-event-dialog.xul", false, args );
|
||||
}
|
||||
|
||||
/** PACKAGE STATIC
|
||||
* CalendarEvent orderEventsByDate.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче