Skip to content

Commit

Permalink
REFACTOR update carousel class to fs-carousel
Browse files Browse the repository at this point in the history
resolves dynamic#139
  • Loading branch information
muskie9 committed May 23, 2019
1 parent 0767afb commit f3562a0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions css/silverstripe-flexslider.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
border: none;
}
.slideshow .flexslider ul,
.slideshow .carousel ul{
.slideshow .fs-carousel ul{
margin: 0;
}
.slideshow .flexslider ul li,
.slideshow .carousel ul li{
.slideshow .fs-carousel ul li{
list-style-type: none;
margin: 0;
}
.slideshow .flexslider ol,
.slideshow .carousel ol{
.slideshow .fs-carousel ol{
list-style-type: none;
margin: 0;
}
.slideshow .flexslider img, .slideshow .carousel img {
.slideshow .flexslider img, .slideshow .fs-carousel img {
border: 0;
}
.flexslider .slide {
Expand All @@ -27,22 +27,22 @@
.slideshow .flex-direction-nav a {
overflow: visible;
}
.slideshow a.flex-next:hover, .carousel a.flex-next:hover {border-bottom: none;}
.slideshow a.flex-next:hover, .fs-carousel a.flex-next:hover {border-bottom: none;}

.slideshow .carousel {position: relative;}
.slideshow .carousel ul.slides li img {cursor: pointer; width: 100%; height: auto; opacity: 0.9;}
.slideshow .carousel ul.slides li img:hover {opacity: 1;}
.slideshow .carousel:hover .flex-direction-nav .flex-prev {
.slideshow .fs-carousel {position: relative;}
.slideshow .fs-carousel ul.slides li img {cursor: pointer; width: 100%; height: auto; opacity: 0.9;}
.slideshow .fs-carousel ul.slides li img:hover {opacity: 1;}
.slideshow .fs-carousel:hover .flex-direction-nav .flex-prev {
opacity: 0.7;
left: 10px;
}
.slideshow .carousel:hover .flex-direction-nav .flex-prev:hover {
.slideshow .fs-carousel:hover .flex-direction-nav .flex-prev:hover {
opacity: 1;
}
.slideshow .carousel:hover .flex-direction-nav .flex-next {
.slideshow .fs-carousel:hover .flex-direction-nav .flex-next {
opacity: 0.7;
right: 10px;
}
.slideshow .carousel:hover .flex-direction-nav .flex-next:hover {
.slideshow .fs-carousel:hover .flex-direction-nav .flex-next:hover {
opacity: 1;
}
6 changes: 3 additions & 3 deletions src/ORM/FlexSlider.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function contentcontrollerInit()
public function getCustomScript()
{
// Flexslider options
$sync = ($this->owner->ThumbnailNav == true) ? "sync: '.carousel:eq('+index+')'," : '';
$sync = ($this->owner->ThumbnailNav == true) ? "sync: '.fs-carousel:eq('+index+')'," : '';

$before = $this->owner->hasMethod('flexSliderBeforeAction')
? $this->owner->flexSliderBeforeAction()
Expand All @@ -208,8 +208,8 @@ public function getCustomScript()
$(document).ready(function(){
jQuery('.flexslider').each(function(index){
if(jQuery('.carousel').eq(index).length) {
jQuery('.carousel').eq(index).flexslider({
if(jQuery('.fs-carousel').eq(index).length) {
jQuery('.fs-carousel').eq(index).flexslider({
slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean() . ",
animation: 'slide',
animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean() . ",
Expand Down
2 changes: 1 addition & 1 deletion templates/Includes/FlexSlider.ss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ul>
</div>
<% if $ThumbnailNav && $SlideShow.Count > 1 %>
<div class="carousel">
<div class="fs-carousel">
<ul class="slides">
<% loop $SlideShow %>
<li>
Expand Down

0 comments on commit f3562a0

Please sign in to comment.