Permalink
Browse files

v1.0.1

  • Loading branch information...
1 parent f302a09 commit 86bc0dfa1711d3d60bed9ba45c74f7cca917b98b @lx-berlin committed Oct 8, 2012
View
@@ -1,8 +1,3 @@
-> do not use this module. its not yet working!!
-
-
-----------
-
# silverstripe-flexslider
A module for Silverstripe 3.0 that uses the [FlexSlider 2 library](https://github.com/woothemes/FlexSlider) to create sliders. Sliders can be created from within the cms or by instantiating a new FlexSlider Object in php.
@@ -63,7 +58,7 @@ public function productSlider() {
// optional
$productSlider->setOptions(array("animation" => "slide",
"easing" => "linear",
- "direction" => "vertical",
+ "direction" => "horizontal",
"reverse" => 0,
"animationLoop" => 0,
"slideshow" => 0,
@@ -81,5 +76,8 @@ In your template file you just need to call `$productSlider`
## Changelog
-v1.0 (2012-10-06)
-initial version
+v1.0.1 (2012-10-08) :
+Bugfixes, resetted some CSS values that is used in the simple-theme
+
+v1.0.0 (2012-10-06) :
+initial version
View
@@ -35,8 +35,14 @@ class FlexSlider extends DataObject {
public static $has_many = array('FlexSlides' => 'FlexSlide');
+ static $defaults = array(
+ 'slideshowSpeed' => 7000,
+ 'animationSpeed' => 600,
+ );
+
// defaults
public function populateDefaults() {
+ parent::populateDefaults();
$this->animation = "slide";
$this->easing = "linear";
$this->direction = "horizontal";
@@ -47,7 +53,6 @@ public function populateDefaults() {
$this->animationSpeed = 600;
$this->randomize = 0;
$this->showControlNav = 1;
- parent::populateDefaults();
}
// column names of grid (translated to the current admin language)
@@ -90,10 +95,15 @@ public function getCMSFields() {
$field_direction = new Dropdownfield("direction", _t("FlexSlider.direction"), $directions);
$field_easing = new Dropdownfield("easing", _t("FlexSlider.easingType"), $easingTypes);
$field_easing->setRightTitle(_t("FlexSlider.easingTypeDescription"));
- $field_slideshowSpeed = new NumericField("slideshowSpeed", _t("FlexSlider.slideshowSpeed"));
+
+ $field_slideshowSpeedvalue = (!$this->ID) ? FlexSlider::$defaults["slideshowSpeed"] : $this->slideshowSpeed;
+ $field_slideshowSpeed = new NumericField("slideshowSpeed", _t("FlexSlider.slideshowSpeed"),$field_slideshowSpeedvalue);
$field_slideshowSpeed->setRightTitle(_t("FlexSlider.slideshowSpeedDescription"));
- $field_animationSpeed = new NumericField("animationSpeed", _t("FlexSlider.animationSpeed"));
+
+ $field_animationSpeedvalue = (!$this->ID) ? FlexSlider::$defaults["animationSpeed"] : $this->animationSpeed;
+ $field_animationSpeed = new NumericField("animationSpeed", _t("FlexSlider.animationSpeed"), $field_animationSpeedvalue);
$field_animationSpeed->setRightTitle(_t("FlexSlider.animationSpeedDescription"));
+
$field_randomize = new CheckboxField("randomize", _t("FlexSlider.randomize"));
$field_showControlNav = new CheckboxField("showControlNav", _t("FlexSlider.showControlNav"));
View
@@ -11,7 +11,7 @@
.flexslider .flex-caption { margin: 0px; }
.flexslider .flex-prev { border: none; }
.flexslider .flex-next { border: none; }
-.flexslider .slides img { max-width: 100%; border: 0px none; margin: 0px; }
+.flexslider .slides img { max-width: 100%; border: 0px none; margin: 0px; float: none; }
/**
* Additional Styles
@@ -22,7 +22,7 @@
/* FlexSlider Necessary Styles
*********************************/
.flexslider {margin: 0; padding: 0;}
-.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden; position: relative; } /* Hide the slides before the JS is loaded. Avoids image jumping */
+.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides img {width: 100%; display: block;}
.flex-pauseplay span {text-transform: capitalize;}
@@ -46,6 +46,7 @@ html[xmlns] .slides {display: block;}
.carousel li {margin-right: 5px}
+
/* Direction Nav */
.flex-direction-nav {*height: 0;}
.flex-direction-nav a {width: 30px; height: 30px; margin: -20px 0 0; display: block; background: url(images/bg_direction_nav.png) no-repeat 0 0; position: absolute; top: 50%; cursor: pointer; text-indent: -9999px; opacity: 0; -webkit-transition: all .3s ease;}
Oops, something went wrong.

0 comments on commit 86bc0df

Please sign in to comment.