Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFACTOR update carousel class to fs-carousel #177

Merged
merged 1 commit into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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