@@ -18,37 +18,37 @@ discard block |
||
18 | 18 | } else { |
19 | 19 | $loop = 'false'; |
20 | 20 | } |
21 | - if($this->owner->ThumbnailNav==true){ |
|
21 | + if ($this->owner->ThumbnailNav==true) { |
|
22 | 22 | $sync = "sync: '#carousel',"; |
23 | - }else{ |
|
23 | + } else { |
|
24 | 24 | $sync = ""; |
25 | 25 | } |
26 | - if(method_exists($this->owner->ClassName, 'flexSliderBeforeAction')){ |
|
26 | + if (method_exists($this->owner->ClassName, 'flexSliderBeforeAction')) { |
|
27 | 27 | $before = $this->owner->flexSliderBeforeAction(); |
28 | - }else{ |
|
28 | + } else { |
|
29 | 29 | $before = "function(){}"; |
30 | 30 | } |
31 | - if(method_exists($this->owner->ClassName, 'flexSliderAfterAction')){ |
|
31 | + if (method_exists($this->owner->ClassName, 'flexSliderAfterAction')) { |
|
32 | 32 | $after = $this->owner->flexSliderAfterAction(); |
33 | - }else{ |
|
33 | + } else { |
|
34 | 34 | $after = "function(){}"; |
35 | 35 | } |
36 | - if(method_exists($this->owner->ClassName, 'setFlexSliderSpeed')){ |
|
36 | + if (method_exists($this->owner->ClassName, 'setFlexSliderSpeed')) { |
|
37 | 37 | $speed = $this->owner->setFlexSliderSpeed(); |
38 | - }else{ |
|
38 | + } else { |
|
39 | 39 | $speed = 7000; |
40 | 40 | } |
41 | 41 | |
42 | 42 | // only call custom script if page has Slides |
43 | 43 | if (Object::has_extension($this->owner->data()->ClassName, 'FlexSlider')) { |
44 | - if($this->owner->data()->Slides()->exists()){ |
|
44 | + if ($this->owner->data()->Slides()->exists()) { |
|
45 | 45 | Requirements::customScript(" |
46 | 46 | (function($) { |
47 | 47 | $(document).ready(function(){ |
48 | 48 | $('.flexslider').flexslider({ |
49 | - slideshow: " . $animate . ", |
|
50 | - animation: '" . $this->owner->Animation . "', |
|
51 | - animationLoop: " . $loop . ", |
|
49 | + slideshow: " . $animate.", |
|
50 | + animation: '" . $this->owner->Animation."', |
|
51 | + animationLoop: " . $loop.", |
|
52 | 52 | controlNav: true, |
53 | 53 | directionNav: true, |
54 | 54 | prevText: '', |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | }, |
62 | 62 | before: ".$before.", |
63 | 63 | after: ".$after.", |
64 | - slideshowSpeed: " . $speed . " |
|
64 | + slideshowSpeed: " . $speed." |
|
65 | 65 | }); |
66 | 66 | }); |
67 | 67 | }(jQuery));"); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | public function GridThumb() { |
11 | 11 | $Image = $this->Image(); |
12 | - if ( $Image ) |
|
12 | + if ($Image) |
|
13 | 13 | return $Image->CMSThumbnail(); |
14 | 14 | else |
15 | 15 | return null; |
@@ -22,14 +22,14 @@ discard block |
||
22 | 22 | $ImageField->setFolderName('Uploads/SlideImages'); |
23 | 23 | $ImageField->setConfig('allowedMaxFileNumber', 1); |
24 | 24 | |
25 | - $fields->addFieldsToTab('Root.Main',array( |
|
25 | + $fields->addFieldsToTab('Root.Main', array( |
|
26 | 26 | new TextField('Name'), |
27 | 27 | CheckboxField::create('ShowSlide')->setTitle('Show Slide'), |
28 | 28 | TextareaField::create('Description'), |
29 | 29 | $ImageField, |
30 | 30 | new TreeDropdownField("PageLinkID", "Choose a page to link to:", "SiteTree") |
31 | 31 | )); |
32 | - $fields->removeFieldsFromTab('Root.Main',array( |
|
32 | + $fields->removeFieldsFromTab('Root.Main', array( |
|
33 | 33 | 'SortOrder', |
34 | 34 | 'PageID')); |
35 | 35 | $this->extend('updateCMSFields', $fields); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | public function Thumbnail() { |
40 | - return $this->Image()->CroppedImage(80,80); |
|
40 | + return $this->Image()->CroppedImage(80, 80); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | public function Large() { |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | return $this->Image()->CroppedImage($width, $height); |
71 | 71 | } |
72 | 72 | |
73 | - function canCreate($member=null) { return true; } |
|
74 | - function canEdit($member=null) { return true; } |
|
75 | - function canDelete($member=null) { return true; } |
|
76 | - function canView($member=null) { return true; } |
|
73 | + function canCreate($member = null) { return true; } |
|
74 | + function canEdit($member = null) { return true; } |
|
75 | + function canDelete($member = null) { return true; } |
|
76 | + function canView($member = null) { return true; } |
|
77 | 77 | } |