diff --git a/frontend/assets/AppAsset.php b/frontend/assets/AppAsset.php index 9b8c55b..2ec62a7 100755 --- a/frontend/assets/AppAsset.php +++ b/frontend/assets/AppAsset.php @@ -31,13 +31,13 @@ class AppAsset extends AssetBundle public $depends = [ 'yii\web\JqueryAsset', 'sersid\owlcarousel\Asset', - 'frontend\assets\FlipclockAsset', 'yii\bootstrap\BootstrapPluginAsset', ]; - - public function init() { - $this->jsOptions['position'] = View::POS_END; - parent::init(); - } + + public $jsOptions = [ + 'position' => View::POS_END + ]; + + } diff --git a/frontend/assets/FlipclockAsset.php b/frontend/assets/FlipclockAsset.php index 5a26f26..e5ab28c 100755 --- a/frontend/assets/FlipclockAsset.php +++ b/frontend/assets/FlipclockAsset.php @@ -25,4 +25,9 @@ class FlipclockAsset extends AssetBundle public $jsOptions = array( 'position' => \yii\web\View::POS_END ); + + public $depends = [ + 'yii\web\JqueryAsset' + + ]; } diff --git a/frontend/views/event/show.php b/frontend/views/event/show.php index 1319b2c..92d3921 100755 --- a/frontend/views/event/show.php +++ b/frontend/views/event/show.php @@ -3,9 +3,10 @@ * @var $this View */ +use frontend\assets\FlipclockAsset; use yii\web\View; use yii\widgets\ListView; - +FlipclockAsset::register($this); ?>