@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | $speed = 7000; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - // only call custom script if page has Slides |
|
| 43 | - if (Object::has_extension($this->owner->data()->ClassName, 'FlexSlider')) { |
|
| 44 | - if($this->owner->data()->Slides()->exists()){ |
|
| 45 | - Requirements::customScript(" |
|
| 42 | + // only call custom script if page has Slides |
|
| 43 | + if (Object::has_extension($this->owner->data()->ClassName, 'FlexSlider')) { |
|
| 44 | + if($this->owner->data()->Slides()->exists()){ |
|
| 45 | + Requirements::customScript(" |
|
| 46 | 46 | (function($) { |
| 47 | 47 | $(document).ready(function(){ |
| 48 | 48 | $('.flexslider').flexslider({ |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | }); |
| 66 | 66 | }); |
| 67 | 67 | }(jQuery));"); |
| 68 | - } |
|
| 69 | - } |
|
| 68 | + } |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | 71 | } |
| 72 | 72 | |
@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | new GridFieldDeleteAction(), |
| 45 | 45 | new GridFieldDetailForm() |
| 46 | 46 | ); |
| 47 | - if (class_exists('GridFieldBulkManager')) { |
|
| 48 | - $gridFieldConfig->addComponent(new GridFieldBulkManager()); |
|
| 49 | - $gridFieldConfig->addComponent(new GridFieldBulkUpload()); |
|
| 50 | - } |
|
| 47 | + if (class_exists('GridFieldBulkManager')) { |
|
| 48 | + $gridFieldConfig->addComponent(new GridFieldBulkManager()); |
|
| 49 | + $gridFieldConfig->addComponent(new GridFieldBulkUpload()); |
|
| 50 | + } |
|
| 51 | 51 | if (class_exists('GridFieldSortableRows')) $gridFieldConfig->addComponent(new GridFieldSortableRows("SortOrder")); |
| 52 | 52 | |
| 53 | 53 | $SlidesField = GridField::create("Slides", "Slides", $this->owner->Slides()->sort('SortOrder'), $gridFieldConfig); |
@@ -55,17 +55,17 @@ discard block |
||
| 55 | 55 | (Permission::check('ADMIN')) ? $width = TextField::create('SliderWidth', 'Image Width') : $width = HiddenField::create('SliderWidth'); |
| 56 | 56 | (Permission::check('ADMIN')) ? $height = TextField::create('SliderHeight', 'Image Height') : $height = HiddenField::create('SliderHeight'); |
| 57 | 57 | |
| 58 | - // add FlexSlider, width and height |
|
| 59 | - $fields->addFieldsToTab("Root.Slides", array( |
|
| 60 | - $SlidesField, |
|
| 61 | - HeaderField::create('Config', 'Configuration', 3), |
|
| 62 | - CheckboxField::create('Animate', 'Animate automatically'), |
|
| 63 | - DropdownField::create('Animation', 'Animation option', $this->owner->dbObject('Animation')->enumValues()), |
|
| 64 | - CheckboxField::create('Loop', 'Loop the carousel'), |
|
| 65 | - $width, |
|
| 66 | - $height, |
|
| 67 | - CheckboxField::create('ThumbnailNav')->setTitle('Thumbnail Navigation') |
|
| 68 | - )); |
|
| 58 | + // add FlexSlider, width and height |
|
| 59 | + $fields->addFieldsToTab("Root.Slides", array( |
|
| 60 | + $SlidesField, |
|
| 61 | + HeaderField::create('Config', 'Configuration', 3), |
|
| 62 | + CheckboxField::create('Animate', 'Animate automatically'), |
|
| 63 | + DropdownField::create('Animation', 'Animation option', $this->owner->dbObject('Animation')->enumValues()), |
|
| 64 | + CheckboxField::create('Loop', 'Loop the carousel'), |
|
| 65 | + $width, |
|
| 66 | + $height, |
|
| 67 | + CheckboxField::create('ThumbnailNav')->setTitle('Thumbnail Navigation') |
|
| 68 | + )); |
|
| 69 | 69 | |
| 70 | 70 | } |
| 71 | 71 | |