...
 
Commits (4)
<?php
namespace MediaEssenz\MeGoogleCalendar\Utility;
use DateTime;
use DateTimeZone;
use Exception;
use \TYPO3\CMS\Core\Utility\GeneralUtility;
/***************************************************************
......@@ -33,23 +36,44 @@ use \TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class EidGetIcs
{
/**
* @throws Exception
*/
public static function main()
{
$timezone = new \DateTimeZone('UTC');
$allDay = strpos(GeneralUtility::_GP('dtstart') , 'T') === false;
$dtstartDateTime = new \DateTime(GeneralUtility::_GP('dtstart'), $timezone);
$timeZoneString = GeneralUtility::_GP('timezone') ? GeneralUtility::_GP('timezone') : date_default_timezone_get();
$filenameTimeZone = new DateTimeZone($timeZoneString);
$utcTimeZone = new DateTimeZone('UTC');
$dtstartDateTime = new DateTime(GeneralUtility::_GP('dtstart'), $utcTimeZone);
$filenameStartDateTime = clone $dtstartDateTime;
$filenameStartDateTime->setTimezone($filenameTimeZone);
$dtstartDate = $dtstartDateTime->format('Ymd');
$dtstartTime = $dtstartDateTime->format('His');
$dtstartTimeShort = $dtstartDateTime->format('Hi');
$filenameStartTime = $allDay ? '' : '_' . $filenameStartDateTime->format('Hi');
$dtendDateTime = new \DateTime(GeneralUtility::_GP('dtend'), $timezone);
$dtendDateTime = new DateTime(GeneralUtility::_GP('dtend'), $utcTimeZone);
$filenameEndDateTime = clone $dtendDateTime;
$filenameEndDateTime->setTimezone($filenameTimeZone);
$dtendDate = $dtendDateTime->format('Ymd');
$dtendTime = $dtendDateTime->format('His');
$dtendTimeShort = $dtendDateTime->format('Hi');
$filenameEndTime = $allDay ? '' : '_' . $filenameEndDateTime->format('Hi');
if ($allDay && $filenameEndDateTime->diff($filenameStartDateTime)->days > 1) {
$filenameEndTime .= $filenameEndDateTime->modify('-1 day')->format('Ymd') . $filenameEndTime;
}
if ($filenameEndTime) {
$filenameEndTime = '-' . $filenameEndTime;
}
$filenameEndTime = str_replace('-_', '-', $filenameEndTime);
header('Content-type: text/calendar');
header('Content-Disposition: attachment; filename=' . urlencode(GeneralUtility::_GP('summary')) . '_' . $dtstartDate . '_' . $dtstartTimeShort . '-' . $dtendDate . '_' . $dtendTimeShort . '.ics');
header('Content-Disposition: attachment; filename=' . urlencode(GeneralUtility::_GP('summary')) . '_' . $dtstartDate . $filenameStartTime . $filenameEndTime . '.ics');
header('Pragma: no-cache');
header('Expires: 0');
......@@ -62,8 +86,8 @@ BEGIN:VEVENT
UID:' . htmlspecialchars(GeneralUtility::_GP('uid')) . '
SUMMARY:' . htmlspecialchars(GeneralUtility::_GP('summary')) . '
DTSTAMP:' . date('Ymd\THis\Z') . '
DTSTART:' . $dtstartDate . 'T' . $dtstartTime . 'Z
DTEND:' . $dtendDate . 'T' . $dtendTime . 'Z
DTSTART:' . $dtstartDate . ($allDay ? '' : 'T' . $dtstartTime . 'Z') . '
DTEND:' . $dtendDate . ($allDay ? '' : 'T' . $dtendTime . 'Z') . '
' . (GeneralUtility::_GP('description') !== 'undefined' ? 'DESCRIPTION:' . trim(htmlspecialchars(strip_tags(str_replace('<br>', '\\n', GeneralUtility::_GP('description'))))) : '') . '
' . (GeneralUtility::_GP('location') !== 'undefined' ? 'LOCATION:' . htmlspecialchars(GeneralUtility::_GP('location')) : '') . '
END:VEVENT
......
......@@ -163,4 +163,7 @@ ChangeLog
- v.4.6.3: Add location and description in ical files only if defined; Improve format of ical description.
- v.4.6.4: Fix problem with full day events
\ No newline at end of file
- v.4.6.4: Fix problem with full day events
- v.4.7.0: Update fullcalendar plugin to version 3.10.0 + jQuery to 3.4.1; Improve handling of all day(s) events;
Move ical-link generation from gcal.js to eventDataTransform method defined inside settings partial;
......@@ -7,9 +7,10 @@
var eventDialog = $('#{contentKey}_dialog'),
eventModal = $('#{contentKey}_modal'),
settings = window['{contentKey}_settings'],
eventDay = event.start.format("{settings.columnFormatDay}"),
eventStart = event.start.format("{settings.timeFormatGeneral}"),
eventEnd = event.end.format("{settings.timeFormatGeneral}"),
eventStartDate = event.start.format("{settings.columnFormatDay}"),
eventStartTime = event.allDay ? '' : event.start.format("{settings.timeFormatGeneral}"),
eventEndDate = event.end.add('days', (event.allDay ? -1 : 0)).format("{settings.columnFormatDay}"),
eventEndTime = event.allDay ? '' : event.end.format("{settings.timeFormatGeneral}"),
downloadIcal = <f:if condition="{settings.hideIcalDownloadButton}"><f:then>''</f:then><f:else>'<a href="{settings.eIdGetIcsUrl}' + event.ical + '" title="<f:translate key='event_download_ical_title' />" class="btn btn-default fc-icalbutton"><f:translate key="event_download_ical" /></a>'</f:else></f:if>,
addToGoogleCal = <f:if condition="{settings.hideAddtoGoogleCalendarButton}"><f:then>''</f:then><f:else>'<a href="' + event.url + '" target="googlecalendar" title="<f:translate key='event_add_to_google_title' />" class="btn btn-default fc-addtogooglebutton"><f:translate key="event_add_to_google" /></a>'</f:else></f:if>,
eventDescription = '',
......@@ -28,7 +29,8 @@
if (typeof event.description != 'undefined') {
eventDescription += '<div class="fc-description">' + event.description + '</div>';
}
eventDescription += '<dl><dt><f:translate key="event_duration" /></dt><dd>' + eventDay + '&nbsp;&nbsp;' + eventStart + '&nbsp;–&nbsp;' + eventEnd + '</dd>' + eventLocation + '</dl>';
var endDateTimeString = (eventEndDate !== eventStartDate ? eventEndDate + '&nbsp;&nbsp;' : '') + eventEndTime;
eventDescription += '<dl><dt><f:translate key="event_duration" /></dt><dd>' + eventStartDate + '&nbsp;' + eventStartTime + (endDateTimeString ? '&nbsp;–&nbsp;' + endDateTimeString : '') + '</dd>' + eventLocation + '</dl>';
if (typeof $.ui === 'undefined' && typeof $().modal == 'function') {
/* Bootstrap Modal */
......@@ -149,5 +151,32 @@
$('#' + key + '_overlay').hide();
}
};
{contentKey}_settings.eventDataTransform = function(event) {
if (event.start.indexOf('T') === -1) {
event.allDay = true;
}
event.ical = '&summary=' + encodeURIComponent(event.title) + '&uid=' + event.id;
if (event.allDay === true) {
event.ical += '&dtstart=' + event.start + '&dtend=' + event.end;
} else {
event.ical += '&dtstart=' + moment(event.start).toJSON() + '&dtend=' + moment(event.end).toJSON();
}
var timezone = <f:if condition="{settings.timeZone}"><f:then>'{settings.timeZone}'</f:then><f:else>false</f:else></f:if>;
if (timezone !== false) {
event.ical += '&timezone=' + timezone;
}
if (event.description) {
event.ical += '&description=' + encodeURIComponent(event.description);
}
if (event.location) {
event.ical += '&location=' + encodeURIComponent(event.location);
}
return event;
};
</script>
</html>
This diff is collapsed.
/*!
* FullCalendar v3.9.0
* FullCalendar v3.10.0
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
/*!
* FullCalendar v3.9.0 Print Stylesheet
* FullCalendar v3.10.0 Print Stylesheet
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
......@@ -68,8 +68,8 @@
/* ...gives space within the skeleton. also ensures min height in a way */ }
.fc tbody .fc-row .fc-content-skeleton table {
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
making it look more like 3em. for other browers, it will already be this tall */
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
making it look more like 3em. for other browers, it will already be this tall */
height: 1em; }
/* Undo month-view event limiting. Display all events and hide the "more" links
......
{
"version": 3,
"mappings": "AAAA;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH,GAAI;EACF,SAAS,EAAE,eAAe;;AAE5B;oGACoG;AACpG,SAAU;EACR,UAAU,EAAE,eAAe;EAC3B,KAAK,EAAE,eAAe;EACtB,iBAAiB,EAAE,KAAK;;AAE1B,qBAAsB;EACpB,OAAO,EAAE,IAAI;;AAEf;oGACoG;AACpG;;;;;OAKQ;EACN,YAAY,EAAE,eAAe;EAC7B,UAAU,EAAE,eAAe;;AAE7B,yDAAyD;AACzD,eAAe;AACf;;;;;;;oBAOqB;EACnB,OAAO,EAAE,IAAI;;AAEf,oDAAoD;AACpD,iBAAkB;EAChB,MAAM,EAAE,eAAe;EACvB,iDAAiD;EACjD,UAAU,EAAE,YAAY;EACxB,8DAA8D;;AAEhE,sCAAuC;EACrC,QAAQ,EAAE,MAAM;EAChB,oBAAoB;EAC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BAAyB;EACxB,OAAO,EAAE,IAAI;;AAEd,wCAAwC;AACxC;gBACiB;EAChB,qEAAqE;EACrE,OAAO,EAAE,eAAe;EACxB,4CAA4C;;AAE7C,4FAA4F;AAC5F,kCAAmC;EAClC,QAAQ,EAAE,MAAM;;AAEjB,4DAA4D;AAC5D,wCAAyC;EACxC,MAAM,EAAE,GAAG;;AAEZ,+FAA+F;AAC/F,iCAAkC;EACjC,MAAM,EAAE,YAAY;;AAErB;oGACoG;AACpG,yDAAyD;AACzD,uBAAwB;EACvB,QAAQ,EAAE,iBAAiB;EAC3B,MAAM,EAAE,kBAAkB;;AAE3B,2EAA2E;AAC3E,kCAAmC;EAClC,mBAAmB,EAAE,cAAc;;AAEpC,iDAAiD;AACjD,wCAAyC;EACxC,OAAO,EAAE,KAAK;;AAEf,oFAAoF;AACpF,oCAAqC;EACpC,gBAAgB,EAAE,cAAc;;AAEjC,yDAAyD;AACzD,2CAA4C;EAC3C,OAAO,EAAE,KAAK;;AAEf,UAAU;AACV,6EAA6E;AAC7E,gCAAiC;EAChC,WAAW,EAAE,iBAAiB;;AAE/B,qDAAqD;AACrD,qCAAsC;EACrC,OAAO,EAAE,IAAI;;AAEd,4FAA4F;AAC5F,sCAAuC;EACtC,OAAO,EAAE,eAAe;;AAEzB;oGACoG;AACpG,kDAAkD;AAClD;;uBAEwB;EACvB,KAAK;EACL,QAAQ,EAAE,kBAAkB;EAC5B,MAAM,EAAE,eAAe;;AAExB,0EAA0E;AAC1E,OAAQ;EACP,MAAM,EAAE,YAAY;EACpB,MAAM,EAAE,YAAY;;AAErB;oGACoG;AACpG;UACW;EACV,OAAO,EAAE,IAAI;EACb,+CAA+C",
"sources": ["fullcalendar.print.scss"],
"names": [],
"file": "fullcalendar.print.css"
......
/*!
* FullCalendar v3.9.0
* FullCalendar v3.10.0
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
/*!
* FullCalendar v3.9.0 Print Stylesheet
* FullCalendar v3.10.0 Print Stylesheet
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
......@@ -14,17 +14,17 @@
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
*/
.fc {
max-width: 100% !important; }
max-width: 100% !important; }
/* Global Event Restyling
--------------------------------------------------------------------------------------------------*/
.fc-event {
background: #fff !important;
color: #000 !important;
page-break-inside: avoid; }
background: #fff !important;
color: #000 !important;
page-break-inside: avoid; }
.fc-event .fc-resizer {
display: none; }
display: none; }
/* Table & Day-Row Restyling
--------------------------------------------------------------------------------------------------*/
......@@ -34,8 +34,8 @@
.fc thead,
.fc tbody,
.fc-row {
border-color: #ccc !important;
background: #fff !important; }
border-color: #ccc !important;
background: #fff !important; }
/* kill the overlaid, absolutely-positioned components */
/* common... */
......@@ -47,111 +47,111 @@
.fc-business-container,
.fc-highlight-container,
.fc-helper-container {
display: none; }
display: none; }
/* don't force a min-height on rows (for DayGrid) */
.fc tbody .fc-row {
height: auto !important;
/* undo height that JS set in distributeHeight */
min-height: 0 !important;
/* undo the min-height from each view's specific stylesheet */ }
height: auto !important;
/* undo height that JS set in distributeHeight */
min-height: 0 !important;
/* undo the min-height from each view's specific stylesheet */ }
.fc tbody .fc-row .fc-content-skeleton {
position: static;
/* undo .fc-rigid */
padding-bottom: 0 !important;
/* use a more border-friendly method for this... */ }
position: static;
/* undo .fc-rigid */
padding-bottom: 0 !important;
/* use a more border-friendly method for this... */ }
.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td {
/* only works in newer browsers */
padding-bottom: 1em;
/* ...gives space within the skeleton. also ensures min height in a way */ }
/* only works in newer browsers */
padding-bottom: 1em;
/* ...gives space within the skeleton. also ensures min height in a way */ }
.fc tbody .fc-row .fc-content-skeleton table {
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
making it look more like 3em. for other browers, it will already be this tall */
height: 1em; }
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
making it look more like 3em. for other browers, it will already be this tall */
height: 1em; }
/* Undo month-view event limiting. Display all events and hide the "more" links
--------------------------------------------------------------------------------------------------*/
.fc-more-cell,
.fc-more {
display: none !important; }
display: none !important; }
.fc tr.fc-limited {
display: table-row !important; }
display: table-row !important; }
.fc td.fc-limited {
display: table-cell !important; }
display: table-cell !important; }
.fc-popover {
display: none;
/* never display the "more.." popover in print mode */ }
display: none;
/* never display the "more.." popover in print mode */ }
/* TimeGrid Restyling
--------------------------------------------------------------------------------------------------*/
/* undo the min-height 100% trick used to fill the container's height */
.fc-time-grid {
min-height: 0 !important; }
min-height: 0 !important; }
/* don't display the side axis at all ("all-day" and time cells) */
.fc-agenda-view .fc-axis {
display: none; }
display: none; }
/* don't display the horizontal lines */
.fc-slats,
.fc-time-grid hr {
/* this hr is used when height is underused and needs to be filled */
display: none !important;
/* important overrides inline declaration */ }
/* this hr is used when height is underused and needs to be filled */
display: none !important;
/* important overrides inline declaration */ }
/* let the container that holds the events be naturally positioned and create real height */
.fc-time-grid .fc-content-skeleton {
position: static; }
position: static; }
/* in case there are no events, we still want some height */
.fc-time-grid .fc-content-skeleton table {
height: 4em; }
height: 4em; }
/* kill the horizontal spacing made by the event container. event margins will be done below */
.fc-time-grid .fc-event-container {
margin: 0 !important; }
margin: 0 !important; }
/* TimeGrid *Event* Restyling
--------------------------------------------------------------------------------------------------*/
/* naturally position events, vertically stacking them */
.fc-time-grid .fc-event {
position: static !important;
margin: 3px 2px !important; }
position: static !important;
margin: 3px 2px !important; }
/* for events that continue to a future day, give the bottom border back */
.fc-time-grid .fc-event.fc-not-end {
border-bottom-width: 1px !important; }
border-bottom-width: 1px !important; }
/* indicate the event continues via "..." text */
.fc-time-grid .fc-event.fc-not-end:after {
content: "..."; }
content: "..."; }
/* for events that are continuations from previous days, give the top border back */
.fc-time-grid .fc-event.fc-not-start {
border-top-width: 1px !important; }
border-top-width: 1px !important; }
/* indicate the event is a continuation via "..." text */
.fc-time-grid .fc-event.fc-not-start:before {
content: "..."; }
content: "..."; }
/* time */
/* undo a previous declaration and let the time text span to a second line */
.fc-time-grid .fc-event .fc-time {
white-space: normal !important; }
white-space: normal !important; }
/* hide the the time that is normally displayed... */
.fc-time-grid .fc-event .fc-time span {
display: none; }
display: none; }
/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
.fc-time-grid .fc-event .fc-time:after {
content: attr(data-full); }
content: attr(data-full); }
/* Vertical Scroller & Containers
--------------------------------------------------------------------------------------------------*/
......@@ -159,18 +159,18 @@
.fc-scroller,
.fc-day-grid-container,
.fc-time-grid-container {
/* */
overflow: visible !important;
height: auto !important; }
/* */
overflow: visible !important;
height: auto !important; }
/* kill the horizontal border/padding used to compensate for scrollbars */
.fc-row {
border: 0 !important;
margin: 0 !important; }
border: 0 !important;
margin: 0 !important; }
/* Button Controls
--------------------------------------------------------------------------------------------------*/
.fc-button-group,
.fc button {
display: none;
/* don't display any button-related controls */ }
display: none;
/* don't display any button-related controls */ }
/* Color definitions */
/*!
* FullCalendar v3.9.0
* FullCalendar v3.10.0
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
......@@ -242,8 +242,8 @@ a[data-goto]:hover {
border-width: 0; }
.fc-row table {
/* don't put left/right border on anything within a fake row.
the outer tbody will worry about this */
/* don't put left/right border on anything within a fake row.
the outer tbody will worry about this */
border-left: 0 hidden transparent;
border-right: 0 hidden transparent;
/* no bottom borders on rows */
......@@ -583,7 +583,7 @@ a.fc-more:hover {
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent; }
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
/*
TODO: more distinction between this file and common.css
......
This diff is collapsed.
This diff is collapsed.
/*!
* FullCalendar v3.9.0
* FullCalendar v3.10.0
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
......@@ -75,7 +75,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 266);
/******/ return __webpack_require__(__webpack_require__.s = 270);
/******/ })
/************************************************************************/
/******/ ({
......@@ -110,19 +110,19 @@ exports.__extends = function (d, b) {
/***/ }),
/***/ 266:
/***/ 270:
/***/ (function(module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", { value: true });
var exportHooks = __webpack_require__(1);
var GcalEventSource_1 = __webpack_require__(267);
var GcalEventSource_1 = __webpack_require__(271);
exportHooks.EventSourceParser.registerClass(GcalEventSource_1.default);
exportHooks.GcalEventSource = GcalEventSource_1.default;
/***/ }),
/***/ 267:
/***/ 271:
/***/ (function(module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", { value: true });
......@@ -136,10 +136,10 @@ var GcalEventSource = /** @class */ (function (_super) {
}
GcalEventSource.parse = function (rawInput, calendar) {
var rawProps;
if (typeof rawInput === 'object') {
if (typeof rawInput === 'object') { // long form. might fail in applyManualStandardProps
rawProps = rawInput;
}
else if (typeof rawInput === 'string') {
else if (typeof rawInput === 'string') { // short form
rawProps = { url: rawInput }; // url will be parsed with parseGoogleCalendarId
}
if (rawProps) {
......@@ -153,7 +153,7 @@ var GcalEventSource = /** @class */ (function (_super) {
var requestParams = this.buildRequestParams(start, end, timezone);
var ajaxSettings = this.ajaxSettings || {};
var onSuccess = ajaxSettings.success;
if (!requestParams) {
if (!requestParams) { // could have failed
return fullcalendar_1.Promise.reject();
}
this.calendar.pushLoading();
......@@ -199,15 +199,20 @@ var GcalEventSource = /** @class */ (function (_super) {
if (url && gcalTimezone) {
url = injectQsComponent(url, 'ctz=' + gcalTimezone);
}
var extendedProperties = {};
if (typeof item.extendedProperties === 'object' &&
typeof item.extendedProperties.shared === 'object') {
extendedProperties = item.extendedProperties.shared;
}
return {
id: item.id,
title: item.summary,
start: item.start.dateTime || item.start.date,
end: item.end.dateTime || item.end.date,
url: url,
ical: '&summary=' + item.summary + '&timezone=' + gcalTimezone + '&dtstart=' + moment(item.start.dateTime || item.start.date).toJSON() + '&dtend=' + moment(item.end.dateTime || item.end.date).toJSON() + '&description=' + encodeURIComponent(item.description) + '&location=' + item.location + '&uid=' + item.id,
location: item.location,
description: item.description
description: item.description,
extendedProperties: extendedProperties
};
};
GcalEventSource.prototype.buildUrl = function () {
......@@ -322,4 +327,4 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
/***/ })
/******/ });
});
\ No newline at end of file
});
/*!
* FullCalendar v3.9.0
* FullCalendar v3.10.0
* Docs & License: https://fullcalendar.io/
* (c) 2018 Adam Shaw
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fullcalendar"),require("jquery")):"function"==typeof define&&define.amd?define(["fullcalendar","jquery"],t):"object"==typeof exports?t(require("fullcalendar"),require("jquery")):t(e.FullCalendar,e.jQuery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=266)}({1:function(t,r){t.exports=e},2:function(e,t){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};t.__extends=function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},266:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(267);o.EventSourceParser.registerClass(n.default),o.GcalEventSource=n.default},267:function(e,t,r){function o(e){var t;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}function n(e,t){return e.replace(/(\?.*?)?(#|$)/,function(e,r,o){return(r?r+"&":"?")+t+o})}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),l=r(3),i=r(1),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.parse=function(e,t){var r;return"object"==typeof e?r=e:"string"==typeof e&&(r={url:e}),!!r&&i.EventSource.parse.call(this,r,t)},t.prototype.fetch=function(e,t,r){var o=this,n=this.buildUrl(),a=this.buildRequestParams(e,t,r),u=this.ajaxSettings||{},c=u.success;return a?(this.calendar.pushLoading(),i.Promise.construct(function(e,t){l.ajax(l.extend({},i.JsonFeedEventSource.AJAX_DEFAULTS,u,{url:n,data:a,success:function(r,n,u){var s,p;o.calendar.popLoading(),r.error?(o.reportError("Google Calendar API: "+r.error.message,r.error.errors),t()):r.items&&(s=o.gcalItemsToRawEventDefs(r.items,a.timeZone),p=i.applyAll(c,o,[r,n,u]),l.isArray(p)&&(s=p),e(o.parseEventDefs(s)))},error:function(e,r,n){o.reportError("Google Calendar network failure: "+r,[e,n]),o.calendar.popLoading(),t()}}))})):i.Promise.reject()},t.prototype.gcalItemsToRawEventDefs=function(e,t){var r=this;return e.map(function(e){return r.gcalItemToRawEventDef(e,t)})},t.prototype.gcalItemToRawEventDef=function(e,t){var r=e.htmlLink||null;return r&&t&&(r=n(r,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:r,ical:"&summary="+e.summary+"&timezone="+t+"&dtstart="+moment(e.start.dateTime||e.start.date).toJSON()+"&dtend="+moment(e.end.dateTime||e.end.date).toJSON()+"&description="+encodeURIComponent(e.description)+"&location="+e.location+"&uid="+e.id,location:e.location,description:e.description}},t.prototype.buildUrl=function(){return t.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},t.prototype.buildRequestParams=function(e,t,r){var o,n=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return n?(e.hasZone()||(e=e.clone().utc().add(-1,"day")),t.hasZone()||(t=t.clone().utc().add(1,"day")),o=l.extend(this.ajaxSettings.data||{},{key:n,timeMin:e.format(),timeMax:t.format(),singleEvents:!0,maxResults:9999}),r&&"local"!==r&&(o.timeZone=r.replace(" ","_")),o):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},t.prototype.reportError=function(e,t){var r=this.calendar,o=r.opt("googleCalendarError"),n=t||[{message:e}];this.googleCalendarError&&this.googleCalendarError.apply(r,n),o&&o.apply(r,n),i.warn.apply(null,[e].concat(t||[]))},t.prototype.getPrimitive=function(){return this.googleCalendarId},t.prototype.applyManualStandardProps=function(e){var t=i.EventSource.prototype.applyManualStandardProps.apply(this,arguments),r=e.googleCalendarId;return null==r&&e.url&&(r=o(e.url)),null!=r&&(this.googleCalendarId=r,t)},t.prototype.applyMiscProps=function(e){this.ajaxSettings||(this.ajaxSettings={}),l.extend(this.ajaxSettings,e)},t.API_BASE="https://www.googleapis.com/calendar/v3/calendars",t}(i.EventSource);t.default=u,u.defineStandardProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0})},3:function(e,r){e.exports=t}})});
\ No newline at end of file
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fullcalendar"),require("jquery")):"function"==typeof define&&define.amd?define(["fullcalendar","jquery"],t):"object"==typeof exports?t(require("fullcalendar"),require("jquery")):t(e.FullCalendar,e.jQuery)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=270)}({1:function(t,r){t.exports=e},2:function(e,t){var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};t.__extends=function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}},270:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(271);o.EventSourceParser.registerClass(n.default),o.GcalEventSource=n.default},271:function(e,t,r){function o(e){var t;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}function n(e,t){return e.replace(/(\?.*?)?(#|$)/,function(e,r,o){return(r?r+"&":"?")+t+o})}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),l=r(3),i=r(1),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.parse=function(e,t){var r;return"object"==typeof e?r=e:"string"==typeof e&&(r={url:e}),!!r&&i.EventSource.parse.call(this,r,t)},t.prototype.fetch=function(e,t,r){var o=this,n=this.buildUrl(),a=this.buildRequestParams(e,t,r),u=this.ajaxSettings||{},s=u.success;return a?(this.calendar.pushLoading(),i.Promise.construct(function(e,t){l.ajax(l.extend({},i.JsonFeedEventSource.AJAX_DEFAULTS,u,{url:n,data:a,success:function(r,n,u){var c,p;o.calendar.popLoading(),r.error?(o.reportError("Google Calendar API: "+r.error.message,r.error.errors),t()):r.items&&(c=o.gcalItemsToRawEventDefs(r.items,a.timeZone),p=i.applyAll(s,o,[r,n,u]),l.isArray(p)&&(c=p),e(o.parseEventDefs(c)))},error:function(e,r,n){o.reportError("Google Calendar network failure: "+r,[e,n]),o.calendar.popLoading(),t()}}))})):i.Promise.reject()},t.prototype.gcalItemsToRawEventDefs=function(e,t){var r=this;return e.map(function(e){return r.gcalItemToRawEventDef(e,t)})},t.prototype.gcalItemToRawEventDef=function(e,t){var r=e.htmlLink||null;r&&t&&(r=n(r,"ctz="+t));var o={};return"object"==typeof e.extendedProperties&&"object"==typeof e.extendedProperties.shared&&(o=e.extendedProperties.shared),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:r,location:e.location,description:e.description,extendedProperties:o}},t.prototype.buildUrl=function(){return t.API_BASE+"/"+encodeURIComponent(this.googleCalendarId)+"/events?callback=?"},t.prototype.buildRequestParams=function(e,t,r){var o,n=this.googleCalendarApiKey||this.calendar.opt("googleCalendarApiKey");return n?(e.hasZone()||(e=e.clone().utc().add(-1,"day")),t.hasZone()||(t=t.clone().utc().add(1,"day")),o=l.extend(this.ajaxSettings.data||{},{key:n,timeMin:e.format(),timeMax:t.format(),singleEvents:!0,maxResults:9999}),r&&"local"!==r&&(o.timeZone=r.replace(" ","_")),o):(this.reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),null)},t.prototype.reportError=function(e,t){var r=this.calendar,o=r.opt("googleCalendarError"),n=t||[{message:e}];this.googleCalendarError&&this.googleCalendarError.apply(r,n),o&&o.apply(r,n),i.warn.apply(null,[e].concat(t||[]))},t.prototype.getPrimitive=function(){return this.googleCalendarId},t.prototype.applyManualStandardProps=function(e){var t=i.EventSource.prototype.applyManualStandardProps.apply(this,arguments),r=e.googleCalendarId;return null==r&&e.url&&(r=o(e.url)),null!=r&&(this.googleCalendarId=r,t)},t.prototype.applyMiscProps=function(e){this.ajaxSettings||(this.ajaxSettings={}),l.extend(this.ajaxSettings,e)},t.API_BASE="https://www.googleapis.com/calendar/v3/calendars",t}(i.EventSource);t.default=u,u.defineStandardProps({url:!1,googleCalendarId:!1,googleCalendarApiKey:!0,googleCalendarError:!0})},3:function(e,r){e.exports=t}})});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -36,7 +36,7 @@
"installer-name": "me_google_calender"
},
"branch-alias": {
"dev-master": "4.6.x-dev"
"dev-master": "4.8.x-dev"
}
}
}
......@@ -14,7 +14,7 @@ $EM_CONF[$_EXTKEY] = [
'title' => 'Google Calendar',
'description' => 'Includes the jQuery Plugin FullCalendar, which generates a skinable calendar with different views (month, week, day, week list, day list etc.) from Google Calendar XML Feed(s) - now with extbase/fluid.',
'category' => 'plugin',
'version' => '4.6.4',
'version' => '4.7.0',
'state' => 'stable',
'author' => 'Alexander Grein',
'author_email' => 'alexander.grein@gmail.com',
......@@ -23,7 +23,7 @@ $EM_CONF[$_EXTKEY] = [
[
'depends' =>
[
'typo3' => '6.2.14-9.99.99',
'typo3' => '6.2.14-9.5.99',
],
'conflicts' =>
[],
......