diff --git a/config/module.config.php b/config/module.config.php index 6a51b9b..dd3b1b5 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -24,7 +24,7 @@ return [ 'perPage' => 1, 'loop' => true, 'draggable' => true, - 'subTitle' => '', + 'title' => '', 'renderSourceLink' => true, 'autoSlide' => false, 'autoSlideInt' => 5000, diff --git a/src/Form/CarouselBlockForm.php b/src/Form/CarouselBlockForm.php index 1921730..3ae9254 100644 --- a/src/Form/CarouselBlockForm.php +++ b/src/Form/CarouselBlockForm.php @@ -108,7 +108,7 @@ class CarouselBlockForm extends Form ]); $this->add([ - 'name' => 'o:block[__blockIndex__][o:data][subTitle]', + 'name' => 'o:block[__blockIndex__][o:data][title]', 'type' => Element\Text::class, 'options' => [ 'label' => 'Sub-title', diff --git a/src/Site/BlockLayout/Carousel.php b/src/Site/BlockLayout/Carousel.php index b6883a5..e41b2d9 100644 --- a/src/Site/BlockLayout/Carousel.php +++ b/src/Site/BlockLayout/Carousel.php @@ -34,7 +34,7 @@ class Carousel extends AbstractBlockLayout } public function getLabel() { - return 'SimpleCarousel'; + return 'Simple carousel'; } public function form(PhpRenderer $view, SiteRepresentation $site, @@ -45,12 +45,12 @@ class Carousel extends AbstractBlockLayout ? $block->data() + $this->defaultSettings : $this->defaultSettings; $form->setData([ + 'o:block[__blockIndex__][o:data][title]' => $data['title'], 'o:block[__blockIndex__][o:data][height]' => $data['height'], 'o:block[__blockIndex__][o:data][duration]' => $data['duration'], 'o:block[__blockIndex__][o:data][perPage]' => $data['perPage'], 'o:block[__blockIndex__][o:data][loop]' => $data['loop'], 'o:block[__blockIndex__][o:data][draggable]' => $data['draggable'], - 'o:block[__blockIndex__][o:data][subTitle]' => $data['subTitle'], 'o:block[__blockIndex__][o:data][autoSlide]' => $data['autoSlide'], 'o:block[__blockIndex__][o:data][autoSlideInt]' => $data['autoSlideInt'], 'o:block[__blockIndex__][o:data][wrapStyle]' => $data['wrapStyle'], @@ -100,7 +100,7 @@ class Carousel extends AbstractBlockLayout 'perPage' => $block->dataValue('perPage'), 'loop' => $block->dataValue('loop'), 'draggable' => $block->dataValue('draggable'), - 'subTitle' => $block->dataValue('subTitle'), + 'title' => $block->dataValue('title'), 'images' => $images, 'autoSlide' => $block->dataValue('autoSlide'), 'autoSlideInt' => $block->dataValue('autoSlideInt'), diff --git a/view/common/block-layout/simple-carousel.phtml b/view/common/block-layout/simple-carousel.phtml index b4511bc..3b3cbe0 100644 --- a/view/common/block-layout/simple-carousel.phtml +++ b/view/common/block-layout/simple-carousel.phtml @@ -2,9 +2,6 @@ headLink()->appendStylesheet($this->assetUrl('css/carousel.css', 'SimpleCarousel')); $this->headScript()->appendFile($this->assetUrl('js/siema.min.js', 'SimpleCarousel')); - - $title = false; - $caret = sprintf('', $this->assetUrl('caret.png', 'SimpleCarousel')); $caret_r = sprintf('', $this->assetUrl('caret.png', 'SimpleCarousel')); ?> @@ -41,10 +38,11 @@
- -
- -
+ + +
+ +
@@ -71,9 +69,6 @@ $(document).ready(function() { let caret_r = ''; $('#siema-ui').append(caret); - - $('#siema-ui').append(''); - $('#siema-ui').append(caret_r); $('.caret#left').click(function () {siema.prev()});