Skip to content

Commit

Permalink
Merge pull request #25 from ancarebeca/fullcalendar_updated_version
Browse files Browse the repository at this point in the history
Updated full calendar version & small refactor
  • Loading branch information
ancarebeca authored Feb 5, 2017
2 parents aa083d5 + 505c5f7 commit c8ac747
Show file tree
Hide file tree
Showing 90 changed files with 676 additions and 225 deletions.
4 changes: 2 additions & 2 deletions Event/CalendarEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace AncaRebeca\FullCalendarBundle\Event;

use AncaRebeca\FullCalendarBundle\Model\EventInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\Event as EventDispatcher;

class CalendarEvent extends Event
class CalendarEvent extends EventDispatcher
{
const SET_DATA = 'fullcalendar.set_data';

Expand Down
2 changes: 1 addition & 1 deletion Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace AncaRebeca\FullCalendarBundle\Model;

abstract class Event implements EventInterface
class Event implements EventInterface
{
/**
* @var integer
Expand Down
196 changes: 0 additions & 196 deletions Model/EventInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,205 +10,9 @@ interface EventInterface
*/
public function __construct($title, \DateTime $start);

/**
* @return int
*/
public function getId();

/**
* @param int $id
*/
public function setId($id);

/**
* @return string
*/
public function getTitle();

/**
* @param string $title
*/
public function setTitle($title);

/**
* @return boolean
*/
public function isAllDay();

/**
* @param boolean $allDay
*/
public function setAllDay($allDay);

/**
* @return \DateTime
*/
public function getStartDate();

/**
* @param \DateTime $start
*/
public function setStartDate(\DateTime $start);

/**
* @return \DateTime
*/
public function getEndDate();

/**
* @param \DateTime $end
*/
public function setEndDate(\DateTime $end);

/**
* @return string
*/
public function getUrl();

/**
* @param string $url
*/
public function setUrl($url);

/**
* @return string
*/
public function getClassName();

/**
* @param string $className
*/
public function setClassName($className);

/**
* @return boolean
*/
public function isEditable();

/**
* @param boolean $editable
*/
public function setEditable($editable);

/**
* @return boolean
*/
public function isStartEditable();

/**
* @param boolean $startEditable
*/
public function setStartEditable($startEditable);

/**
* @return boolean
*/
public function isDurationEditable();

/**
* @param boolean $durationEditable
*/
public function setDurationEditable($durationEditable);

/**
* @return string
*/
public function getRendering();

/**
* @param string $rendering
*/
public function setRendering($rendering);

/**
* @return boolean
*/
public function isOverlap();

/**
* @param boolean $overlap
*/
public function setOverlap($overlap);

/**
* @return int
*/
public function getConstraint();

/**
* @param int $constraint
*/
public function setConstraint($constraint);

/**
* @return string
*/
public function getSource();

/**
* @param string $source
*/
public function setSource($source);

/**
* @return string
*/
public function getColor();

/**
* @param string $color
*/
public function setColor($color);

/**
* @return string
*/
public function getBackgroundColor();

/**
* @param string $backgroundColor
*/
public function setBackgroundColor($backgroundColor);

/**
* @return string
*/
public function getTextColor();

/**
* @param string $textColor
*/
public function setTextColor($textColor);

/**
* @return array
*/
public function toArray();

/**
* @param $name
* @param $value
*
* @return mixed
*/
public function setCustomField($name, $value);

/**
* @param $name
*
* @return mixed
*/
public function getCustomFieldValue($name);

/**
* @return mixed
*/
public function getCustomFields();

/**
* @param $name
*
* @return mixed
*/
public function removeCustomField($name);
}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

[![Build Status](https://travis-ci.org/ancarebeca/FullCalendarBundle.svg)](https://travis-ci.org/ancarebeca/FullCalendarBundle)

This bundle allow you to integrate [FullCalendar.js](http://fullcalendar.io/) library in your Symfony2.
This bundle allow you to integrate [FullCalendar.js](http://fullcalendar.io/) library in your Symfony3.

## Requirements
* FullCalendar.js v2.3.2
* FullCalendar.js v3.1.0
* Symfony v3.1+
* PHP v5.5+
* PHPSpec
Expand Down Expand Up @@ -80,7 +80,7 @@ This listener is called when the event 'fullcalendar.set_data' is launched, for
namespace AppBundle\Listener;

use AncaRebeca\FullCalendarBundle\Event\CalendarEvent;
use AppBundle\Entity\CalendarEvent as Event;
use AppBundle\Entity\CalendarEvent as MyCustomEvent;

class LoadDataListener
{
Expand All @@ -97,8 +97,8 @@ class LoadDataListener

//You may want do a custom query to populate the events

$calendarEvent->addEvent(new Event('Event Title 1', new \DateTime()));
$calendarEvent->addEvent(new Event('Event Title 2', new \DateTime()));
$calendarEvent->addEvent(new MyCustomEvent('Event Title 1', new \DateTime()));
$calendarEvent->addEvent(new MyCustomEvent('Event Title 2', new \DateTime()));
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions Resources/public/css/fullcalendar/fullcalendar.min.css
100755 → 100644

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions Resources/public/css/fullcalendar/fullcalendar.print.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions Resources/public/js/fullcalendar/fullcalendar.min.js
100755 → 100644

Large diffs are not rendered by default.

22 changes: 9 additions & 13 deletions Resources/public/js/fullcalendar/gcal.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* FullCalendar v2.3.2 Google Calendar Plugin
* FullCalendar v3.1.0 Google Calendar Plugin
* Docs & License: http://fullcalendar.io/
* (c) 2015 Adam Shaw
* (c) 2016 Adam Shaw
*/

(function(factory) {
Expand All @@ -18,11 +18,11 @@


var API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
var fc = $.fullCalendar;
var applyAll = fc.applyAll;
var FC = $.fullCalendar;
var applyAll = FC.applyAll;


fc.sourceNormalizers.push(function(sourceOptions) {
FC.sourceNormalizers.push(function(sourceOptions) {
var googleCalendarId = sourceOptions.googleCalendarId;
var url = sourceOptions.url;
var match;
Expand Down Expand Up @@ -64,7 +64,7 @@ fc.sourceNormalizers.push(function(sourceOptions) {
});


fc.sourceFetchers.push(function(sourceOptions, start, end, timezone) {
FC.sourceFetchers.push(function(sourceOptions, start, end, timezone) {
if (sourceOptions.googleCalendarId) {
return transformOptions(sourceOptions, start, end, timezone, this); // `this` is the calendar
}
Expand All @@ -80,17 +80,13 @@ function transformOptions(sourceOptions, start, end, timezone, calendar) {

function reportError(message, apiErrorObjs) {
var errorObjs = apiErrorObjs || [ { message: message } ]; // to be passed into error handlers
var consoleObj = window.console;
var consoleWarnFunc = consoleObj ? (consoleObj.warn || consoleObj.log) : null;

// call error handlers
(sourceOptions.googleCalendarError || $.noop).apply(calendar, errorObjs);
(calendar.options.googleCalendarError || $.noop).apply(calendar, errorObjs);

// print error to debug console
if (consoleWarnFunc) {
consoleWarnFunc.apply(consoleObj, [ message ].concat(apiErrorObjs || []));
}
FC.warn.apply(null, [ message ].concat(apiErrorObjs || []));
}

if (!apiKey) {
Expand Down Expand Up @@ -140,10 +136,10 @@ function transformOptions(sourceOptions, start, end, timezone, calendar) {
}
else if (data.items) {
$.each(data.items, function(i, entry) {
var url = entry.htmlLink;
var url = entry.htmlLink || null;

// make the URLs for each event show times in the correct timezone
if (timezoneArg) {
if (timezoneArg && url !== null) {
url = injectQsComponent(url, 'ctz=' + timezoneArg);
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions Resources/public/js/fullcalendar/lib/lib/jquery-ui.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Resources/public/js/fullcalendar/lib/lib/jquery.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit c8ac747

Please sign in to comment.