diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 2b6ccd4..cfceee4 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -201,7 +201,7 @@ clock.setCountdown(true); clock.start(); "; - $this->registerJs($js,View::POS_LOAD) + $this->registerJs($js,View::POS_READY) ?> diff --git a/frontend/views/event/_objects.php b/frontend/views/event/_objects.php index 3f09c4d..84ad4d3 100755 --- a/frontend/views/event/_objects.php +++ b/frontend/views/event/_objects.php @@ -40,7 +40,7 @@ FlipclockAsset::register($this); clock.setTime(".(strtotime($model->end_at) - strtotime(date('Y-m-d H:i:s')))."); clock.setCountdown(true); clock.start();"; - $this->registerJs($js,View::POS_LOAD) ?> + $this->registerJs($js,View::POS_READY) ?> diff --git a/frontend/views/event/show.php b/frontend/views/event/show.php index 5dd2f7a..2d77191 100755 --- a/frontend/views/event/show.php +++ b/frontend/views/event/show.php @@ -52,7 +52,7 @@ $this->params['seo']['h1'] = $this->title; clock.setTime(".(strtotime($model->end_at) - strtotime(date('Y-m-d H:i:s')))."); clock.setCountdown(true); clock.start();"; - $this->registerJs($js,View::POS_LOAD) ?> + $this->registerJs($js,View::POS_READY) ?>
primaryKey ."'), { + clock = new FlipClock($('.clock_". $image->primaryKey ."'), { clockFace: 'DailyCounter', language: 'ru', classes: { @@ -39,7 +39,7 @@ FlipclockAsset::register($this); clock.setTime(".(strtotime($image->end_at) - strtotime(date('Y-m-d H:i:s')))."); clock.setCountdown(true); clock.start();"; - $this->registerJs($js,View::POS_LOAD) ?> + $this->registerJs($js,View::POS_READY) ?>