Skip to content

Commit

Permalink
Merge pull request #12 from qdii/master
Browse files Browse the repository at this point in the history
integrate extended renderers
  • Loading branch information
philippfrenzel committed Mar 9, 2015
2 parents 4368859 + 24d24fb commit 1bb9c59
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions yii2fullcalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ class yii2fullcalendar extends elWidget
*/
private $_pluginName = 'fullCalendar';

/**
* The javascript function to us as en eventRender callback
* @var string the javascript code that implements the eventRender function
*/
public $eventRender = "";

/**
* The javascript function to us as en eventAfterRender callback
* @var string the javascript code that implements the eventAfterRender function
*/
public $eventAfterRender = "";

/**
* The javascript function to us as en eventAfterAllRender callback
* @var string the javascript code that implements the eventAfterAllRender function
*/
public $eventAfterAllRender = "";

/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
Expand Down Expand Up @@ -183,6 +201,15 @@ protected function getClientOptions()
$options['loading'] = new JsExpression("function(isLoading, view ) {
$('#{$id}').find('.fc-loading').toggle(isLoading);
}");
if ($this->eventRender){
$options['eventRender'] = new JsExpression($this->eventRender);
}
if ($this->eventAfterRender){
$options['eventAfterRender'] = new JsExpression($this->eventAfterRender);
}
if ($this->eventAfterAllRender){
$options['eventAfterAllRender'] = new JsExpression($this->eventAfterAllRender);
}
$options = array_merge($options, $this->clientOptions);
return Json::encode($options);
}
Expand Down

0 comments on commit 1bb9c59

Please sign in to comment.