├── tests ├── members.yml ├── phpstan.neon ├── Dev │ └── EventDebugExtensionTest.php ├── Admin │ ├── Forms │ │ ├── CalendarsFormTest.php │ │ ├── CategoriesFormTest.php │ │ └── EventsFormTest.php │ └── GridField │ │ └── CalendarEventPageGridfieldDetailForm_ItemRequestTest.php ├── Events │ ├── EventLocationExtensionTest.php │ ├── EventRegistrationEmbargoExtensionTest.php │ ├── EventRegistrationEmbargoTest.php │ └── EventImageExtensionTest.php ├── Registrations │ ├── Controller │ │ └── AttendeesControllerExtensionTest.php │ ├── Helper │ │ └── EventRegistrationTicketsHelperTest.php │ ├── EventRegistrationControllerTest.php │ ├── EventRegistrationTest.php │ ├── AttendeesExtensionTest.php │ ├── EventRegistrationFormTest.php │ └── PaymentRegistrationFormTest.php ├── Calendars │ ├── EventCalendarExtensionTest.php │ └── CalendarTest.php ├── PageTypes │ ├── Extensions │ │ └── EventPageControllerTest.php │ └── CalendarPageTest.php ├── eventpages.yml ├── event-tags.yml ├── Categories │ ├── EventCategoryExtentionTest.php │ ├── EventCategoryTest.php │ └── PublicEventCategoryTest.php ├── Colors │ ├── ColorpaletteFieldTest.php │ ├── ColorpaletteHelperTest.php │ ├── ColorHelperTest.php │ └── CalendarColorExtensionTest.php ├── events-grouped.yml ├── Core │ └── CalendarConfigTest.php ├── DateTime │ └── DateTimeHelperTraitTest.php ├── Tags │ └── EventTagTest.php └── Helpers │ └── ICSExportHelperTest.php ├── css ├── .gitignore ├── admin │ └── CalendarAdmin.css ├── modules.css └── pagetypes │ └── CalendarPage.css ├── lang ├── _manifest_exclude └── en.yml ├── docs ├── .htaccess ├── img │ ├── preview.png │ ├── screenshots │ │ ├── cms-addevent.png │ │ ├── cms-calendar.png │ │ ├── frontend-list.png │ │ ├── frontend-addevent.png │ │ └── frontend-fullcalendar.png │ └── omnigraffle-export │ │ ├── Concepts.png │ │ ├── Structure.png │ │ ├── Private-Calendar-plan.png │ │ └── Shared-Calendars-plan.png ├── frontend.md └── notes.md ├── scss ├── admin │ ├── CalendarAdmin.scss │ └── CalendarEventGridFieldDetailForm.scss ├── _mixins.scss ├── modules.scss └── pagetypes │ └── CalendarPage.scss ├── .gitignore ├── icons ├── templates ├── Layout │ ├── EventRegistrationFailed.ss │ └── EventRegistrationSuccess.ss ├── Email │ ├── EventRegistrationSuccessful.ss │ └── EventRegistrationFailed.ss ├── TitleDK │ └── Calendar │ │ └── PageTypes │ │ └── Layout │ │ ├── CalendarPage_search.ss │ │ ├── CalendarPage_calendar.ss │ │ ├── CalendarPage_calendarview.ss │ │ ├── CalendarPage_detail.ss │ │ └── CalendarPage.ss └── Includes │ ├── Fullcalendar.ss │ ├── CalendarDetails.ss │ ├── EventSearch.ss │ ├── EventRegistration.ss │ ├── CalendarKeys.ss │ ├── EventList.ss │ ├── FullcalendarCustomNav.ss │ ├── CalendarPageMenu.ss │ ├── EventDetail.ss │ └── EventListEvents.ss ├── _config ├── pickers.yml ├── relationships.yml ├── categories.yml ├── bulk-upload.yml ├── events-view.yml ├── calendars.yml ├── events.yml ├── colors.yml ├── pages.yml ├── routes.yml ├── registration.yml ├── extensions.yml └── testing.yml ├── images ├── feed.png ├── icons │ └── calendar.png └── loaders │ └── indicator-lite.gif ├── _config.php ├── thirdparty ├── colorpicker │ ├── jquery.colourPicker.gif │ ├── jquery.colourPicker.css │ └── jquery.colourPicker.min.js ├── fullcalendar │ ├── 2.9.1 │ │ ├── fullcalendar │ │ │ ├── lib │ │ │ │ └── cupertino │ │ │ │ │ └── images │ │ │ │ │ ├── animated-overlay.gif │ │ │ │ │ ├── ui-icons_2694e8_256x240.png │ │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ │ ├── ui-icons_3d80b3_256x240.png │ │ │ │ │ ├── ui-icons_72a7cf_256x240.png │ │ │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ │ │ ├── ui-bg_flat_15_cd0a0a_40x100.png │ │ │ │ │ ├── ui-bg_glass_100_e4f1fb_1x400.png │ │ │ │ │ ├── ui-bg_glass_50_3baae3_1x400.png │ │ │ │ │ ├── ui-bg_glass_80_d7ebf9_1x400.png │ │ │ │ │ ├── ui-bg_highlight-hard_70_000000_1x100.png │ │ │ │ │ ├── ui-bg_highlight-soft_25_ffef8f_1x100.png │ │ │ │ │ ├── ui-bg_diagonals-thick_90_eeeeee_40x40.png │ │ │ │ │ ├── ui-bg_highlight-hard_100_f2f5f7_1x100.png │ │ │ │ │ └── ui-bg_highlight-soft_100_deedf7_1x100.png │ │ │ └── lang │ │ │ │ ├── en-ca.js │ │ │ │ ├── en-ie.js │ │ │ │ ├── ko.js │ │ │ │ ├── ja.js │ │ │ │ ├── ar-ma.js │ │ │ │ ├── ar-tn.js │ │ │ │ ├── en-gb.js │ │ │ │ ├── da.js │ │ │ │ ├── en-au.js │ │ │ │ ├── en-nz.js │ │ │ │ ├── nn.js │ │ │ │ ├── nb.js │ │ │ │ ├── sv.js │ │ │ │ ├── zh-tw.js │ │ │ │ ├── fr-ca.js │ │ │ │ ├── fr.js │ │ │ │ ├── fr-ch.js │ │ │ │ ├── pt.js │ │ │ │ ├── ro.js │ │ │ │ ├── it.js │ │ │ │ ├── id.js │ │ │ │ ├── pt-br.js │ │ │ │ ├── nl.js │ │ │ │ ├── eu.js │ │ │ │ ├── th.js │ │ │ │ ├── bg.js │ │ │ │ ├── tr.js │ │ │ │ ├── gl.js │ │ │ │ ├── de.js │ │ │ │ ├── de-at.js │ │ │ │ ├── ca.js │ │ │ │ ├── he.js │ │ │ │ ├── ar-sa.js │ │ │ │ ├── vi.js │ │ │ │ ├── es.js │ │ │ │ ├── fa.js │ │ │ │ ├── hi.js │ │ │ │ ├── zh-cn.js │ │ │ │ ├── is.js │ │ │ │ ├── lb.js │ │ │ │ └── pl.js │ │ └── LICENSE.txt │ └── 1.6.1 │ │ ├── fullcalendar │ │ └── fullcalendar.print.css │ │ └── license.txt └── timepicker │ └── jquery.timepicker.css ├── .github ├── workflows │ └── ci.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── javascript ├── pagetypes │ └── CalendarPage.js └── admin │ ├── CalendarEventGridFieldDetailForm.js │ ├── ColorpaletteField.js │ └── CalendarAdmin.js ├── gulpfile.js ├── phpcs.xml.dist ├── .editorconfig ├── phpunit.xml.dist ├── src ├── Calendars │ ├── GroupsCalendarExtension.php │ └── EventCalendarExtension.php ├── Admin │ ├── GridField │ │ └── CalendarEventGridfieldDetailForm.php │ └── Forms │ │ ├── CategoriesForm.php │ │ └── CalendarsForm.php ├── DateTime │ └── DateTimeHelper.php ├── Colors │ ├── ColorHelper.php │ ├── ColorpaletteField.php │ ├── ColorpaletteHelper.php │ └── CalendarColorExtension.php ├── PageTypes │ ├── Extensions │ │ └── EventPageController.php │ └── CalendarPage.php ├── Registrations │ ├── Attendee.php │ ├── AttendeesExtension.php │ └── Helper │ │ └── EventRegistrationTicketsHelper.php ├── Events │ ├── EventImageExtension.php │ ├── EventLocationExtension.php │ └── EventRegistrationEmbargoExtension.php ├── Categories │ ├── EventCategory.php │ ├── EventCategoryExtention.php │ └── PublicEventCategory.php └── Tags │ └── EventTag.php ├── LICENSE └── CHANGELOG.md /tests/members.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/.gitignore: -------------------------------------------------------------------------------- 1 | *.scss -------------------------------------------------------------------------------- /lang/_manifest_exclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/admin/CalendarAdmin.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all -------------------------------------------------------------------------------- /scss/admin/CalendarAdmin.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /icons: -------------------------------------------------------------------------------- 1 | ../../../silverstripe-calendar/icons -------------------------------------------------------------------------------- /templates/Layout/EventRegistrationFailed.ss: -------------------------------------------------------------------------------- 1 | Event registration failed 2 | -------------------------------------------------------------------------------- /templates/Layout/EventRegistrationSuccess.ss: -------------------------------------------------------------------------------- 1 | Event registration success 2 | -------------------------------------------------------------------------------- /templates/Email/EventRegistrationSuccessful.ss: -------------------------------------------------------------------------------- 1 | Successful registration to an event. 2 | -------------------------------------------------------------------------------- /templates/TitleDK/Calendar/PageTypes/Layout/CalendarPage_search.ss: -------------------------------------------------------------------------------- 1 | <% include EventSearch %> 2 | -------------------------------------------------------------------------------- /_config/pickers.yml: -------------------------------------------------------------------------------- 1 | SilverStripe\Forms\FormField: 2 | calendar_datepicker_class: 'hasDatepicker' 3 | -------------------------------------------------------------------------------- /templates/TitleDK/Calendar/PageTypes/Layout/CalendarPage_calendar.ss: -------------------------------------------------------------------------------- 1 | 2 | <% include CalendarDetails %> -------------------------------------------------------------------------------- /templates/TitleDK/Calendar/PageTypes/Layout/CalendarPage_calendarview.ss: -------------------------------------------------------------------------------- 1 | 2 | <% include Fullcalendar %> -------------------------------------------------------------------------------- /images/feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/images/feed.png -------------------------------------------------------------------------------- /templates/Email/EventRegistrationFailed.ss: -------------------------------------------------------------------------------- 1 | Your attempt to register for event failed due to payment issue. 2 | -------------------------------------------------------------------------------- /docs/img/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/docs/img/preview.png -------------------------------------------------------------------------------- /_config.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | <% if $Event.Registerable %> 5 | <% include EventRegistration %> 6 | <% end_if %> 7 | 8 | -------------------------------------------------------------------------------- /_config/calendars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: silverstripe-calendar-calendars 3 | --- 4 | TitleDK\Calendar\Calendars\Calendar: 5 | colors: true 6 | # @todo This seems an odd setting, but is most likely historical 7 | enabled: true 8 | -------------------------------------------------------------------------------- /templates/Includes/Fullcalendar.ss: -------------------------------------------------------------------------------- 1 | 2 | <% include CalendarPageMenu CurrentMenu='calendarview' %> 3 | 4 | <% include FullcalendarCustomNav CurrentMenu='calendarview' %> 5 | 6 | 7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/animated-overlay.gif -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_2694e8_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_2694e8_256x240.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_3d80b3_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_3d80b3_256x240.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_72a7cf_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_72a7cf_256x240.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_glass_50_3baae3_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_glass_50_3baae3_1x400.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png -------------------------------------------------------------------------------- /_config/events.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: silverstripe-calendar-events 3 | --- 4 | TitleDK\Calendar\Events\Event: 5 | # Allow events to be all day 6 | enable_allday_events: true 7 | 8 | # Force events to have an end date time 9 | force_end: true 10 | 11 | 12 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | pull_request: 6 | workflow_dispatch: 7 | 8 | jobs: 9 | ci: 10 | name: CI 11 | uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 12 | with: 13 | phpcoverage: true 14 | js: false 15 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dynamic/silverstripe-calendar-module/master/thirdparty/fullcalendar/2.9.1/fullcalendar/lib/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png -------------------------------------------------------------------------------- /templates/Includes/CalendarDetails.ss: -------------------------------------------------------------------------------- 1 | 2 |
3 | <% with $CurrentCalendar %> 4 |

$Title

5 | 6 |

Subscription link:

