зеркало из https://github.com/mozilla/gecko-dev.git
Added in ability to show events from selected day (this doesn't refresh when people click on a new day) bug 168672
This commit is contained in:
Родитель
b23ddd906b
Коммит
9fd943dd88
|
@ -376,6 +376,7 @@
|
|||
<menuitem id="event-filter-2weeks" label="Events Next 2 Weeks" value="2weeks" persist="selected"/>
|
||||
<menuitem id="event-filter-month" label="Events In The Next Month" value="month" persist="selected"/>
|
||||
<menuitem id="event-filter-future" label="All Future Events" value="future" persist="selected"/>
|
||||
<menuitem id="event-filter-current" label="Currently Selected Day" value="current" persist="selected"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</box>
|
||||
|
|
|
@ -529,6 +529,11 @@ function getEventTable( )
|
|||
gEventSource.onlyFutureEvents = true;
|
||||
eventTable = gEventSource.getCurrentEvents();
|
||||
break;
|
||||
case "current":
|
||||
var SelectedDate = gCalendarWindow.getSelectedDate();
|
||||
var EndDate = new Date( SelectedDate.getTime() + ( 1000 * 60 * 60 * 24 ) );
|
||||
eventTable = gEventSource.getEventsForRange( SelectedDate, EndDate );
|
||||
break;
|
||||
default:
|
||||
eventTable = new Array();
|
||||
dump( "there's no case for "+document.getElementById( "event-filter-menulist" ).selectedItem.value );
|
||||
|
|
Загрузка…
Ссылка в новой задаче