/**
  * Registers the FullCalendar javascript assets and builds the requiered js  for the widget and the related events
  */
 protected function registerPlugin()
 {
     $id = $this->options['id'];
     $view = $this->getView();
     /** @var \yii\web\AssetBundle $assetClass */
     LocalAsset::register($view);
     CoreAsset::register($view);
     $cleanOptions = $this->getClientOptions();
     $js[] = "var dynaT{$id} = jQuery('#{$id}').dynatable({$cleanOptions});";
     $view->registerJs(implode("\n", $js), View::POS_READY);
 }
Example #2
0
 /**
  * Registers the FullCalendar javascript assets and builds the requiered js  for the widget and the related events
  */
 protected function registerPlugin()
 {
     $id = $this->options['id'];
     $view = $this->getView();
     /** @var \yii\web\AssetBundle $assetClass */
     LocalAsset::register($view);
     CoreAsset::register($view);
     $cleanOptions = $this->getClientOptions();
     $js[] = "var dynTable{$id} = jQuery('#{$id}').dynatable({$cleanOptions});";
     if (!is_null($this->EventAjaxSuccess)) {
         $eventSuccess = $this->EventAjaxSuccess;
         $js[] = "dynTable{$id}.bind('dynatable:ajax:success',{$eventSuccess});";
     }
     $view->registerJs(implode("\n", $js), View::POS_READY);
 }