7 | 8 | {$BaseHref}ics/cal/{$getLink} 9 | 10 | 11 | 12 | <% end_with %> 13 | 14 |
-------------------------------------------------------------------------------- /javascript/pagetypes/CalendarPage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * CalendarPage 3 | * 4 | * @package calendar 5 | */ 6 | 7 | (function($) { 8 | $(function () { 9 | 10 | //select search query on click 11 | $('#EventSearch input[type=text]').click(function(){ 12 | $(this).select(); 13 | }); 14 | 15 | }); 16 | })(jQuery); -------------------------------------------------------------------------------- /_config/colors.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: silverstripe-calendar-colors 3 | --- 4 | TitleDK\Calendar\Colors\ColorpaletteHelper: 5 | base_palette: 6 | - '#4B0082' 7 | - '#696969' 8 | - '#B22222' 9 | - '#A52A2A' 10 | - '#DAA520' 11 | - '#006400' 12 | - '#40E0D0' 13 | - '#0000CD' 14 | - '#800080' 15 | -------------------------------------------------------------------------------- /tests/Dev/EventDebugExtensionTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /docs/frontend.md: -------------------------------------------------------------------------------- 1 | # Frontend compilation 2 | 3 | Gulp is used for frontend compilation. 4 | 5 | _This has been ported from Compass so we're still working on the specifics._ 6 | 7 | 8 | Install dependencies: 9 | 10 | npm install 11 | #not yet needed 12 | #bower install 13 | 14 | 15 | Adding dependencice: 16 | 17 | bower install blast-text --save -------------------------------------------------------------------------------- /tests/Admin/Forms/CalendarsFormTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/Admin/Forms/CategoriesFormTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/Events/EventLocationExtensionTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/Events/EventRegistrationEmbargoExtensionTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /templates/Includes/EventSearch.ss: -------------------------------------------------------------------------------- 1 | 2 | <% include CalendarPageMenu %> 3 | 4 |
5 | 6 | 7 | 8 | You've searched for "$SearchQuery". 9 | 10 | 11 |
12 | <% if $Events %> 13 |

Results

14 | <% include EventListEvents %> 15 | <% else %> 16 | We didn't find any results. 17 | <% end_if %> 18 |
19 | 20 | 21 | 22 |
-------------------------------------------------------------------------------- /tests/Registrations/Controller/AttendeesControllerExtensionTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/Calendars/EventCalendarExtensionTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /templates/Includes/EventRegistration.ss: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% with $Event %> 4 |
5 | <% if not $IsPastEvent %> 6 |

7 | Register for: "$Title <% if $PaymentRequired %>($Cost.Nice)<% end_if %>" 8 |

9 | <% if $TicketsRequired %> 10 | $RegistrationPaymentForm 11 | <% else %> 12 | $RegistrationForm 13 | <% end_if %> 14 | <% end_if %> 15 |
16 | <% end_with %> -------------------------------------------------------------------------------- /templates/TitleDK/Calendar/PageTypes/Layout/CalendarPage.ss: -------------------------------------------------------------------------------- 1 |

$Title

2 | 3 | <% require javascript('//code.jquery.com/jquery-3.3.1.min.js') %> 4 | <% require javascript('titledk/silverstripe-calendar:javascript/pagetypes/CalendarPage.js') %> 5 | <% require javascript('titledk/silverstripe-calendar:javascript/fullcalendar/PublicFullcalendarView.js') %> 6 | <% include EventList %> 7 | 8 |
9 | -------------------------------------------------------------------------------- /scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | //see https://github.com/chriseppstein/compass/issues/418 2 | @mixin input-placeholder { 3 | &::-webkit-input-placeholder { 4 | @content; 5 | } 6 | &:-moz-placeholder { 7 | @content; 8 | } 9 | &:-ms-input-placeholder { 10 | @content; 11 | } 12 | } 13 | 14 | @mixin clearfix() { 15 | &:before, 16 | &:after { 17 | content: ""; 18 | display: table; 19 | } 20 | &:after { 21 | clear: both; 22 | } 23 | } -------------------------------------------------------------------------------- /tests/Admin/Forms/EventsFormTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | 14 | 15 | public function testConstruct(): void 16 | { 17 | $this->markTestSkipped('TODO'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs/notes.md: -------------------------------------------------------------------------------- 1 | ## From Slack 2 | ```angular2html 3 | $today = new DateTime(); 4 | $db = DB::get_conn(); 5 | $format = "%Y-%m-%d"; 6 | $start_field = $db->formattedDatetimeClause( 7 | '"Event"."Start"', 8 | $format 9 | ); 10 | $end_field = $db->formattedDatetimeClause( 11 | '"Event"."End"', 12 | $format 13 | ); 14 | $now = $today->format("Y-m-d"); 15 | $list = $list->where([ 16 | $start_field . ' <= ?' => $now, 17 | $end_field . ' >= ?' => $now 18 | ]); 19 | ``` 20 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 2 | var gulp = require('gulp'); 3 | var $ = require('gulp-load-plugins')(); 4 | 5 | 6 | gulp.task('build-css', function() { 7 | gulp.src('./scss/**/*') 8 | .pipe($.sass({ 9 | includePaths : ['./scss'] 10 | }) 11 | .on('error', $.sass.logError)) 12 | .pipe(gulp.dest('./css')); 13 | 14 | }); 15 | 16 | gulp.task('watch', function() { 17 | gulp.watch('./scss/**/*', ['build-css']); 18 | }); 19 | 20 | gulp.task('default', [ 21 | 'build-css', 22 | 'watch' 23 | ]); -------------------------------------------------------------------------------- /_config/pages.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: silverstripe-calendar-pages 3 | --- 4 | TitleDK\Calendar\PageTypes\EventPage: 5 | enable_eventpage: true 6 | 7 | TitleDK\Calendar\PageTypes\CalendarPage: 8 | eventlist: true 9 | calendarview: true 10 | index: eventlist 11 | 12 | controllerUrl: "/fullcalendar/" 13 | fullcalendar_js_settings: 14 | header: 15 | left: '' 16 | center: 'title' 17 | right: 'prev,next,today' 18 | # add more space for events 19 | height: 'auto' 20 | -------------------------------------------------------------------------------- /tests/PageTypes/Extensions/EventPageControllerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | 14 | 15 | public function testEvents(): void 16 | { 17 | $this->markTestSkipped('TODO'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /phpcs.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeSniffer ruleset for SilverStripe coding conventions. 4 | 5 | src 6 | tests 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # For more information about the properties used in this file, 2 | # please see the EditorConfig documentation: 3 | # http://editorconfig.org 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 4 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [{*.yml,package.json}] 14 | indent_size = 2 15 | 16 | # The indent size used in the package.json file cannot be changed: 17 | # https://github.com/npm/npm/pull/3180#issuecomment-16336516 18 | -------------------------------------------------------------------------------- /_config/routes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: silverstripe-calendar-routes 3 | --- 4 | SilverStripe\Control\Director: 5 | rules: 6 | fullcalendar//$Action/$ID/$OtherID: TitleDK\Calendar\FullCalendar\FullcalendarController 7 | calregistrations//$Action/$ID/$OtherID: TitleDK\Calendar\Registrations\EventRegistrationController 8 | ics//$Action/$ID/$OtherID: TitleDK\Calendar\Libs\ColorPool\ICSExport_Controller 9 | EventRegistrationController//$Action/$ID/$OtherID: TitleDK\Calendar\Registrations\EventRegistrationController 10 | -------------------------------------------------------------------------------- /tests/Events/EventRegistrationEmbargoTest.php: -------------------------------------------------------------------------------- 1 | markTestIncomplete('TODO'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /templates/Includes/CalendarKeys.ss: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |

Events Calendar Key

6 | 17 |
-------------------------------------------------------------------------------- /templates/Includes/EventList.ss: -------------------------------------------------------------------------------- 1 | 2 | <% if $Action == 'eventregistration' %> 3 | <% include CalendarPageMenu CurrentMenu='eventregistration' %> 4 | <% else %> 5 | <% include CalendarPageMenu CurrentMenu='eventlist' %> 6 | <% end_if %> 7 | 8 | <% include FullcalendarCustomNav CurrentMenu='eventlist' %> 9 | 10 |
11 | 12 | <% if $Events %> 13 |
14 | <% include EventListEvents %> 15 |
16 | <% else %> 17 | No events in this period 18 | <% end_if %> 19 | 20 |
21 | -------------------------------------------------------------------------------- /_config/registration.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: silverstripe-calendar-registration 3 | --- 4 | TitleDK\Calendar\PageTypes\CalendarPageController: 5 | registration_enabled: true 6 | 7 | TitleDK\Calendar\Registrations\EventRegistration: 8 | enabled: true 9 | 10 | TitleDK\Calendar\Events\Event: 11 | # Embargo registration relative to end date or calculated end date. Negative values are before the end datetime, so 12 | # a value of -1440 is a day ago. Use a positive value to allow for registration during a multiday event 13 | embargo_registration_relative_to_end_datetime_mins: '0' 14 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tests/ 6 | 7 | 8 | 9 | 10 | src/ 11 | 12 | tests/ 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /javascript/admin/CalendarEventGridFieldDetailForm.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(function () { 3 | 4 | 5 | $.entwine('ss', function($){ 6 | 7 | /** 8 | * Initializing event specific fields when event form is loaded 9 | */ 10 | $('.CalendarEventGridfieldDetailForm fieldset').entwine({ 11 | onmatch: function() { 12 | var form = $(this).closest('form'); 13 | 14 | var eventForm = new EventFields(form); 15 | eventForm.init(); 16 | 17 | //console.log(form); 18 | //console.log('initialized'); 19 | } 20 | }); 21 | 22 | 23 | }); 24 | 25 | }); 26 | })(jQuery); 27 | 28 | -------------------------------------------------------------------------------- /javascript/admin/ColorpaletteField.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.entwine('ss', function($) { 3 | $('.ColorpaletteInput').entwine({ 4 | onmatch: function(e) { 5 | var self=$(this); 6 | var holder = self.closest('.field'); 7 | self.colourPicker({ 8 | //ico: WEBROOT + 'aFramework/Modules/Base/gfx/jquery.colourPicker.gif', 9 | title: false 10 | }); 11 | 12 | var input = holder.find('input'); 13 | 14 | //adding text class to the input for CMS styling 15 | input.addClass('text'); 16 | 17 | console.log(holder); 18 | console.log(input); 19 | }, 20 | onkeyup: function() { 21 | // 22 | } 23 | }); 24 | }); 25 | })(jQuery); -------------------------------------------------------------------------------- /tests/Registrations/Helper/EventRegistrationTicketsHelperTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | 14 | 15 | public function testNumberOfTicketsRemaining(): void 16 | { 17 | $this->markTestSkipped('TODO'); 18 | } 19 | 20 | 21 | public function testNumberOfTicketsNotAvailable(): void 22 | { 23 | $this->markTestSkipped('TODO'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Calendars/GroupsCalendarExtension.php: -------------------------------------------------------------------------------- 1 | Calendar() 15 | */ 16 | class GroupsCalendarExtension extends DataExtension 17 | { 18 | private static $many_many = [ 19 | 'Calendar' => 'TitleDK\Calendar\Calendars\Calendar', 20 | ]; 21 | } 22 | -------------------------------------------------------------------------------- /tests/eventpages.yml: -------------------------------------------------------------------------------- 1 | TitleDK\Calendar\PageTypes\EventPage: 2 | eventpage1: 3 | Title: Test Event Page 4 | Content: This is a test page 5 | Events: 6 | - =>TitleDK\Calendar\Events\Event.eventWithDuration 7 | - =>TitleDK\Calendar\Events\Event.eventSameDay 8 | - =>TitleDK\Calendar\Events\Event.eventAllDay 9 | - =>TitleDK\Calendar\Events\Event.eventCricketSeason 10 | - =>TitleDK\Calendar\Events\Event.eventWeekend 11 | - =>TitleDK\Calendar\Events\Event.eventFuture 12 | - =>TitleDK\Calendar\Events\Event.eventZeroSeconds1 13 | - =>TitleDK\Calendar\Events\Event.eventZeroSeconds2 14 | - =>TitleDK\Calendar\Events\Event.eventNoEnd 15 | -------------------------------------------------------------------------------- /tests/event-tags.yml: -------------------------------------------------------------------------------- 1 | TitleDK\Calendar\Tags\EventTag: 2 | tag1: 3 | Title: Cumberland Sausages 4 | tag2: 5 | Title: Eggs 6 | tag3: 7 | Title: Beans 8 | tag4: 9 | Title: Beans 10 | tag5: 11 | Title: Beans 12 | 13 | TitleDK\Calendar\Events\Event: 14 | event1: 15 | Title: This is an example event 16 | StartDateTime: 2019-12-16 20:00 17 | Duration: 02:00:00 18 | TimeFrameType: Duration 19 | Tags: 20 | - =>TitleDK\Calendar\Tags\EventTag.tag1 21 | - =>TitleDK\Calendar\Tags\EventTag.tag2 22 | - =>TitleDK\Calendar\Tags\EventTag.tag3 23 | - =>TitleDK\Calendar\Tags\EventTag.tag4 24 | - =>TitleDK\Calendar\Tags\EventTag.tag5 25 | -------------------------------------------------------------------------------- /tests/Categories/EventCategoryExtentionTest.php: -------------------------------------------------------------------------------- 1 | getCMSFields()->toArray(); 14 | $names = \array_map(static function ($field) { 15 | return $field->Name; 16 | }, $fields); 17 | 18 | // @todo go one level deeper, this is a bit of a meaningless test 19 | $this->assertEquals(['Root'], $names); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: 'FEATURE ' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /scss/modules.scss: -------------------------------------------------------------------------------- 1 | .fatDate { 2 | float:left; 3 | width:100px; 4 | 5 | .month { 6 | display: block; 7 | text-align: center; 8 | color: #333; 9 | font-size: 18px; 10 | line-height: 18px; 11 | } 12 | 13 | .dayOfMonth { 14 | display: block; 15 | text-align: center; 16 | color: #777; 17 | font-size: 55px; 18 | } 19 | } 20 | 21 | 22 | a.feed-checkbox { 23 | background-image: url('../images/feed.png'); 24 | background-position: 3px 3px; 25 | background-repeat: no-repeat; 26 | border-radius: 5px 5px 5px 5px; 27 | display: inline-block; 28 | height: 16px; 29 | margin-left: 3px; 30 | margin-right: 5px; 31 | vertical-align: text-top; 32 | width: 16px; 33 | } 34 | a.feed-checkbox-text { 35 | color: #666; 36 | text-decoration: none; 37 | } -------------------------------------------------------------------------------- /css/modules.css: -------------------------------------------------------------------------------- 1 | .fatDate { 2 | float: left; 3 | width: 100px; 4 | } 5 | 6 | .fatDate .month { 7 | display: block; 8 | text-align: center; 9 | color: #333; 10 | font-size: 18px; 11 | line-height: 55px; 12 | } 13 | 14 | .fatDate .dayOfMonth { 15 | display: block; 16 | text-align: center; 17 | color: #777; 18 | font-size: 55px; 19 | } 20 | 21 | a.feed-checkbox { 22 | background-image: url("../images/feed.png"); 23 | background-position: 3px 3px; 24 | background-repeat: no-repeat; 25 | border-radius: 5px 5px 5px 5px; 26 | display: inline-block; 27 | height: 16px; 28 | margin-left: 3px; 29 | margin-right: 5px; 30 | vertical-align: text-top; 31 | width: 16px; 32 | } 33 | 34 | a.feed-checkbox-text { 35 | color: #666; 36 | text-decoration: none; 37 | } -------------------------------------------------------------------------------- /tests/Registrations/EventRegistrationControllerTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | 14 | 15 | public function testRegisterform(): void 16 | { 17 | $this->markTestSkipped('TODO'); 18 | } 19 | 20 | 21 | public function testPaymentregisterform(): void 22 | { 23 | $this->markTestSkipped('TODO'); 24 | } 25 | 26 | 27 | public function testHandleJsonResponse(): void 28 | { 29 | $this->markTestSkipped('TODO'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/Colors/ColorpaletteFieldTest.php: -------------------------------------------------------------------------------- 1 | assertEquals('#48E', $paletteField->value); 15 | } 16 | 17 | 18 | public function testFieldColorWithNoHash(): void 19 | { 20 | $paletteField = ColorpaletteField::create('ColorField', 'Choose a color', null, '48E'); 21 | $this->assertEquals('#48E', $paletteField->Value()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Admin/GridField/CalendarEventGridfieldDetailForm.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 13 | /* 14 | $ir = new CalendarEventGridFieldDetailForm_ItemRequest(null, null, null, null, null); 15 | 16 | $form = $ir->ItemEditForm(); 17 | $fields = $form->Fields(); 18 | $names = array_map(function($field) { 19 | return $field->Name; 20 | }, $fields->toArray()); 21 | 22 | $this->assertEquals([], $names); 23 | */ 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/DateTime/DateTimeHelper.php: -------------------------------------------------------------------------------- 1 | format('Y-m-d H:i:s'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /_config/extensions.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: silverstripe-calendar-extensions 3 | --- 4 | TitleDK\Calendar\Calendars\Calendar: 5 | extensions: 6 | - Suilven\Sluggable\Extension\Sluggable 7 | - TitleDK\Calendar\Colors\CalendarColorExtension 8 | # Slug the calendar title 9 | slug: Title 10 | 11 | TitleDK\Calendar\Events\Event: 12 | # Slug the event title 13 | slug: Title 14 | extensions: 15 | - Suilven\Sluggable\Extension\Sluggable 16 | 17 | - TitleDK\Calendar\Calendars\EventCalendarExtension 18 | 19 | # Enable this if you wish events to have optional categories 20 | - TitleDK\Calendar\Categories\EventCategoryExtension 21 | 22 | - TitleDK\Calendar\Registrations\EventRegistrationExtension 23 | 24 | TitleDK\Calendar\Tags\EventTag: 25 | slug: Title 26 | extensions: 27 | - Suilven\Sluggable\Extension\Sluggable 28 | -------------------------------------------------------------------------------- /src/Colors/ColorHelper.php: -------------------------------------------------------------------------------- 1 | tag. 10 | * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. 11 | */ 12 | 13 | 14 | /* Events 15 | -----------------------------------------------------*/ 16 | 17 | .fc-event { 18 | background: #fff !important; 19 | color: #000 !important; 20 | } 21 | 22 | /* for vertical events */ 23 | 24 | .fc-event-bg { 25 | display: none !important; 26 | } 27 | 28 | .fc-event .ui-resizable-handle { 29 | display: none !important; 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/events-grouped.yml: -------------------------------------------------------------------------------- 1 | 2 | TitleDK\Calendar\Calendars\Calendar: 3 | groupedCalendar: 4 | Title: Grouped Calendar 5 | Events: 6 | - =>TitleDK\Calendar\Events\Event.eventWithDuration 7 | - =>TitleDK\Calendar\Events\Event.eventSameDay 8 | - =>TitleDK\Calendar\Events\Event.eventAllDay 9 | - =>TitleDK\Calendar\Events\Event.eventCricketSeason 10 | - =>TitleDK\Calendar\Events\Event.eventWeekend 11 | - =>TitleDK\Calendar\Events\Event.eventFuture 12 | - =>TitleDK\Calendar\Events\Event.eventZeroSeconds1 13 | - =>TitleDK\Calendar\Events\Event.eventZeroSeconds2 14 | - =>TitleDK\Calendar\Events\Event.eventNoEnd 15 | 16 | TitleDK\Calendar\PageTypes\CalendarPage: 17 | groupedCalendarPage: 18 | Title: Test Grouped Calendar Page 19 | Content: This is a test calendar page with several events 20 | Calendars: 21 | - =>TitleDK\Calendar\Calendars\Calendar.groupedCalendar 22 | 23 | -------------------------------------------------------------------------------- /tests/Categories/EventCategoryTest.php: -------------------------------------------------------------------------------- 1 | getAddNewFields(); 16 | $this->assertNull($fields->fieldByName('Events')); 17 | $this->assertNotNull($fields->fieldByName('Title')); 18 | } 19 | 20 | 21 | public function testGetCMSFields(): void 22 | { 23 | $ec = EventCategory::singleton(); 24 | 25 | /** @var \SilverStripe\Forms\FieldList $fields */ 26 | $fields = $ec->getCMSFields(); 27 | $this->assertNull($fields->fieldByName('Events')); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/Core/CalendarConfigTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 12 | } 13 | 14 | 15 | public function testMergeSettings(): void 16 | { 17 | $this->markTestSkipped('TODO'); 18 | } 19 | 20 | 21 | public function testSubPackageSettings(): void 22 | { 23 | $this->markTestSkipped('TODO'); 24 | } 25 | 26 | 27 | public function testSubpackageEnabled(): void 28 | { 29 | $this->markTestSkipped('TODO'); 30 | } 31 | 32 | 33 | public function testSubpackageSetting(): void 34 | { 35 | $this->markTestSkipped('TODO'); 36 | } 37 | 38 | 39 | public function testInit(): void 40 | { 41 | $this->markTestSkipped('TODO'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /templates/Includes/FullcalendarCustomNav.ss: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if $CurrentMenu == 'calendarview' %> 4 |
5 | Day 6 | Week 7 | Month 8 |
9 | <% end_if %> 10 |
11 | 12 | <% if $CurrentMenu == 'eventlist' %> 13 |
14 |
15 |
16 | 21 |

$EventPageTitle

22 |
23 |
24 | <% end_if %> 25 |
26 | -------------------------------------------------------------------------------- /tests/Colors/ColorpaletteHelperTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('TODO'); 13 | } 14 | 15 | 16 | public function testPaletteDropDown(): void 17 | { 18 | $dropdown = ColorpaletteHelper::paletteDropdown('Colors'); 19 | $this->assertEquals([ 20 | '#4B0082', 21 | '#696969', 22 | '#B22222', 23 | '#A52A2A', 24 | '#DAA520', 25 | '#006400', 26 | '#40E0D0', 27 | '#0000CD', 28 | '#800080', 29 | ], $dropdown->getValidValues()); 30 | } 31 | 32 | 33 | public function testGetPalette(): void 34 | { 35 | $this->markTestSkipped('TODO'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: 'BUG ' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /templates/Includes/CalendarPageMenu.ss: -------------------------------------------------------------------------------- 1 | <% if $SearchEnabled %> 2 | 10 | <% end_if %> 11 | 12 | 25 | -------------------------------------------------------------------------------- /src/PageTypes/Extensions/EventPageController.php: -------------------------------------------------------------------------------- 1 | getRequest()->getVar('past'); 21 | 22 | return isset($past) 23 | ? 'past' 24 | : 'coming'; 25 | } 26 | 27 | 28 | public function Events(): DataList 29 | { 30 | if ($this->ComingOrPastEvents() === 'past') { 31 | return $this->PastEvents(); 32 | } 33 | 34 | return $this->ComingEvents(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Calendars/EventCalendarExtension.php: -------------------------------------------------------------------------------- 1 | 'TitleDK\Calendar\Calendars\Calendar', 23 | ]; 24 | 25 | public function updateFrontEndFields(FieldList $fields): void 26 | { 27 | $calendarDropdown = DropdownField::create( 28 | 'CalendarID', 29 | 'Calendar', 30 | Calendar::get()->map('ID', 'Title'), 31 | ) 32 | ->setEmptyString('Choose calendar...'); 33 | 34 | $fields->push($calendarDropdown); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/1.6.1/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Adam Shaw 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Adam Shaw 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Title Web Solutions / Anselm Christophersen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /tests/Colors/ColorHelperTest.php: -------------------------------------------------------------------------------- 1 | helper = new ColorHelper(); 18 | } 19 | 20 | 21 | public function testLightBackgroundsForTextColor(): void 22 | { 23 | $this->assertEquals('#000', $this->helper->calculateTextcolor('#AABBCC')); 24 | $this->assertEquals('#000', $this->helper->calculateTextcolor('#FFFFFF')); 25 | $this->assertEquals('#000', $this->helper->calculateTextcolor('#808080')); 26 | } 27 | 28 | 29 | public function testDarkBackgroundsForTextColor(): void 30 | { 31 | $this->assertEquals('#fff', $this->helper->calculateTextcolor('#000000')); 32 | $this->assertEquals('#fff', $this->helper->calculateTextcolor('#444444')); 33 | $this->assertEquals('#fff', $this->helper->calculateTextcolor('#7F7F7F')); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lang/en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | CalendarAdmin: 3 | CALENDAR_PERMISSION_CATEGORY: 'Calendar' 4 | CALENDAR_MANAGE: 'Manage calendars' 5 | EVENTCATEGORY_MANAGE: 'Manage event categories' 6 | EVENT_MANAGE: 'Manage events' 7 | Event: 8 | SINGULARNAME: 'Event' 9 | PLURALNAME: 'Events' 10 | COMING_EVENT_SINGULAR: 'Coming event' 11 | COMING_EVENT_PLURAL: 'Coming events' 12 | PAST_EVENT_SINGULAR: 'Past event' 13 | PAST_EVENT_PLURAL: 'Past events' 14 | Title: 'Title' 15 | AllDay: 'All day' 16 | NoEnd: 'No end' 17 | StartDateTime: 'Start Date and Time' 18 | StartDate: 'Start date' 19 | StartDateSpec: 'Start date in format {dateformat}' 20 | StartTime: 'Start time' 21 | EndDate: 'End date' 22 | EndDateSpec: 'End date in format {dateformat}' 23 | EndTime: 'End time' 24 | TimeFrameType: 'Time frame type' 25 | Duration: 'Duration' 26 | EndDateTime: 'End date time' 27 | Details: 'Details' 28 | CalendarTitle: 'Calendar title' 29 | CategoryTitles: 'Category titles' 30 | EventCategory: 31 | SINGULARNAME: 'Category' 32 | PLURALNAME: 'Categories' 33 | Calendar: 34 | SINGULARNAME: 'Calendar' 35 | PLURALNAME: 'Calendars' 36 | Title: 'Title' -------------------------------------------------------------------------------- /tests/DateTime/DateTimeHelperTraitTest.php: -------------------------------------------------------------------------------- 1 | now = Carbon::create(2018, 5, 16, 8, 20); 20 | Carbon::setTestNow($this->now); 21 | } 22 | 23 | 24 | public function testCarbonDateTime(): void 25 | { 26 | $carbon = $this->carbonDateTime('2018-05-21 13:04:00'); 27 | $this->assertEquals('2018', $carbon->year); 28 | $this->assertEquals('05', $carbon->month); 29 | $this->assertEquals('21', $carbon->day); 30 | $this->assertEquals('13', $carbon->hour); 31 | $this->assertEquals('04', $carbon->minute); 32 | $this->assertEquals('00', $carbon->second); 33 | } 34 | 35 | 36 | public function testGetSSDateTimeFromCarbon(): void 37 | { 38 | $this->assertEquals('2018-05-16 08:20:00', $this->getSSDateTimeFromCarbon($this->now)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/Tags/EventTagTest.php: -------------------------------------------------------------------------------- 1 | objFromFixture(EventTag::class, 'tag1'); 15 | 16 | # This will have been converted during the save whilst saving the fixtures file 17 | // @todo The -1 does not look correc there 18 | $this->assertEquals('cumberland-sausages-1', $tag->Slug); 19 | } 20 | 21 | 22 | public function testGetTagUrlSegmentDuplicateTitle(): void 23 | { 24 | # Duplicate titles are saved with a segment of -1, -2 etc 25 | $this->assertEquals( 26 | 'beans-1', 27 | $this->objFromFixture(EventTag::class, 'tag3')->Slug 28 | ); 29 | $this->assertEquals( 30 | 'beans-2', 31 | $this->objFromFixture(EventTag::class, 'tag4')->Slug 32 | ); 33 | $this->assertEquals( 34 | 'beans-3', 35 | $this->objFromFixture(EventTag::class, 'tag5')->Slug 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/en-ca.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}});return a}(),a.fullCalendar.lang("en-ca")}); -------------------------------------------------------------------------------- /_config/testing.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Name: test-calendar 3 | Only: 4 | #@todo Figure out how to run phpunit in test mode. It is defaulting to dev mode. Dev is enabled here temporarily 5 | #in order to test extensions 6 | environment: dev 7 | --- 8 | 9 | #enable all extensions for testing purposes 10 | TitleDK\Calendar\Events\Event: 11 | extensions: 12 | - TitleDK\Calendar\Events\EventImageExtension 13 | - TitleDK\Calendar\Events\EventLocationExtension 14 | - TitleDK\Calendar\Registrations\EventRegistrationExtension 15 | - TitleDK\Calendar\Categories\EventCategoryExtension 16 | - TitleDK\Calendar\Events\EventRegistrationEmbargoExtension 17 | 18 | # 19 | #src/SubSites/EventCategorySubsiteExtension.php 20 | #src/Calendars/ShadedCalendarExtension.php 21 | #src/Calendars/GroupsCalendarExtension.php 22 | 23 | TitleDK\Calendar\Registrations\EventRegistration: 24 | extensions: 25 | - TitleDK\Calendar\Registrations\AttendeesExtension 26 | - TitleDK\Calendar\Events\EventRegistrationEmbargoExtension 27 | 28 | TitleDK\Calendar\Calendars\Calendar: 29 | extensions: 30 | - TitleDK\Calendar\Colors\CalendarColorExtension 31 | 32 | TitleDK\Calendar\Registrations\EventRegistrationController: 33 | extensions: 34 | - TitleDK\Calendar\Registrations\Controller\AttendeesControllerExtension 35 | -------------------------------------------------------------------------------- /templates/Includes/EventDetail.ss: -------------------------------------------------------------------------------- 1 | <% include CalendarPageMenu %> 2 |
3 | <% with Event %> 4 |
5 |
6 | <% if $Calendar %> 7 | <% with $Calendar %> 8 | 9 | <% end_with %> 10 | <% end_if %> 11 |
12 |
13 | $StartDateTime.DayOfMonth 14 | $StartDateTime.Format('F, Y') 15 |
16 |
17 |

$Title

18 |
19 | <% if $StartAndEndDates %> 20 | $StartAndEndDates 21 | <% else %> 22 | <% if $AllDay %> 23 | All Day 24 | <% else %> 25 | $FormattedTimeframe 26 | <% end_if %> 27 | <% end_if %> 28 |
29 | <% if $EventPage %> 30 | <% with $EventPage %> 31 | Go to the $Title page 32 | <% end_with %> 33 | <% end_if %> 34 |
35 |
36 | $Details 37 | <% end_with %> 38 |
39 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/en-ie.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}});return a}(),a.fullCalendar.lang("en-ie")}); -------------------------------------------------------------------------------- /thirdparty/timepicker/jquery.timepicker.css: -------------------------------------------------------------------------------- 1 | .ui-timepicker-list { 2 | overflow-y: auto; 3 | height: 150px; 4 | width: 6.5em; 5 | background: #fff; 6 | border: 1px solid #ddd; 7 | margin: 0; 8 | padding: 0; 9 | list-style: none; 10 | -webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2); 11 | -moz-box-shadow:0 5px 10px rgba(0,0,0,0.2); 12 | box-shadow:0 5px 10px rgba(0,0,0,0.2); 13 | outline: none; 14 | z-index: 10001; 15 | } 16 | 17 | .ui-timepicker-list.ui-timepicker-with-duration { 18 | width: 11em; 19 | } 20 | 21 | .ui-timepicker-duration { 22 | margin-left: 5px; color: #888; 23 | } 24 | 25 | .ui-timepicker-list:hover .ui-timepicker-duration { 26 | color: #888; 27 | } 28 | 29 | .ui-timepicker-list li { 30 | padding: 3px 0 3px 5px; 31 | cursor: pointer; 32 | white-space: nowrap; 33 | color: #000; 34 | list-style: none; 35 | margin: 0; 36 | } 37 | 38 | .ui-timepicker-list:hover .ui-timepicker-selected { 39 | background: #fff; color: #000; 40 | } 41 | 42 | li.ui-timepicker-selected, 43 | .ui-timepicker-list li:hover, 44 | .ui-timepicker-list:hover .ui-timepicker-selected:hover { 45 | background: #1980EC; color: #fff; 46 | } 47 | 48 | li.ui-timepicker-selected .ui-timepicker-duration, 49 | .ui-timepicker-list li:hover .ui-timepicker-duration { 50 | color: #ccc; 51 | } 52 | -------------------------------------------------------------------------------- /src/Registrations/Attendee.php: -------------------------------------------------------------------------------- 1 | Registrations() 19 | */ 20 | class Attendee extends DataObject 21 | { 22 | /** @var string */ 23 | private static $table_name = 'Attendee'; 24 | 25 | /** @var array */ 26 | private static $db = [ 27 | 'Title' => 'Varchar(255)', 28 | 'FirstName' => 'Varchar(255)', 29 | 'Surname' => 'Varchar(255)', 30 | 'Company' => 'Varchar(255)', 31 | 'Phone' => 'Varchar(255)', 32 | 'Email' => 'Varchar(255)', 33 | ]; 34 | 35 | /** @var array */ 36 | private static $summary_fields = [ 37 | 'Title', 'FirstName', 'Surname', 'Company', 'Phone', 'Email', 38 | ]; 39 | 40 | /** @var array */ 41 | private static $many_many = [ 42 | 'Registrations' => EventRegistration::class, 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /javascript/admin/CalendarAdmin.js: -------------------------------------------------------------------------------- 1 | /*jslint white: true */ 2 | (function($) { 3 | $(document).ready(function () { 4 | $.entwine(function ($) { 5 | $('#Form_ItemEditForm_AllDay').entwine({ 6 | onmatch: function (e) { 7 | updateStatus(); 8 | this._super(); 9 | }, 10 | onchange: function (e) { 11 | updateStatus(); 12 | this._super(); 13 | } 14 | }); 15 | }); 16 | 17 | function updateStatus() { 18 | var allDay = $('#Form_ItemEditForm_AllDay').is(":checked"); 19 | console.log('all day', allDay); 20 | if (allDay == true) { 21 | console.log('all day is yes'); 22 | $('#Form_ItemEditForm_Duration_Holder').hide(); 23 | $('#Form_ItemEditForm_TimeFrameType_1').hide(); 24 | $('#Form_ItemEditForm_TimeFrameType_1').parent().hide(); 25 | $("#Form_ItemEditForm_TimeFrameType_2").prop("checked", true); 26 | } else { 27 | $('#Form_ItemEditForm_Duration_Holder').show(); 28 | $('#Form_ItemEditForm_TimeFrameType_1').show(); 29 | $('#Form_ItemEditForm_TimeFrameType_1').parent().show(); 30 | } 31 | } 32 | }) 33 | })(jQuery); 34 | 35 | -------------------------------------------------------------------------------- /thirdparty/colorpicker/jquery.colourPicker.css: -------------------------------------------------------------------------------- 1 | #jquery-colour-picker { 2 | background: #fafafa; 3 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee)); 4 | 5 | width: 180px; 6 | padding: 10px 5px 5px 10px; 7 | 8 | border: 1px solid #666; 9 | 10 | -moz-border-radius: 10px; 11 | -webkit-border-radius: 10px; 12 | border-radius: 10px; 13 | 14 | -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3); 15 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3); 16 | box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3); 17 | 18 | z-index: 999; 19 | } 20 | 21 | #jquery-colour-picker h2 { 22 | margin: 0 0 5px 0; 23 | font-size: 14px; 24 | } 25 | 26 | #jquery-colour-picker ul { 27 | margin: 0; 28 | padding: 0; 29 | list-style-type: none; 30 | 31 | +zoom: 1; 32 | } 33 | 34 | #jquery-colour-picker ul:after { 35 | content: "."; 36 | display: block; 37 | height: 0; 38 | visibility: hidden; 39 | clear: both; 40 | } 41 | 42 | #jquery-colour-picker ul li { 43 | float: left; 44 | margin: 0 5px 5px 0; 45 | list-style: none; 46 | } 47 | 48 | #jquery-colour-picker ul li a { 49 | display: block; 50 | 51 | width: 13px; 52 | height: 13px; 53 | 54 | text-decoration: none; 55 | text-indent: -100000px; 56 | outline: 0; 57 | 58 | border: 1px solid #aaa; 59 | } 60 | 61 | #jquery-colour-picker ul li a:hover { 62 | border-color: #000; 63 | } -------------------------------------------------------------------------------- /src/Events/EventImageExtension.php: -------------------------------------------------------------------------------- 1 | Image::class, 23 | ]; 24 | 25 | private static $summary_fields = ['Thumbnail']; 26 | 27 | public function updateCMSFields(FieldList $fields): void 28 | { 29 | $uploadField = new UploadField('FeaturedImage', 'Featured Image'); 30 | $uploadField->setAllowedFileCategories('image'); 31 | $uploadField->setFolderName('events'); 32 | $fields->addFieldToTab('Root.Main', $uploadField); 33 | } 34 | 35 | 36 | /** @return \SilverStripe\Assets\Storage\AssetContainer|string */ 37 | public function getThumbnail() 38 | { 39 | $image = $this->owner->FeaturedImage(); 40 | 41 | return $image->ID > 0 42 | ? $image->Fit(80, 80) 43 | : '(No Image)'; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Events/EventLocationExtension.php: -------------------------------------------------------------------------------- 1 | 'Varchar(255)', 24 | 'MapURL' => 'Varchar(255)', 25 | ]; 26 | 27 | public function updateCMSFields(FieldList $fields): void 28 | { 29 | $uploadField = new UploadField('FeaturedImage', 'Featured Image'); 30 | $uploadField->setAllowedFileCategories('image'); 31 | $uploadField->setFolderName('events'); 32 | $fields->addFieldToTab('Root.Main', $uploadField); 33 | 34 | $fields->addFieldToTab('Root.Location', new TextField('LocationName', 'Name of Location')); 35 | $mapField = new TextField('MapURL', 'External Map URL'); 36 | $mapField->setRightTitle('Map will open in a new window or relevant mobile phone app'); 37 | $fields->addFieldToTab('Root.Location', $mapField); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/Registrations/EventRegistrationTest.php: -------------------------------------------------------------------------------- 1 | conference = $this->objFromFixture(Event::class, 'conference'); 21 | } 22 | 23 | 24 | public function testGetFrontEndFields(): void 25 | { 26 | $fields = $this->conference->getFrontEndFields()->toArray(); 27 | $names = \array_map(static function ($field) { 28 | return $field->Name; 29 | }, $fields); 30 | $this->assertEquals(['Title', 'AllDay', 'StartDateTime', 'TimeFrameHeader', 'TimeFrameType', 'Clear', 31 | 'CalendarID'], $names); 32 | } 33 | 34 | 35 | public function testGetRegistrationCode(): void 36 | { 37 | // $this->generateFixtures(); 38 | $registration = $this->objFromFixture(EventRegistration::class, 'registration10'); 39 | $id = $registration->ID; 40 | $this->assertEquals('EXAMPLE-CONFERENCE-1-00' . $id, $registration->getRegistrationCode()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Registrations/AttendeesExtension.php: -------------------------------------------------------------------------------- 1 | Attendees() 20 | */ 21 | class AttendeesExtension extends DataExtension 22 | { 23 | private static $belongs_many_many = [ 24 | 'Attendees' => Attendee::class, 25 | ]; 26 | 27 | // @todo This will need fixed 28 | private static $summary_fields = ['Title', 'AttendeeName', 'FirstName', 'Surname', 'Phone', 'Email']; 29 | 30 | 31 | public function updateCMSFields(FieldList $fields): void 32 | { 33 | 34 | $gridField = GridField::create( 35 | 'Attendees', 36 | 'Attendees', 37 | $this->owner->Attendees(), 38 | ); 39 | 40 | //, 'NumberOfTickets' ); 41 | $fields->addFieldToTab('Root.Attendees', $gridField); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Categories/EventCategory.php: -------------------------------------------------------------------------------- 1 | Events() 16 | */ 17 | class EventCategory extends DataObject 18 | { 19 | 20 | private static $table_name = 'EventCategory'; 21 | 22 | private static $singular_name = 'Category'; 23 | private static $plural_name = 'Categories'; 24 | 25 | private static $db = [ 26 | 'Title' => 'Varchar', 27 | ]; 28 | 29 | private static $many_many = [ 30 | 'Events' => 'TitleDK\Calendar\Events\Event', 31 | ]; 32 | 33 | private static $default_sort = 'Title'; 34 | 35 | 36 | public function getAddNewFields(): FieldList 37 | { 38 | $fields = FieldList::create( 39 | TextField::create('Title'), 40 | ); 41 | 42 | $this->extend('updateAddNewFields', $fields); 43 | 44 | return $fields; 45 | } 46 | 47 | 48 | public function getCMSFields(): FieldList 49 | { 50 | $fields = parent::getCMSFields(); 51 | 52 | //Events shouldn't be editable from here by default 53 | $fields->removeByName('Events'); 54 | 55 | return $fields; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Admin/Forms/CategoriesForm.php: -------------------------------------------------------------------------------- 1 | get(EventCategory::class, 'enabled')) { 31 | return; 32 | } 33 | 34 | $gridCategoryConfig = GridFieldConfig_RecordEditor::create(); 35 | $GridFieldCategories = new GridField( 36 | 'Categories', 37 | '', 38 | PublicEventCategory::get(), 39 | $gridCategoryConfig, 40 | ); 41 | 42 | 43 | $fields = new FieldList( 44 | $GridFieldCategories, 45 | ); 46 | $actions = new FieldList(); 47 | $this->addExtraClass('CategoriesForm'); 48 | 49 | parent::__construct($controller, $name, $fields, $actions); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Categories/EventCategoryExtention.php: -------------------------------------------------------------------------------- 1 | Categories() 16 | */ 17 | class EventCategoryExtension extends DataExtension 18 | { 19 | 20 | private static $belongs_many_many = [ 21 | 'Categories' => EventCategory::class, 22 | ]; 23 | 24 | 25 | public function updateCMSFields(FieldList $fields): void 26 | { 27 | $categories = static function () { 28 | //TODO: This should only be the case for public events 29 | return PublicEventCategory::get()->map()->toArray(); 30 | }; 31 | $categoriesField = CheckboxSetField::create('Categories', 'Categories') 32 | ->setSource($categories()); 33 | 34 | //If the quickaddnew module is installed, use it to allow 35 | //for easy adding of categories 36 | if (\class_exists('QuickAddNewExtension')) { 37 | $categoriesField->useAddNew('PublicEventCategory', $categories); 38 | } 39 | 40 | $fields->addFieldToTab('Root.Main', $categoriesField); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Registrations/Helper/EventRegistrationTicketsHelper.php: -------------------------------------------------------------------------------- 1 | event = $event; 20 | } 21 | 22 | 23 | /** 24 | * Ascertain the number of tickets remaining 25 | * 26 | * @return int the number of tickets remaining 27 | */ 28 | public function numberOfTicketsRemaining(): int 29 | { 30 | //$sql = "SELECT SUM('NumberOfTickets')"; 31 | $used = $this->numberOfTicketsNotAvailable(); 32 | 33 | return $this->event->NumberOfAvailableTickets - $used; 34 | } 35 | 36 | 37 | /** 38 | * Get the number of tickets freely available (ie not being processed) 39 | * 40 | * @param $registrations 41 | */ 42 | public function numberOfTicketsNotAvailable(): int 43 | { 44 | $nTickets = 0; 45 | $registrations = $this->event->Registrations(); 46 | foreach ($registrations as $reg) { 47 | if ($reg->Status === 'Available') { 48 | continue; 49 | } 50 | 51 | $nTickets += $reg->NumberOfTickets; 52 | } 53 | 54 | return $nTickets; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [Unreleased](https://github.com/gordonbanderson/silverstripe-calendar/tree/HEAD) 4 | 5 | [Full Changelog](https://github.com/gordonbanderson/silverstripe-calendar/compare/1.1.0...HEAD) 6 | 7 | **Closed issues:** 8 | 9 | - Fix Rendering in the Simple Theme [\#22](https://github.com/gordonbanderson/silverstripe-calendar/issues/22) 10 | - Calendar Renders With a ScrollBar [\#21](https://github.com/gordonbanderson/silverstripe-calendar/issues/21) 11 | - Upcoming and Recent Methods in Calendar Page Controller Broken [\#16](https://github.com/gordonbanderson/silverstripe-calendar/issues/16) 12 | - Calendar Helper Does Not Pickup Events Starting in Last Day of Month [\#10](https://github.com/gordonbanderson/silverstripe-calendar/issues/10) 13 | 14 | **Merged pull requests:** 15 | 16 | - Scrutinizer Auto-Fixes [\#1](https://github.com/gordonbanderson/silverstripe-calendar/pull/1) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) 17 | 18 | ## [1.1.0](https://github.com/gordonbanderson/silverstripe-calendar/tree/1.1.0) (2015-10-21) 19 | [Full Changelog](https://github.com/gordonbanderson/silverstripe-calendar/compare/1.0.1...1.1.0) 20 | 21 | ## [1.0.1](https://github.com/gordonbanderson/silverstripe-calendar/tree/1.0.1) (2015-10-01) 22 | [Full Changelog](https://github.com/gordonbanderson/silverstripe-calendar/compare/1.0.0...1.0.1) 23 | 24 | ## [1.0.0](https://github.com/gordonbanderson/silverstripe-calendar/tree/1.0.0) (2014-11-15) 25 | 26 | 27 | \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* -------------------------------------------------------------------------------- /tests/PageTypes/CalendarPageTest.php: -------------------------------------------------------------------------------- 1 | assertTrue($calendarPage->isCalendar()); 15 | } 16 | 17 | 18 | public function testGetCMSFields(): void 19 | { 20 | $calendar = Calendar::create(); 21 | $calendar->write(); 22 | $calendarPage = CalendarPage::create(); 23 | $calendarPage->Calendars()->add($calendar); 24 | $fields = $calendarPage->getCMSFields(); 25 | /** @var \SilverStripe\Forms\TabSet $rootTab */ 26 | $rootTab = $fields->fieldByName('Root'); 27 | 28 | /** @var \SilverStripe\Forms\Tab $mainTab */ 29 | $mainTab = $rootTab->fieldByName('Main'); 30 | $fields = $mainTab->FieldList(); 31 | 32 | // This is present for PostgresSQL on Travis only 33 | $fields->removeByName('InstallWarningHeader'); 34 | 35 | $names = \array_map( 36 | static function ($field) { 37 | return $field->Name; 38 | }, 39 | $fields->toArray(), 40 | ); 41 | $this->assertEquals([ 42 | 'Title', 43 | 'URLSegment', 44 | 'MenuTitle', 45 | 'Calendars', 46 | 'Content', 47 | 'Metadata', 48 | ], $names); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/ko.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",LTS:"A h시 m분 s초",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h시 m분",LLLL:"YYYY년 MMMM D일 dddd A h시 m분"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"일분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},ordinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(a){return"오후"===a},meridiem:function(a,b,c){return 12>a?"오전":"오후"}});return a}(),a.fullCalendar.datepickerLang("ko","ko",{closeText:"닫기",prevText:"이전달",nextText:"다음달",currentText:"오늘",monthNames:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthNamesShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayNames:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],dayNamesShort:["일","월","화","수","목","금","토"],dayNamesMin:["일","월","화","수","목","금","토"],weekHeader:"Wk",dateFormat:"yy-mm-dd",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"년"}),a.fullCalendar.lang("ko",{buttonText:{month:"월",week:"주",day:"일",list:"일정목록"},allDayText:"종일",eventLimitText:"개"})}); -------------------------------------------------------------------------------- /templates/Includes/EventListEvents.ss: -------------------------------------------------------------------------------- 1 | <% loop $Events %> 2 |
3 |
4 | <% if $Calendar %> 5 | <% with $Calendar %> 6 | 7 | <% end_with %> 8 | <% end_if %> 9 |
10 |
11 | $StartDateTime.DayOfMonth 12 | $StartDateTime.Format('F, Y') 13 |
14 |
15 |

$Title

16 |
17 | <% if StartAndEndDates %> 18 | $StartAndEndDates 19 | <% else %> 20 | <% if AllDay %> 21 | All Day 22 | <% else %> 23 | $FormattedTimeframe 24 | <% end_if %> 25 | <% end_if %> 26 |
27 |
$DetailsSummary
28 | <% if $Registerable %> 29 | <% if not $IsPastEvent %> 30 | Register 31 | <% else %> 32 | Registration now closed 33 | <% end_if %> 34 | Read More 35 | <% else %> 36 | Read More 37 | <% end_if %> 38 |
39 |
40 | <% end_loop %> 41 | 42 | <% if $Events && $Events.NextLink %> 43 | 46 | <% end_if %> 47 | 48 | -------------------------------------------------------------------------------- /tests/Registrations/AttendeesExtensionTest.php: -------------------------------------------------------------------------------- 1 | getCMSFields(); 17 | 18 | /** @var \SilverStripe\Forms\TabSet $rootTab */ 19 | $rootTab = $fields->fieldByName('Root'); 20 | 21 | /** @var \SilverStripe\Forms\Tab $mainTab */ 22 | $mainTab = $rootTab->fieldByName('Main'); 23 | $fields = $mainTab->FieldList()->toArray(); 24 | 25 | $names = \array_map(static function ($field) { 26 | return $field->Name; 27 | }, $fields); 28 | 29 | 30 | $this->assertEquals([ 31 | 'Name', 32 | 'PayersName', 33 | 'Email', 34 | 'Status', 35 | 'NumberOfTickets', 36 | 'AmountPaid', 37 | 'Notes', 38 | 'EventID', 39 | 'RegistrationEmbargoAt', 40 | ], $names); 41 | 42 | $attendeesTab = $rootTab->fieldByName('Attendees'); 43 | $fields = $attendeesTab->FieldList()->toArray(); 44 | 45 | $names = \array_map(static function ($field) { 46 | return $field->Name; 47 | }, $fields); 48 | 49 | 50 | $this->assertEquals([ 51 | 'Attendees', 52 | ], $names); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/ja.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"Ah時m分s秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah時m分",LLLL:"YYYY年M月D日Ah時m分 dddd"},meridiemParse:/午前|午後/i,isPM:function(a){return"午後"===a},meridiem:function(a,b,c){return 12>a?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},ordinalParse:/\d{1,2}日/,ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"日";default:return a}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return a}(),a.fullCalendar.datepickerLang("ja","ja",{closeText:"閉じる",prevText:"<前",nextText:"次>",currentText:"今日",monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthNamesShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],dayNamesShort:["日","月","火","水","木","金","土"],dayNamesMin:["日","月","火","水","木","金","土"],weekHeader:"週",dateFormat:"yy/mm/dd",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"}),a.fullCalendar.lang("ja",{buttonText:{month:"月",week:"週",day:"日",list:"予定リスト"},allDayText:"終日",eventLimitText:function(a){return"他 "+a+" 件"}})}); -------------------------------------------------------------------------------- /scss/admin/CalendarEventGridFieldDetailForm.scss: -------------------------------------------------------------------------------- 1 | @import "mixins"; 2 | 3 | 4 | .CalendarEventGridfieldDetailForm { 5 | .field { 6 | border:none; 7 | box-shadow:none; 8 | padding:0px; 9 | } 10 | 11 | input { 12 | @include input-placeholder { 13 | color: #bfbfbf; 14 | font-style: italic; 15 | } 16 | } 17 | 18 | .middleColumn { 19 | margin-left:100px; 20 | } 21 | label.left { 22 | width:85px; 23 | } 24 | 25 | 26 | #Form_ItemEditForm_AllDay_Holder, 27 | #Form_ItemEditForm_NoEnd_Holder { 28 | float:left; 29 | padding-left:10px; 30 | padding-top:5px; 31 | padding-bottom:0px; 32 | input { 33 | min-height:10px; 34 | } 35 | } 36 | #Form_ItemEditForm_StartDateTime_Holder { 37 | float:left; 38 | clear:both; 39 | } 40 | 41 | 42 | #Form_ItemEditForm_StartDateTime_Holder, 43 | #Form_ItemEditForm_EndDateTime_Holder { 44 | .middleColumn { 45 | width:auto; 46 | margin-right:10px; 47 | } 48 | input { 49 | width:110px; 50 | 51 | //styling the readonly field 52 | cursor:pointer; 53 | } 54 | } 55 | 56 | h5#Form_ItemEditForm_TimeFrameHeader { 57 | margin-bottom:12px; 58 | clear:both; 59 | } 60 | 61 | ul.selectiongroup { 62 | @include clearfix; 63 | margin:0px; 64 | 65 | li { 66 | margin-bottom:10px; 67 | div.field { 68 | margin:0px; 69 | } 70 | >label { 71 | width:auto; 72 | float:left; 73 | } 74 | } 75 | 76 | #Form_ItemEditForm_Duration_Holder { 77 | @include clearfix; 78 | margin-left:100px; 79 | label.right { 80 | margin:0px; 81 | margin-top:1px; 82 | } 83 | input { 84 | width:100px; 85 | } 86 | } 87 | 88 | } 89 | 90 | .clear { 91 | clear:both; 92 | } 93 | 94 | #Form_ItemEditForm_CalendarID_Holder { 95 | margin-top:15px; 96 | width:350px; 97 | } 98 | } -------------------------------------------------------------------------------- /src/Events/EventRegistrationEmbargoExtension.php: -------------------------------------------------------------------------------- 1 | DBDatetime::class, 25 | ]; 26 | 27 | private static $summary_fields = [ 28 | 'RegistrationEmbargoAt' => 'Embargo Registration At', 29 | ]; 30 | 31 | public function updateCMSFields(FieldList $fields): void 32 | { 33 | $relativeTimeEmbargo = $this->owner->config()->get('embargo_registration_relative_to_end_datetime_mins'); 34 | 35 | $embargoField = new DatetimeField('RegistrationEmbargoAt'); 36 | 37 | $rightTitle = 'If this field is left blank, registration will be embargoed '; 38 | $rightTitle .= $relativeTimeEmbargo < 0 39 | ? 'before' 40 | : 'after'; 41 | $rightTitle .= $relativeTimeEmbargo . ' minutes relative to the end datetime of the event'; 42 | $embargoField->setRightTitle($rightTitle); 43 | $fields->addFieldToTab( 44 | 'Root.Main', 45 | $embargoField, 46 | 'CalendarID' 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /thirdparty/colorpicker/jquery.colourPicker.min.js: -------------------------------------------------------------------------------- 1 | jQuery.fn.colourPicker=function(conf){var config=jQuery.extend({id:'jquery-colour-picker',ico:'ico.gif',title:'Pick a colour',inputBG:true,speed:500,openTxt:'Open colour picker'},conf);var hexInvert=function(hex){var r=hex.substr(0,2);var g=hex.substr(2,2);var b=hex.substr(4,2);return 0.212671*r+0.715160*g+0.072169*b<0.5?'ffffff':'000000'};var colourPicker=jQuery('#'+config.id);if(!colourPicker.length){colourPicker=jQuery('
').appendTo(document.body).hide();jQuery(document.body).click(function(event){if(!(jQuery(event.target).is('#'+config.id)||jQuery(event.target).parents('#'+config.id).length)){colourPicker.hide(config.speed)}})}return this.each(function(){var select=jQuery(this);var icon=jQuery(''+config.openTxt+'').insertAfter(select);var input=jQuery('').insertAfter(select);var loc='';jQuery('option',select).each(function(){var option=jQuery(this);var hex=option.val();var title=option.text();loc+='
  • '+title+'
  • '});select.remove();if(config.inputBG){input.change(function(){input.css({background:'#'+input.val(),color:'#'+hexInvert(input.val())})});input.change()}icon.click(function(){var iconPos=icon.offset();var heading=config.title?'

    '+config.title+'

    ':'';colourPicker.html(heading+'
      '+loc+'
    ').css({position:'absolute',left:iconPos.left+'px',top:iconPos.top+'px'}).show(config.speed);jQuery('a',colourPicker).click(function(){var hex=jQuery(this).attr('rel');input.val(hex);if(config.inputBG){input.css({background:'#'+hex,color:'#'+hexInvert(hex)})}input.change();colourPicker.hide(config.speed);return false});return false})})}; -------------------------------------------------------------------------------- /tests/Registrations/EventRegistrationFormTest.php: -------------------------------------------------------------------------------- 1 | Fields()->toArray(); 15 | $names = \array_map(static function ($field) { 16 | return $field->Name; 17 | }, $fields); 18 | $this->assertEquals(['Name', 'Email', 'EventID', 'SecurityID'], $names); 19 | } 20 | 21 | 22 | public function testSetDone(): void 23 | { 24 | $form = EventRegistrationForm::create(EventRegistrationController::create(), 'eventFormTest'); 25 | $form->setDone(); 26 | $fields = $form->Fields()->toArray(); 27 | $names = \array_map(static function ($field) { 28 | return $field->Name; 29 | }, $fields); 30 | $this->assertEquals(['CompleteMsg', 'SecurityID'], $names); 31 | } 32 | 33 | 34 | public function testDoRegister(): void 35 | { 36 | $this->markTestSkipped('TODO'); 37 | } 38 | 39 | 40 | public function testSetFormField(): void 41 | { 42 | $form = EventRegistrationForm::create(EventRegistrationController::create(), 'eventFormTest'); 43 | $form->setFormField('Email', 'fred@fred.com'); 44 | 45 | /** @var \SilverStripe\Forms\FieldList $fields */ 46 | $fields = $form->Fields(); 47 | $emailField = $fields->fieldByName('Email'); 48 | $this->assertEquals('fred@fred.com', $emailField->Value()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/ar-ma.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});return a}(),a.fullCalendar.datepickerLang("ar-ma","ar",{closeText:"إغلاق",prevText:"<السابق",nextText:"التالي>",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("ar-ma",{buttonText:{month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},allDayText:"اليوم كله",eventLimitText:"أخرى"})}); -------------------------------------------------------------------------------- /tests/Events/EventImageExtensionTest.php: -------------------------------------------------------------------------------- 1 | objFromFixture(Event::class, 'eventCricketSeason'); 19 | $fields = $event->getCMSFields(); 20 | $rootTab = $fields->fieldByName('Root'); 21 | /** @var \TitleDK\Calendar\Tests\Events\Tab $mainTab */ 22 | $mainTab = $rootTab->fieldByName('Main'); 23 | $fields = $mainTab->FieldList(); 24 | $imageField = $fields->fieldByName('FeaturedImage'); 25 | $this->assertNotNull($imageField); 26 | } 27 | 28 | 29 | public function testGetThumbnailNoImage(): void 30 | { 31 | $event = $this->objFromFixture(Event::class, 'eventCricketSeason'); 32 | $event->setField('FeaturedImage', null); 33 | $this->assertEquals('(No Image)', $event->getThumbnail()); 34 | } 35 | 36 | // @todo Not sure how to write a unit test involving asset Files 37 | 38 | public function testGetThumbnailAnEmptyFileImage(): void 39 | { 40 | $event = $this->objFromFixture(Event::class, 'eventCricketSeason'); 41 | 42 | /** @var \SilverStripe\Assets\Image $image */ 43 | $image = Image::create(); 44 | $image->write(); 45 | $event->FeaturedImageID = $image->ID; 46 | 47 | // there is no file associated with the image, as such the rendering will be null 48 | $this->assertNull($event->getThumbnail()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/ar-tn.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("ar-tn","ar",{closeText:"إغلاق",prevText:"<السابق",nextText:"التالي>",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("ar-tn",{buttonText:{month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},allDayText:"اليوم كله",eventLimitText:"أخرى"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/en-gb.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("en-gb","en-GB",{closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("en-gb")}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/da.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY HH:mm"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("da","da",{closeText:"Luk",prevText:"<Forrige",nextText:"Næste>",currentText:"Idag",monthNames:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],dayNamesShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayNamesMin:["Sø","Ma","Ti","On","To","Fr","Lø"],weekHeader:"Uge",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("da",{buttonText:{month:"Måned",week:"Uge",day:"Dag",list:"Agenda"},allDayText:"Hele dagen",eventLimitText:"flere"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/en-au.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("en-au","en-AU",{closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("en-au")}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/en-nz.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("en-nz","en-NZ",{closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("en-nz")}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/nn.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("nn","nn",{closeText:"Lukk",prevText:"«Førre",nextText:"Neste»",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["sun","mån","tys","ons","tor","fre","lau"],dayNames:["sundag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],dayNamesMin:["su","må","ty","on","to","fr","la"],weekHeader:"Veke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("nn",{buttonText:{month:"Månad",week:"Veke",day:"Dag",list:"Agenda"},allDayText:"Heile dagen",eventLimitText:"til"})}); -------------------------------------------------------------------------------- /src/PageTypes/CalendarPage.php: -------------------------------------------------------------------------------- 1 | Calendars() 17 | */ 18 | class CalendarPage extends \Page 19 | { 20 | 21 | /** @var string */ 22 | private static $singular_name = 'Calendar Page'; 23 | 24 | /** @var string */ 25 | private static $description = 'Listing of events'; 26 | 27 | // for applying group restrictions 28 | private static $belongs_many_many = [ 29 | 'Calendars' => Calendar::class, 30 | ]; 31 | 32 | public function IsCalendar(): bool 33 | { 34 | return true; 35 | } 36 | 37 | 38 | public function getCMSFields(): \SilverStripe\Forms\FieldList 39 | { 40 | $fields = parent::getCMSFields(); 41 | 42 | $calendarsMap = []; 43 | foreach (Calendar::get() as $calendar) { 44 | // Listboxfield values are escaped, use ASCII char instead of » 45 | $calendarsMap[$calendar->ID] = $calendar->Title; 46 | } 47 | \asort($calendarsMap); 48 | 49 | $fields->addFieldToTab( 50 | 'Root.Main', 51 | ListboxField::create('Calendars', Calendar::singleton()->i18n_plural_name()) 52 | ->setSource($calendarsMap) 53 | ->setAttribute( 54 | 'data-placeholder', 55 | 'Select a calendar', 56 | ) 57 | ->setRightTitle('Only events from these calendars will shown on this page.'), 58 | 'Content', 59 | ); 60 | 61 | return $fields; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/nb.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("nb","nb",{closeText:"Lukk",prevText:"«Forrige",nextText:"Neste»",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["søn","man","tir","ons","tor","fre","lør"],dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesMin:["sø","ma","ti","on","to","fr","lø"],weekHeader:"Uke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("nb",{buttonText:{month:"Måned",week:"Uke",day:"Dag",list:"Agenda"},allDayText:"Hele dagen",eventLimitText:"til"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/sv.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}(e|a)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"e":1===b?"a":2===b?"a":"e";return a+c},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("sv","sv",{closeText:"Stäng",prevText:"«Förra",nextText:"Nästa»",currentText:"Idag",monthNames:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNamesShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayNames:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],dayNamesMin:["Sö","Må","Ti","On","To","Fr","Lö"],weekHeader:"Ve",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("sv",{buttonText:{month:"Månad",week:"Vecka",day:"Dag",list:"Program"},allDayText:"Heldag",eventLimitText:"till"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/zh-tw.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm分",LTS:"Ah點m分s秒",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah點mm分",LLLL:"YYYY年MMMD日ddddAh點mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah點mm分",llll:"YYYY年MMMD日ddddAh點mm分"},meridiemParse:/早上|上午|中午|下午|晚上/,meridiemHour:function(a,b){return 12===a&&(a=0),"早上"===b||"上午"===b?a:"中午"===b?a>=11?a:a+12:"下午"===b||"晚上"===b?a+12:void 0},meridiem:function(a,b,c){var d=100*a+b;return 900>d?"早上":1130>d?"上午":1230>d?"中午":1800>d?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinalParse:/\d{1,2}(日|月|週)/,ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"日";case"M":return a+"月";case"w":case"W":return a+"週";default:return a}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1分鐘",mm:"%d分鐘",h:"1小時",hh:"%d小時",d:"1天",dd:"%d天",M:"1個月",MM:"%d個月",y:"1年",yy:"%d年"}});return a}(),a.fullCalendar.datepickerLang("zh-tw","zh-TW",{closeText:"關閉",prevText:"<上月",nextText:"下月>",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy/mm/dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"}),a.fullCalendar.lang("zh-tw",{buttonText:{month:"月",week:"週",day:"天",list:"待辦事項"},allDayText:"全天",eventLimitText:"更多"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/fr-ca.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(a){return a+(1===a?"er":"e")}});return a}(),a.fullCalendar.datepickerLang("fr-ca","fr-CA",{closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"yy-mm-dd",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("fr-ca",{buttonText:{year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},allDayHtml:"Toute la
    journée",eventLimitText:"en plus"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/fr.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(a){return a+(1===a?"er":"")},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("fr","fr",{closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("fr",{buttonText:{year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},allDayHtml:"Toute la
    journée",eventLimitText:"en plus"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/fr-ch.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(a){return a+(1===a?"er":"e")},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("fr-ch","fr-CH",{closeText:"Fermer",prevText:"<Préc",nextText:"Suiv>",currentText:"Courant",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sm",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("fr-ch",{buttonText:{year:"Année",month:"Mois",week:"Semaine",day:"Jour",list:"Mon planning"},allDayHtml:"Toute la
    journée",eventLimitText:"en plus"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/pt.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("pt","pt",{closeText:"Fechar",prevText:"Anterior",nextText:"Seguinte",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],weekHeader:"Sem",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("pt",{buttonText:{month:"Mês",week:"Semana",day:"Dia",list:"Agenda"},allDayText:"Todo o dia",eventLimitText:"mais"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/ro.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";function a(a,b,c){var d={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},e=" ";return(a%100>=20||a>=100&&a%100===0)&&(e=" de "),a+e+d[c]}var c=(b.defineLocale||b.lang).call(b,"ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:a,h:"o oră",hh:a,d:"o zi",dd:a,M:"o lună",MM:a,y:"un an",yy:a},week:{dow:1,doy:7}});return c}(),a.fullCalendar.datepickerLang("ro","ro",{closeText:"Închide",prevText:"« Luna precedentă",nextText:"Luna următoare »",currentText:"Azi",monthNames:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],monthNamesShort:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"],dayNamesShort:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],dayNamesMin:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],weekHeader:"Săpt",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("ro",{buttonText:{prev:"precedentă",next:"următoare",month:"Lună",week:"Săptămână",day:"Zi",list:"Agendă"},allDayText:"Toată ziua",eventLimitText:function(a){return"+alte "+a}})}); -------------------------------------------------------------------------------- /tests/Registrations/PaymentRegistrationFormTest.php: -------------------------------------------------------------------------------- 1 | Fields()->toArray(); 15 | $names = \array_map(static function ($field) { 16 | return $field->Name; 17 | }, $fields); 18 | $this->assertEquals([ 19 | 'Name', 20 | 'PayersName', 21 | 'Email', 22 | 'NumberOfTickets', 23 | 'Notes', 24 | 'EventID', 25 | 'SecurityID', 26 | ], $names); 27 | } 28 | 29 | 30 | public function testSetDone(): void 31 | { 32 | $form = PaymentRegistrationForm::create(EventRegistrationController::create(), 'paymentFormTest'); 33 | $form->setDone(); 34 | $fields = $form->Fields()->toArray(); 35 | $names = \array_map(static function ($field) { 36 | return $field->Name; 37 | }, $fields); 38 | $this->assertEquals([ 39 | 'CompleteMsg', 40 | 'SecurityID', 41 | ], $names); 42 | } 43 | 44 | 45 | public function testDoRegister(): void 46 | { 47 | $this->markTestSkipped('TODO'); 48 | } 49 | 50 | 51 | public function testSetFormField(): void 52 | { 53 | $form = PaymentRegistrationForm::create(EventRegistrationController::create(), 'eventFormTest'); 54 | $form->setFormField('Email', 'fred@fred.com'); 55 | 56 | /** @var \TitleDK\Calendar\Tests\Registrations\FieldList $fields */ 57 | $fields = $form->Fields(); 58 | $emailField = $fields->fieldByName('Email'); 59 | $this->assertEquals('fred@fred.com', $emailField->Value()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/it.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"Do_Lu_Ma_Me_Gi_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(a){return(/^[0-9].+$/.test(a)?"tra":"in")+" "+a},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("it","it",{closeText:"Chiudi",prevText:"<Prec",nextText:"Succ>",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("it",{buttonText:{month:"Mese",week:"Settimana",day:"Giorno",list:"Agenda"},allDayHtml:"Tutto il
    giorno",eventLimitText:function(a){return"+altri "+a}})}); -------------------------------------------------------------------------------- /tests/Calendars/CalendarTest.php: -------------------------------------------------------------------------------- 1 | calendar = $this->objFromFixture(Calendar::class, 'testCalendar1'); 26 | $this->member = $this->objFromFixture(Member::class, 'member1'); 27 | $this->logInAs($this->member); 28 | } 29 | 30 | 31 | public function testGetCMSFields(): void 32 | { 33 | // this will contain the root tab 34 | $fields = $this->calendar->getCMSFields(); 35 | 36 | /** @var \TitleDK\Calendar\Tests\Calendars\TabSet $rootTab */ 37 | $rootTab = $fields->fieldByName('Root'); 38 | 39 | /** @var \TitleDK\Calendar\Tests\Calendars\Tab $mainTab */ 40 | $mainTab = $rootTab->fieldByName('Main'); 41 | $fields = $mainTab->FieldList()->toArray(); 42 | 43 | $titles = \array_map(static function ($field) { 44 | return $field->Name; 45 | }, $fields); 46 | 47 | $this->assertEquals([], array_diff(['Slug', 'Title', 'Color', 'Groups'], $titles)); 48 | } 49 | 50 | 51 | public function testCanView(): void 52 | { 53 | $this->assertTrue($this->calendar->canView()); 54 | } 55 | 56 | 57 | public function testCanCreate(): void 58 | { 59 | $this->assertFalse($this->calendar->canCreate()); 60 | } 61 | 62 | 63 | public function testCanEdit(): void 64 | { 65 | $this->assertFalse($this->calendar->canEdit()); 66 | } 67 | 68 | 69 | public function testCanDelete(): void 70 | { 71 | $this->assertFalse($this->calendar->canDelete()); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/id.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(a,b){return 12===a&&(a=0),"pagi"===b?a:"siang"===b?a>=11?a:a+12:"sore"===b||"malam"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"pagi":15>a?"siang":19>a?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return a}(),a.fullCalendar.datepickerLang("id","id",{closeText:"Tutup",prevText:"<mundur",nextText:"maju>",currentText:"hari ini",monthNames:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agus","Sep","Okt","Nop","Des"],dayNames:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],dayNamesShort:["Min","Sen","Sel","Rab","kam","Jum","Sab"],dayNamesMin:["Mg","Sn","Sl","Rb","Km","jm","Sb"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("id",{buttonText:{month:"Bulan",week:"Minggu",day:"Hari",list:"Agenda"},allDayHtml:"Sehari
    penuh",eventLimitText:"lebih"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/pt-br.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"});return a}(),a.fullCalendar.datepickerLang("pt-br","pt-BR",{closeText:"Fechar",prevText:"<Anterior",nextText:"Próximo>",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("pt-br",{buttonText:{month:"Mês",week:"Semana",day:"Dia",list:"Compromissos"},allDayText:"dia inteiro",eventLimitText:function(a){return"mais +"+a}})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/nl.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),c="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),d=(b.defineLocale||b.lang).call(b,"nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(b,d){return/-MMM-/.test(d)?c[b.month()]:a[b.month()]},monthsParseExact:!0,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,doy:4}});return d}(),a.fullCalendar.datepickerLang("nl","nl",{closeText:"Sluiten",prevText:"←",nextText:"→",currentText:"Vandaag",monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zon","maa","din","woe","don","vri","zat"],dayNamesMin:["zo","ma","di","wo","do","vr","za"],weekHeader:"Wk",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("nl",{buttonText:{month:"Maand",week:"Week",day:"Dag",list:"Agenda"},allDayText:"Hele dag",eventLimitText:"extra"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/eu.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return a}(),a.fullCalendar.datepickerLang("eu","eu",{closeText:"Egina",prevText:"<Aur",nextText:"Hur>",currentText:"Gaur",monthNames:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"],monthNamesShort:["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe."],dayNames:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],dayNamesShort:["ig.","al.","ar.","az.","og.","ol.","lr."],dayNamesMin:["ig","al","ar","az","og","ol","lr"],weekHeader:"As",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("eu",{buttonText:{month:"Hilabetea",week:"Astea",day:"Eguna",list:"Agenda"},allDayHtml:"Egun
    osoa",eventLimitText:"gehiago"})}); -------------------------------------------------------------------------------- /src/Categories/PublicEventCategory.php: -------------------------------------------------------------------------------- 1 | */ 22 | public function ComingEvents(string $from = null): DataList 23 | { 24 | return $this->Events() 25 | ->filter( 26 | [ 27 | 'StartDateTime:GreaterThan' => \date('Y-m-d', $from ? \strtotime($from) : \time()), 28 | ] 29 | ); 30 | } 31 | 32 | 33 | /** 34 | * @param Member $member 35 | * @return boolean 36 | */ 37 | public function canView($member = null) 38 | { 39 | return true; 40 | } 41 | 42 | 43 | /** 44 | * @param Member $member 45 | * @param array $context Additional context-specific data which might 46 | * affect whether (or where) this object could be created. 47 | * @return boolean 48 | */ 49 | public function canCreate($member = null, $context = []) 50 | { 51 | return $this->canManage($member); 52 | } 53 | 54 | 55 | /** 56 | * @param Member $member 57 | * @return boolean 58 | */ 59 | public function canEdit($member = null) 60 | { 61 | return $this->canManage($member); 62 | } 63 | 64 | 65 | /** 66 | * @param Member $member 67 | * @return boolean 68 | */ 69 | public function canDelete($member = null) 70 | { 71 | return $this->canManage($member); 72 | } 73 | 74 | 75 | protected function canManage(Member $member = null): bool 76 | { 77 | return Permission::check('ADMIN', 'any', $member) || Permission::check('EVENTCATEGORY_MANAGE', 'any', $member); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/th.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H นาฬิกา m นาที",LTS:"H นาฬิกา m นาที s วินาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H นาฬิกา m นาที",LLLL:"วันddddที่ D MMMM YYYY เวลา H นาฬิกา m นาที"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(a){return"หลังเที่ยง"===a},meridiem:function(a,b,c){return 12>a?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return a}(),a.fullCalendar.datepickerLang("th","th",{closeText:"ปิด",prevText:"« ย้อน",nextText:"ถัดไป »",currentText:"วันนี้",monthNames:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthNamesShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dayNames:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],dayNamesShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayNamesMin:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("th",{buttonText:{month:"เดือน",week:"สัปดาห์",day:"วัน",list:"แผนงาน"},allDayText:"ตลอดวัน",eventLimitText:"เพิ่มเติม"})}); -------------------------------------------------------------------------------- /tests/Helpers/ICSExportHelperTest.php: -------------------------------------------------------------------------------- 1 | member = $this->objFromFixture(Member::class, 'member1'); 28 | $this->calendar = $this->objFromFixture(Calendar::class, 'testCalendar1'); 29 | $this->helper = new ICSExportHelper(); 30 | } 31 | 32 | 33 | public function testProcessCalendar(): void 34 | { 35 | $this->logInAs($this->member); 36 | $this->helper->processCalendar($this->calendar); 37 | // @todo How best to test this - manually it imports into Lightning on Thunderbird 38 | } 39 | 40 | 41 | public function testGetString(): void 42 | { 43 | $this->logInAs($this->member); 44 | $ics = $this->helper->processCalendar($this->calendar); 45 | $this->assertEquals($ics, $this->helper->getString()); 46 | } 47 | 48 | 49 | public function testGetFile(): void 50 | { 51 | $this->logInAs($this->member); 52 | $this->helper->processCalendar($this->calendar); 53 | // $file = $this->helper->getFile('test.ics', false); 54 | $this->markAsRisky(); 55 | } 56 | 57 | 58 | /** @return array<\TitleDK\Calendar\Events\Event> */ 59 | private function createEventsArray(): array 60 | { 61 | $calendars = Calendar::get(); 62 | $events = ArrayList::create(); 63 | foreach ($calendars as $cal) { 64 | $events->merge($cal->Events()); 65 | } 66 | 67 | return $events->toNestedArray(); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/bg.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(a){var b=a%10,c=a%100;return 0===a?a+"-ев":0===c?a+"-ен":c>10&&20>c?a+"-ти":1===b?a+"-ви":2===b?a+"-ри":7===b||8===b?a+"-ми":a+"-ти"},week:{dow:1,doy:7}});return a}(),a.fullCalendar.datepickerLang("bg","bg",{closeText:"затвори",prevText:"<назад",nextText:"напред>",nextBigText:">>",currentText:"днес",monthNames:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthNamesShort:["Яну","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Нов","Дек"],dayNames:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"],dayNamesShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб"],dayNamesMin:["Не","По","Вт","Ср","Че","Пе","Съ"],weekHeader:"Wk",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("bg",{buttonText:{month:"Месец",week:"Седмица",day:"Ден",list:"График"},allDayText:"Цял ден",eventLimitText:function(a){return"+още "+a}})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/tr.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},c=(b.defineLocale||b.lang).call(b,"tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(b){if(0===b)return b+"'ıncı";var c=b%10,d=b%100-c,e=b>=100?100:null;return b+(a[c]||a[d]||a[e])},week:{dow:1,doy:7}});return c}(),a.fullCalendar.datepickerLang("tr","tr",{closeText:"kapat",prevText:"<geri",nextText:"ileri>",currentText:"bugün",monthNames:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthNamesShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dayNames:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],dayNamesShort:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],dayNamesMin:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],weekHeader:"Hf",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("tr",{buttonText:{next:"ileri",month:"Ay",week:"Hafta",day:"Gün",list:"Ajanda"},allDayText:"Tüm gün",eventLimitText:"daha fazla"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/gl.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),monthsParseExact:!0,weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(a){return"uns segundos"===a?"nuns segundos":"en "+a},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:7}});return a}(),a.fullCalendar.datepickerLang("gl","gl",{closeText:"Pechar",prevText:"<Ant",nextText:"Seg>",currentText:"Hoxe",monthNames:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],monthNamesShort:["Xan","Feb","Mar","Abr","Mai","Xuñ","Xul","Ago","Set","Out","Nov","Dec"],dayNames:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mér","Xov","Ven","Sáb"],dayNamesMin:["Do","Lu","Ma","Mé","Xo","Ve","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("gl",{buttonText:{month:"Mes",week:"Semana",day:"Día",list:"Axenda"},allDayHtml:"Todo
    o día",eventLimitText:"máis"})}); -------------------------------------------------------------------------------- /scss/pagetypes/CalendarPage.scss: -------------------------------------------------------------------------------- 1 | @import "mixins"; 2 | 3 | //////////////////////////////////////// 4 | ////////// LIST //////////////////////// 5 | //////////////////////////////////////// 6 | 7 | .EventList { 8 | .event { 9 | padding:10px; 10 | &.odd { 11 | background:#efefef; 12 | } 13 | } 14 | } 15 | 16 | 17 | 18 | 19 | 20 | .event { 21 | &.row { 22 | margin-bottom: 20px; 23 | } 24 | 25 | @include clearfix; 26 | 27 | .content { 28 | //float:left; 29 | margin-left:100px; 30 | } 31 | 32 | 33 | h4 { 34 | color: #333; 35 | letter-spacing: -1px; 36 | margin-top: 0; 37 | } 38 | 39 | .details { 40 | margin: 10px 0; 41 | overflow: hidden; 42 | 43 | p { 44 | font-size: 12px; 45 | text-overflow: ellipsis; 46 | } 47 | } 48 | 49 | .feedBox { 50 | //float: left; 51 | width: 30px; 52 | //padding-top: 7px; 53 | position:absolute; 54 | } 55 | 56 | } 57 | 58 | 59 | 60 | 61 | //register 62 | 63 | .EventRegistration { 64 | h3 { 65 | span { 66 | display:block; 67 | &.first { 68 | color:#999; 69 | font-size:80%; 70 | } 71 | } 72 | } 73 | form { 74 | margin-top:26px; 75 | } 76 | } 77 | 78 | 79 | //////////////////////////////////////// 80 | ////////// FULLCALENDAR //////////////// 81 | //////////////////////////////////////// 82 | 83 | .fc-event { 84 | cursor:pointer!important; 85 | } 86 | 87 | //////////////////////////////////////// 88 | /////// Calendar Page Menu ///////////// 89 | //////////////////////////////////////// 90 | 91 | 92 | //ul.CalendarPageMenu { 93 | // //@include clearfix; 94 | // @include horizontal-list; 95 | // li { 96 | // &.current { 97 | // border-bottom:6px solid orange; 98 | // a { 99 | // color:orange; 100 | // } 101 | // } 102 | // a { 103 | // display: block; 104 | // padding:5px; 105 | // padding-bottom:10px; 106 | // } 107 | // } 108 | // 109 | //} 110 | 111 | //////////////////////////////////////// 112 | /////// Calendar Page Menu ///////////// 113 | //////////////////////////////////////// 114 | 115 | #FullcalendarCustomNav { 116 | a { 117 | &.current { 118 | background-color:#e6e6e6; 119 | } 120 | } 121 | } 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /tests/Colors/CalendarColorExtensionTest.php: -------------------------------------------------------------------------------- 1 | calendar = Calendar::create(); 18 | } 19 | 20 | 21 | public function testTextColrDarkBackground(): void 22 | { 23 | $this->calendar->Color = '243456'; 24 | $this->assertEquals('#fff', $this->calendar->TextColor()); 25 | } 26 | 27 | 28 | public function testTextColrLightBackground(): void 29 | { 30 | $this->calendar->Color = 'DDDAAA'; 31 | $this->assertEquals('#000', $this->calendar->TextColor()); 32 | } 33 | 34 | 35 | public function testGetColorWithHash(): void 36 | { 37 | $this->calendar->Color = 'A48A48'; 38 | $this->assertEquals('#A48A48', $this->calendar->getColorWithHash()); 39 | 40 | $this->calendar->Color = '#A48A48'; 41 | $this->assertEquals('#A48A48', $this->calendar->getColorWithHash()); 42 | } 43 | 44 | 45 | public function testUpdateCMSFields(): void 46 | { 47 | $fields = $this->calendar->getCMSFields(); 48 | 49 | /** @var \SilverStripe\Forms\TabSet $rootTab */ 50 | $rootTab = $fields->fieldByName('Root'); 51 | 52 | /** @var \SilverStripe\Forms\Tab $mainTab */ 53 | $mainTab = $rootTab->fieldByName('Main'); 54 | $fields = $mainTab->FieldList(); 55 | $names = \array_map( 56 | static function ($field) { 57 | return $field->Name; 58 | }, 59 | $fields->toArray(), 60 | ); 61 | 62 | // @todo fix this test 63 | $this->assertEquals( 64 | [], 65 | array_diff( 66 | [ 67 | 'Slug', 68 | 'Title', 69 | 'Color', 70 | 'Groups', 71 | ], 72 | $names 73 | ) 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/de.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";function a(a,b,c,d){var e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?e[c][0]:e[c][1]}var c=(b.defineLocale||b.lang).call(b,"de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:a,mm:"%d Minuten",h:a,hh:"%d Stunden",d:a,dd:a,M:a,MM:a,y:a,yy:a},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return c}(),a.fullCalendar.datepickerLang("de","de",{closeText:"Schließen",prevText:"<Zurück",nextText:"Vor>",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("de",{buttonText:{month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},allDayText:"Ganztägig",eventLimitText:function(a){return"+ weitere "+a}})}); -------------------------------------------------------------------------------- /tests/Categories/PublicEventCategoryTest.php: -------------------------------------------------------------------------------- 1 | category1 = $this->objFromFixture(PublicEventCategory::class, 'category1'); 24 | $this->category2 = $this->objFromFixture(PublicEventCategory::class, 'category2'); 25 | } 26 | 27 | 28 | public function testComingEvents(): void 29 | { 30 | // category 1 has a past and 2 future events, only the future events should show 31 | $events = $this->category1->comingEvents('2019-12-30')->toArray(); 32 | $titles = \array_map(static function ($event) { 33 | return $event->Title; 34 | }, $events); 35 | $this->assertEquals(['Happy New Year!!', 'Chilling in the Future'], $titles); 36 | 37 | // category 2 has onlhy the event way in the future 38 | $events = $this->category2->comingEvents('2019-12-30')->toArray(); 39 | $titles = \array_map(static function ($event) { 40 | return $event->Title; 41 | }, $events); 42 | $this->assertEquals(['Chilling in the Future'], $titles); 43 | } 44 | 45 | 46 | public function testCanView(): void 47 | { 48 | $this->assertTrue($this->category1->canView()); 49 | } 50 | 51 | 52 | public function testCanCreate(): void 53 | { 54 | $this->assertTrue($this->category1->canCreate()); 55 | } 56 | 57 | 58 | public function testCanEdit(): void 59 | { 60 | $this->assertTrue($this->category1->canEdit()); 61 | } 62 | 63 | 64 | public function testCanDelete(): void 65 | { 66 | $this->assertTrue($this->category1->canDelete()); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/de-at.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";function a(a,b,c,d){var e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?e[c][0]:e[c][1]}var c=(b.defineLocale||b.lang).call(b,"de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:a,mm:"%d Minuten",h:a,hh:"%d Stunden",d:a,dd:a,M:a,MM:a,y:a,yy:a},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return c}(),a.fullCalendar.datepickerLang("de-at","de",{closeText:"Schließen",prevText:"<Zurück",nextText:"Vor>",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("de-at",{buttonText:{month:"Monat",week:"Woche",day:"Tag",list:"Terminübersicht"},allDayText:"Ganztägig",eventLimitText:function(a){return"+ weitere "+a}})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/ca.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(a,b){var c=1===a?"r":2===a?"n":3===a?"r":4===a?"t":"è";return"w"!==b&&"W"!==b||(c="a"),a+c},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("ca","ca",{closeText:"Tanca",prevText:"Anterior",nextText:"Següent",currentText:"Avui",monthNames:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],monthNamesShort:["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des"],dayNames:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],dayNamesShort:["dg","dl","dt","dc","dj","dv","ds"],dayNamesMin:["dg","dl","dt","dc","dj","dv","ds"],weekHeader:"Set",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("ca",{buttonText:{month:"Mes",week:"Setmana",day:"Dia",list:"Agenda"},allDayText:"Tot el dia",eventLimitText:"més"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/he.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(a){return 2===a?"שעתיים":a+" שעות"},d:"יום",dd:function(a){return 2===a?"יומיים":a+" ימים"},M:"חודש",MM:function(a){return 2===a?"חודשיים":a+" חודשים"},y:"שנה",yy:function(a){return 2===a?"שנתיים":a%10===0&&10!==a?a+" שנה":a+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(a){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(a)},meridiem:function(a,b,c){return 5>a?"לפנות בוקר":10>a?"בבוקר":12>a?c?'לפנה"צ':"לפני הצהריים":18>a?c?'אחה"צ':"אחרי הצהריים":"בערב"}});return a}(),a.fullCalendar.datepickerLang("he","he",{closeText:"סגור",prevText:"<הקודם",nextText:"הבא>",currentText:"היום",monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthNamesShort:["ינו","פבר","מרץ","אפר","מאי","יוני","יולי","אוג","ספט","אוק","נוב","דצמ"],dayNames:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],dayNamesShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayNamesMin:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("he",{defaultButtonText:{month:"חודש",week:"שבוע",day:"יום",list:"סדר יום"},weekNumberTitle:"שבוע",allDayText:"כל היום",eventLimitText:"אחר"})}); -------------------------------------------------------------------------------- /src/Colors/ColorpaletteField.php: -------------------------------------------------------------------------------- 1 | $source 23 | * @param \SilverStripe\Forms\Form $form 24 | */ 25 | public function __construct( 26 | string $name, 27 | ?string $title = null, 28 | $source = null, 29 | string $value = "", 30 | ?Form $form = null 31 | ) { 32 | if (!\is_array($source)) { 33 | $source = ColorpaletteHelper::getPalette(); 34 | } 35 | 36 | parent::__construct($name, ($title===null) ? $name : $title, $source, $value, $form); 37 | } 38 | 39 | 40 | /** 41 | * @param array $properties 42 | * @return string 43 | */ 44 | public function Field($properties = []) 45 | { 46 | $this->addExtraClass('ColorpaletteInput'); 47 | ColorpaletteHelper::requirements(); 48 | Requirements::javascript("titledk/silverstripe-calendar:javascript/admin/ColorpaletteField.js"); 49 | 50 | $source = $this->getSource(); 51 | 52 | //adding the current value to the mix if isn't in the array 53 | $val = $this->getColorWithHash(); 54 | $this->value = $val; 55 | $source[$val] = $val; 56 | 57 | $this->setSource($source); 58 | 59 | return parent::Field(); 60 | } 61 | 62 | 63 | /** 64 | * Getter that always returns the color with a hash 65 | * As the standard Silverstripe color picker seems to save colors without a hash, 66 | * this just makes sure that colors are always returned with a hash - whether they've been 67 | * saved with or without one 68 | */ 69 | public function getColorWithHash(): string 70 | { 71 | $color = $this->value; 72 | 73 | return \strpos($color, '#') === false 74 | ? '#' . $color 75 | : $color; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/ar-sa.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},c={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},d=(b.defineLocale||b.lang).call(b,"ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(a){return"م"===a},meridiem:function(a,b,c){return 12>a?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(a){return a.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(a){return c[a]}).replace(/،/g,",")},postformat:function(b){return b.replace(/\d/g,function(b){return a[b]}).replace(/,/g,"،")},week:{dow:6,doy:12}});return d}(),a.fullCalendar.datepickerLang("ar-sa","ar",{closeText:"إغلاق",prevText:"<السابق",nextText:"التالي>",currentText:"اليوم",monthNames:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("ar-sa",{buttonText:{month:"شهر",week:"أسبوع",day:"يوم",list:"أجندة"},allDayText:"اليوم كله",eventLimitText:"أخرى"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/vi.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(a){return/^ch$/i.test(a)},meridiem:function(a,b,c){return 12>a?c?"sa":"SA":c?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,doy:4}});return a}(),a.fullCalendar.datepickerLang("vi","vi",{closeText:"Đóng",prevText:"<Trước",nextText:"Tiếp>",currentText:"Hôm nay",monthNames:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"],monthNamesShort:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayNames:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],dayNamesShort:["CN","T2","T3","T4","T5","T6","T7"],dayNamesMin:["CN","T2","T3","T4","T5","T6","T7"],weekHeader:"Tu",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("vi",{buttonText:{month:"Tháng",week:"Tuần",day:"Ngày",list:"Lịch biểu"},allDayText:"Cả ngày",eventLimitText:function(a){return"+ thêm "+a}})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/es.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),c="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),d=(b.defineLocale||b.lang).call(b,"es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(b,d){return/-MMM-/.test(d)?c[b.month()]:a[b.month()]},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return d}(),a.fullCalendar.datepickerLang("es","es",{closeText:"Cerrar",prevText:"<Ant",nextText:"Sig>",currentText:"Hoy",monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthNamesShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],dayNamesShort:["dom","lun","mar","mié","jue","vie","sáb"],dayNamesMin:["D","L","M","X","J","V","S"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("es",{buttonText:{month:"Mes",week:"Semana",day:"Día",list:"Agenda"},allDayHtml:"Todo
    el día",eventLimitText:"más"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/fa.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},c={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},d=(b.defineLocale||b.lang).call(b,"fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(a){return/بعد از ظهر/.test(a)},meridiem:function(a,b,c){return 12>a?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(a){return a.replace(/[۰-۹]/g,function(a){return c[a]}).replace(/،/g,",")},postformat:function(b){return b.replace(/\d/g,function(b){return a[b]}).replace(/,/g,"،")},ordinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});return d}(),a.fullCalendar.datepickerLang("fa","fa",{closeText:"بستن",prevText:"<قبلی",nextText:"بعدی>",currentText:"امروز",monthNames:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["يکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayNamesShort:["ی","د","س","چ","پ","ج","ش"],dayNamesMin:["ی","د","س","چ","پ","ج","ش"],weekHeader:"هف",dateFormat:"yy/mm/dd",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("fa",{buttonText:{month:"ماه",week:"هفته",day:"روز",list:"برنامه"},allDayText:"تمام روز",eventLimitText:function(a){return"بیش از "+a}})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/hi.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},c={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},d=(b.defineLocale||b.lang).call(b,"hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(a){return a.replace(/[१२३४५६७८९०]/g,function(a){return c[a]})},postformat:function(b){return b.replace(/\d/g,function(b){return a[b]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(a,b){return 12===a&&(a=0),"रात"===b?4>a?a:a+12:"सुबह"===b?a:"दोपहर"===b?a>=10?a:a+12:"शाम"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"रात":10>a?"सुबह":17>a?"दोपहर":20>a?"शाम":"रात"},week:{dow:0,doy:6}});return d}(),a.fullCalendar.datepickerLang("hi","hi",{closeText:"बंद",prevText:"पिछला",nextText:"अगला",currentText:"आज",monthNames:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"],monthNamesShort:["जन","फर","मार्च","अप्रेल","मई","जून","जूलाई","अग","सित","अक्ट","नव","दि"],dayNames:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],dayNamesShort:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],dayNamesMin:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],weekHeader:"हफ्ता",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("hi",{buttonText:{month:"महीना",week:"सप्ताह",day:"दिन",list:"कार्यसूची"},allDayText:"सभी दिन",eventLimitText:function(a){return"+अधिक "+a}})}); -------------------------------------------------------------------------------- /src/Admin/Forms/CalendarsForm.php: -------------------------------------------------------------------------------- 1 | get(Calendar::class, 'enabled')) { 33 | return; 34 | } 35 | 36 | //Configuration for calendar grid field 37 | $gridCalendarConfig = GridFieldConfig_RecordEditor::create(); 38 | $gridCalendarConfig->removeComponentsByType(GridFieldDataColumns::class); 39 | $gridCalendarConfig->addComponent($dataColumns = new GridFieldDataColumns(), GridFieldEditButton::class); 40 | 41 | $c = \singleton('TitleDK\Calendar\Calendars\Calendar'); 42 | $summaryFields = $c->summaryFields(); 43 | 44 | $dataColumns->setDisplayFields($summaryFields); 45 | 46 | //settings for the case that colors are enabled 47 | if (Config::inst()->get(Calendar::class, 'colors')) { 48 | $dataColumns->setFieldFormatting( 49 | [ 50 | "Title" => '
    $Title', 52 | ], 53 | ); 54 | } 55 | 56 | $GridFieldCalendars = new GridField( 57 | 'Calendars', 58 | '', 59 | Calendar::get(), 60 | $gridCalendarConfig, 61 | ); 62 | 63 | $fields = new FieldList( 64 | $GridFieldCalendars, 65 | ); 66 | $actions = new FieldList(); 67 | $this->addExtraClass('CalendarsForm'); 68 | 69 | parent::__construct($controller, $name, $fields, $actions); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/Colors/ColorpaletteHelper.php: -------------------------------------------------------------------------------- 1 | setSource(self::getPalette()) 32 | ->setEmptyString('-- select color --'); 33 | } 34 | 35 | 36 | /** 37 | * Getting a color palette 38 | * For now we only have a hsv palette, could be extended with more options 39 | * 40 | * Potential options: 41 | * Standard CKEditor color palette 42 | * http://stackoverflow.com/questions/13455922/display-only-few-desired-colors-in-a-ckeditor-palette 43 | * 000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF 44 | * 45 | * Consider adding color names like this: 46 | * http://stackoverflow.com/questions/2993970/function-that-converts-hex-color-values-to-an-approximate-color-name 47 | * 48 | * Color variation: 49 | * http://stackoverflow.com/questions/1177826/simple-color-variation 50 | * 51 | * @return array Colors mapped as #color -> #color 52 | */ 53 | public static function getPalette(): array 54 | { 55 | //overwriting with the palette from the calendar settings 56 | $colors = Config::inst()->get(ColorpaletteHelper::class, 'base_palette'); 57 | 58 | $result = []; 59 | foreach ($colors as $color) { 60 | $result[$color] = $color; 61 | } 62 | 63 | return $result; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Tags/EventTag.php: -------------------------------------------------------------------------------- 1 | Events() 15 | */ 16 | class EventTag extends DataObject 17 | { 18 | //use BlogObject; 19 | 20 | /** 21 | * Use an exception code so that attempted writes can continue on 22 | * duplicate errors. 23 | * 24 | * @const string 25 | * This must be a string because ValidationException has decided we can't use int 26 | */ 27 | public const DUPLICATE_EXCEPTION = 'DUPLICATE'; 28 | 29 | /** 30 | * {@inheritDoc} 31 | * 32 | * @var string 33 | */ 34 | private static $table_name = 'EventTag'; 35 | 36 | /** @var array */ 37 | private static $db = [ 38 | 'Title' => 'Varchar(255)', 39 | ]; 40 | 41 | /** 42 | * @var array 43 | // todo make tags per calendar 44 | private static $has_one = [ 45 | 'Calendar' => Calendar::class 46 | ]; 47 | */ 48 | 49 | /** @var array */ 50 | private static $many_many = [ 51 | 'Events' => Event::class, 52 | ]; 53 | 54 | /** 55 | * @todo is this needed? 56 | * 57 | * {@inheritdoc} 58 | */ 59 | protected function getListUrlSegment() 60 | { 61 | return 'tag'; 62 | } 63 | 64 | 65 | /** 66 | * {@inheritdoc} 67 | */ 68 | protected function getDuplicateError() 69 | { 70 | return \_t(self::class . '.Duplicate', 'A blog tag already exists with that name.'); 71 | } 72 | 73 | 74 | /** 75 | * Looks for objects o the same type and the same value by the given Field 76 | * 77 | * @param string $field E.g. URLSegment or Title 78 | */ 79 | protected function getDuplicatesByField(string $field): DataList 80 | { 81 | $duplicates = DataList::create(self::class) 82 | ->filter( 83 | [ 84 | $field => $this->$field, 85 | ], 86 | ); 87 | 88 | if ($this->ID) { 89 | $duplicates = $duplicates->exclude('ID', $this->ID); 90 | } 91 | 92 | return $duplicates; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";var a=(b.defineLocale||b.lang).call(b,"zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,b){return 12===a&&(a=0),"凌晨"===b||"早上"===b||"上午"===b?a:"下午"===b||"晚上"===b?a+12:a>=11?a:a+12},meridiem:function(a,b,c){var d=100*a+b;return 600>d?"凌晨":900>d?"早上":1130>d?"上午":1230>d?"中午":1800>d?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var a,c;return a=b().startOf("week"),c=this.diff(a,"days")>=7?"[下]":"[本]",0===this.minutes()?c+"dddAh点整":c+"dddAh点mm"},lastWeek:function(){var a,c;return a=b().startOf("week"),c=this.unix() */ 22 | private static $db = [ 23 | 'Color' => 'Varchar', 24 | ]; 25 | 26 | public function TextColor(): string 27 | { 28 | $colorWithHash = $this->owner->getColorWithHash(); 29 | 30 | return $this->owner->calculateTextColor($colorWithHash); 31 | } 32 | 33 | 34 | /** 35 | * Text Color calculation 36 | * From http://www.splitbrain.org/blog/2008-09/18-calculating_color_contrast_with_php 37 | * Here is a discussion on that topic: 38 | * http://stackoverflow.com/questions/1331591/given-a-background-color-black-or-white-text 39 | */ 40 | public function calculateTextColor(string $color): string 41 | { 42 | $c = \str_replace('#', '', $color); 43 | $rgb = []; 44 | $rgb[] = \hexdec(\substr($c, 0, 2)); 45 | $rgb[] = \hexdec(\substr($c, 2, 2)); 46 | $rgb[] = \hexdec(\substr($c, 4, 2)); 47 | 48 | return $rgb[0]+$rgb[1]+$rgb[2]<382 49 | ? '#fff' 50 | : '#000'; 51 | } 52 | 53 | 54 | /** 55 | * Getter that always returns the color with a hash 56 | * As the standard Silverstripe color picker seems to save colors without a hash, 57 | * this just makes sure that colors are always returned with a hash - whether they've been 58 | * saved with or without one 59 | */ 60 | public function getColorWithHash(): string 61 | { 62 | $color = $this->owner->Color; 63 | 64 | return \strpos($color, '#') === false 65 | ? '#' . $color 66 | : $color; 67 | } 68 | 69 | 70 | public function updateCMSFields(FieldList $fields): void 71 | { 72 | $colors = ColorpaletteHelper::getPalette(); 73 | 74 | $fields->removeByName('Color'); 75 | $fields->addFieldToTab( 76 | 'Root.Main', 77 | new ColorpaletteField('Color', 'Colour', $colors), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/is.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";function a(a){return a%100===11?!0:a%10!==1}function c(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}}var d=(b.defineLocale||b.lang).call(b,"is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:c,m:c,mm:c,h:"klukkustund",hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return d}(),a.fullCalendar.datepickerLang("is","is",{closeText:"Loka",prevText:"< Fyrri",nextText:"Næsti >",currentText:"Í dag",monthNames:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],dayNames:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"],dayNamesShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],dayNamesMin:["Su","Má","Þr","Mi","Fi","Fö","La"],weekHeader:"Vika",dateFormat:"dd.mm.yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("is",{buttonText:{month:"Mánuður",week:"Vika",day:"Dagur",list:"Dagskrá"},allDayHtml:"Allan
    daginn",eventLimitText:"meira"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/lb.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";function a(a,b,c,d){var e={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return b?e[c][0]:e[c][1]}function c(a){var b=a.substr(0,a.indexOf(" "));return e(b)?"a "+a:"an "+a}function d(a){var b=a.substr(0,a.indexOf(" "));return e(b)?"viru "+a:"virun "+a}function e(a){if(a=parseInt(a,10),isNaN(a))return!1;if(0>a)return!0;if(10>a)return a>=4&&7>=a;if(100>a){var b=a%10,c=a/10;return e(0===b?c:b)}if(1e4>a){for(;a>=10;)a/=10;return e(a)}return a/=1e3,e(a)}var f=(b.defineLocale||b.lang).call(b,"lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:c,past:d,s:"e puer Sekonnen",m:a,mm:"%d Minutten",h:a,hh:"%d Stonnen",d:a,dd:"%d Deeg",M:a,MM:"%d Méint",y:a,yy:"%d Joer"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return f}(),a.fullCalendar.datepickerLang("lb","lb",{closeText:"Fäerdeg",prevText:"Zréck",nextText:"Weider",currentText:"Haut",monthNames:["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],dayNamesShort:["Son","Méi","Dën","Mët","Don","Fre","Sam"],dayNamesMin:["So","Mé","Dë","Më","Do","Fr","Sa"],weekHeader:"W",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("lb",{buttonText:{month:"Mount",week:"Woch",day:"Dag",list:"Terminiwwersiicht"},allDayText:"Ganzen Dag",eventLimitText:"méi"})}); -------------------------------------------------------------------------------- /thirdparty/fullcalendar/2.9.1/fullcalendar/lang/pl.js: -------------------------------------------------------------------------------- 1 | !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){!function(){"use strict";function a(a){return 5>a%10&&a%10>1&&~~(a/10)%10!==1}function c(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}}var d="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),e="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),f=(b.defineLocale||b.lang).call(b,"pl",{months:function(a,b){return""===b?"("+e[a.month()]+"|"+d[a.month()]+")":/D MMMM/.test(b)?e[a.month()]:d[a.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:c,mm:c,h:c,hh:c,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:c,y:"rok",yy:c},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return f}(),a.fullCalendar.datepickerLang("pl","pl",{closeText:"Zamknij",prevText:"<Poprzedni",nextText:"Następny>",currentText:"Dziś",monthNames:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthNamesShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],dayNames:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],dayNamesShort:["Nie","Pn","Wt","Śr","Czw","Pt","So"],dayNamesMin:["N","Pn","Wt","Śr","Cz","Pt","So"],weekHeader:"Tydz",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""}),a.fullCalendar.lang("pl",{buttonText:{month:"Miesiąc",week:"Tydzień",day:"Dzień",list:"Plan dnia"},allDayText:"Cały dzień",eventLimitText:"więcej"})}); --------------------------------------------------------------------------------