-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
113 changed files
with
4,923 additions
and
3,861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/node_modules | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,48 @@ | ||
# SilverStripe Event Calendar Module | ||
# Silverstripe Event Calendar | ||
|
||
The Event Calendar module for SilverStripe | ||
## Introduction | ||
|
||
## Features | ||
This is an event calendar module for Silverstripe CMS, with the following features: | ||
|
||
* **Calendar** - This Page is used to hold/present events and announcments. | ||
* **Calendar Event** - This page represents an event, which can have many DateTimes. | ||
* **Recurring Events** - Calendar Events can also be set up reoccur automatically. | ||
* **Calendar Announcements** - Entries in a Calendar which don't have a page associated. | ||
* **ICS feeds** - Add multiple ICS feeds to a Calendar to display these events in the feed. | ||
* **ICS output** - Download an ics file for easy importing into calendar apps. | ||
* **RSS feed** - RSS feed of calendar events | ||
* **Calendar Widget** - Display a calendar view in a Widget. | ||
* **Caching** | ||
* **Calendar** - A page type used to hold/present events and announcements. | ||
* **Calendar event** - A page type which represents an event, with one or more DateTimes (an instance of an event). | ||
* **Recurring events** - Calendar events can be set up reoccur automatically. | ||
* **Calendar announcements** - Entries in a calendar which don't have an event page associated. | ||
* **ICS feeds** - Add external ICS feeds to a calendar to display these events. | ||
* **ICS output** - Download an ics file for easy importing into calendar apps. | ||
* **RSS feed** - RSS feed of calendar events. | ||
* **Calendar widget** - Display a calendar view in a widget, so website users can select to view events by year/month/week/day periods. | ||
* **Caching** | ||
|
||
## Requirements | ||
|
||
Silverstripe CMS 4.4 or greater | ||
|
||
Carbon ( version 1 - https://github.com/briannesbitt/carbon ) | ||
|
||
## Configuration Options | ||
|
||
Enable jquery | ||
Enable jQuery (that is, do not request a local copy) | ||
|
||
```yaml | ||
Calendar: | ||
UncleCheese\EventCalendar\Pages\Calendar: | ||
jquery_included: true | ||
``` | ||
Enable caching, and years worth of data to cache | ||
Caching options | ||
```yaml | ||
Calendar: | ||
UncleCheese\EventCalendar\Pages\Calendar: | ||
caching_enabled: true | ||
cache_future_years: 2 | ||
``` | ||
Set default timezone, lang for ICS output: | ||
Set default time zone and language for ICS output | ||
```yaml | ||
Calendar: | ||
UncleCheese\EventCalendar\Pages\Calendar: | ||
timezone: America/New_York | ||
language: EN | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
--- | ||
Name: 'event-calendar' | ||
--- | ||
CachedCalendarTask: | ||
cache_future_years: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
Name: event-calendar-legacy | ||
--- | ||
SilverStripe\ORM\DatabaseAdmin: | ||
classname_value_remapping: | ||
CachedCalendarEntry: UncleCheese\EventCalendar\Models\CachedCalendarEntry | ||
Calendar: UncleCheese\EventCalendar\Pages\Calendar | ||
CalendarAnnouncement: UncleCheese\EventCalendar\Models\CalendarAnnouncement | ||
CalendarDateTime: UncleCheese\EventCalendar\Models\CalendarDateTime | ||
CalendarEvent: UncleCheese\EventCalendar\Pages\CalendarEvent | ||
ICSFeed: UncleCheese\EventCalendar\Models\ICSFeed | ||
RecurringDayOfMonth: UncleCheese\EventCalendar\Models\RecurringDayOfMonth | ||
RecurringDayOfWeek: UncleCheese\EventCalendar\Models\RecurringDayOfWeek | ||
RecurringException: UncleCheese\EventCalendar\Models\RecurringException |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
#Repeat_Alert_Message { background:#fff3a7; padding:2px 4px; border-top:1px solid #d3af22; border-bottom:1px solid #d3af22; } | ||
|
||
.optionset .radio.val { | ||
display: none; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
0
images/calendar-file.gif → client/dist/images/calendar-file.gif
100755 → 100644
File renamed without changes
0
images/calendar__plus.png → client/dist/images/calendar__plus.png
100755 → 100644
File renamed without changes
0
images/check.png → client/dist/images/check.png
100755 → 100644
File renamed without changes
0
images/event-file.gif → client/dist/images/event-file.gif
100755 → 100644
File renamed without changes
0
images/feed.png → client/dist/images/feed.png
100755 → 100644
File renamed without changes
0
images/loader.gif → client/dist/images/loader.gif
100755 → 100644
File renamed without changes
0
javascript/calendar.js → client/dist/js/calendar.js
100755 → 100644
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
;(function($) { | ||
|
||
$(function() { | ||
|
||
$('.field.defaultView select').entwine({ | ||
onmatch: function() { | ||
if ($(this).val() != 'upcoming') { | ||
$('.field.defaultFutureMonths').hide(); | ||
} | ||
}, | ||
onchange: function() { | ||
$('.field.defaultFutureMonths').hide(); | ||
if ($(this).val() == 'upcoming') { | ||
$('.field.defaultFutureMonths').show(); | ||
} | ||
} | ||
}); | ||
|
||
$('.field.checkbox.recursion').entwine({ | ||
onmatch: function() { | ||
var fieldHolderID = function(field) { | ||
return '#Form_EditForm_' + field + '_Holder'; | ||
} | ||
var $recursion = this; | ||
var $tab = $recursion.closest('.tab-pane'); | ||
var $customRecursionType = $tab.find(fieldHolderID('CustomRecursionType')).hide(); | ||
var $dailyInterval = $tab.find('.dailyinterval').hide(); | ||
var $weeklyInterval = $tab.find('.weeklyinterval').hide(); | ||
var $monthlyInterval = $tab.find('.monthlyinterval').hide(); | ||
var $monthlyIndex = $tab.find('.monthlyindex').hide(); | ||
var $recurringDaysOfWeek = $tab.find(fieldHolderID('RecurringDaysOfWeek')).hide(); | ||
var $recurringDaysOfMonth = $tab.find(fieldHolderID('RecurringDaysOfMonth')).hide(); | ||
var $monthlyRecursionType1 = $tab.find(fieldHolderID('MonthlyRecursionType1')).hide(); | ||
var $monthlyRecursionType2 = $tab.find(fieldHolderID('MonthlyRecursionType2')).hide(); | ||
|
||
var resetPanels = function() { | ||
$dailyInterval.hide(); | ||
$weeklyInterval.hide(); | ||
$monthlyInterval.hide(); | ||
$recurringDaysOfWeek.hide(); | ||
$recurringDaysOfMonth.hide().find(':checkbox').attr('disabled', true); | ||
$monthlyRecursionType1.hide(); | ||
$monthlyRecursionType2.hide(); | ||
$monthlyIndex.hide().find('select').attr('disabled', true); | ||
}; | ||
|
||
var resetSubPanels = function() { | ||
$recurringDaysOfMonth.hide().find(':checkbox').attr('disabled', true); | ||
$monthlyIndex.hide().find('select').attr('disabled', true); | ||
}; | ||
|
||
$recursion.find('input').change(function() { | ||
if ($(this).is(':checked')) { | ||
$customRecursionType.show(); | ||
} else { | ||
$tab.find(':checkbox, :radio').attr('checked', false); | ||
$customRecursionType.hide(); | ||
resetPanels(); | ||
} | ||
}).change(); | ||
|
||
$customRecursionType.find('input').change(function() { | ||
if ($(this).is(':checked')) { | ||
resetPanels(); | ||
switch($(this).val()) { | ||
case "1": | ||
$dailyInterval.show(); | ||
break; | ||
case "2": | ||
$weeklyInterval.show(); | ||
$recurringDaysOfWeek.show(); | ||
break; | ||
case "3": | ||
$monthlyInterval.show(); | ||
$monthlyRecursionType1.show(); | ||
$monthlyRecursionType2.show(); | ||
break; | ||
} | ||
} | ||
}).change(); | ||
|
||
$monthlyRecursionType1.find('input').change(function() { | ||
if ($(this).is(':checked')) { | ||
resetSubPanels(); | ||
$recurringDaysOfMonth.show().find(':checkbox').attr('disabled', false); | ||
$monthlyIndex.find('select').attr('disabled', true); | ||
$monthlyRecursionType2.find('input').attr('checked', false).change(); | ||
} | ||
}).change(); | ||
|
||
$monthlyRecursionType2.find('input').change(function() { | ||
if ($(this).is(':checked')) { | ||
resetSubPanels(); | ||
$monthlyIndex.show(); | ||
$recurringDaysOfMonth.find(':checkbox').attr('disabled', true); | ||
$monthlyIndex.find('select').attr('disabled', false); | ||
$monthlyRecursionType1.find('input').attr('checked', false).change(); | ||
} | ||
}).change(); | ||
} | ||
}); | ||
}); | ||
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,4 @@ function navigateToDate(date) | |
function zeroPad(num) { | ||
var s = '0'+num; | ||
return s.substring(s.length-2) | ||
} | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
0
javascript/jquery-1.2.6.min.js → client/dist/js/jquery-1.2.6.min.js
100755 → 100644
File renamed without changes.
0
javascript/jquery.date.js → client/dist/js/jquery.date.js
100755 → 100644
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.