Completed
Pull Request — 1.0 (#131)
by Nic
02:01
created
code/FlexSlider.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     public function getCustomScript()
124 124
     {
125 125
         // Flexslider options
126
-        $sync = ($this->owner->ThumbnailNav == true) ? "sync: '.carousel:eq('+index+')'," : '';
126
+        $sync = ($this->owner->ThumbnailNav==true) ? "sync: '.carousel:eq('+index+')'," : '';
127 127
 
128 128
         $before = (method_exists($this->owner->ClassName, 'flexSliderBeforeAction'))
129 129
             ? $this->owner->flexSliderBeforeAction()
@@ -144,18 +144,18 @@  discard block
 block discarded – undo
144 144
 					 
145 145
                          if(jQuery('.carousel').eq(index).length) {
146 146
                              jQuery('.carousel').eq(index).flexslider({
147
-                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean() . ",
148
-                                animation: '" . $this->owner->Animation . "',
149
-                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean() . ",
150
-                                controlNav: " . $this->owner->obj('CarouselControlNav')->NiceAsBoolean() . ", 
151
-                                directionNav: " . $this->owner->obj('CarouselDirectionNav')->NiceAsBoolean() . ",
147
+                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean().",
148
+                                animation: '" . $this->owner->Animation."',
149
+                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean().",
150
+                                controlNav: " . $this->owner->obj('CarouselControlNav')->NiceAsBoolean().", 
151
+                                directionNav: " . $this->owner->obj('CarouselDirectionNav')->NiceAsBoolean().",
152 152
                                 prevText: '',
153 153
                                 nextText: '',
154 154
                                 pausePlay: false,
155 155
                                 asNavFor: '.flexslider:eq('+index+')',
156
-                                minItems: " . $this->owner->obj('CarouselThumbnailCt') . ",
157
-                                maxItems: " . $this->owner->obj('CarouselThumbnailCt') . ",
158
-                                move: " . $this->owner->obj('CarouselThumbnailCt') . ",
156
+                                minItems: " . $this->owner->obj('CarouselThumbnailCt').",
157
+                                maxItems: " . $this->owner->obj('CarouselThumbnailCt').",
158
+                                move: " . $this->owner->obj('CarouselThumbnailCt').",
159 159
                                 itemWidth: 100,
160 160
                                 itemMargin: 10
161 161
                               });
@@ -163,22 +163,22 @@  discard block
 block discarded – undo
163 163
  
164 164
                         if(jQuery('.flexslider').eq(index).length){
165 165
                             jQuery('.flexslider').eq(index).flexslider({
166
-                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean() . ",
167
-                                animation: '" . $this->owner->Animation . "',
168
-                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean() . ",
169
-                                controlNav: " . $this->owner->obj('SliderControlNav')->NiceAsBoolean() . ",
170
-                                directionNav: " . $this->owner->obj('SliderDirectionNav')->NiceAsBoolean() . ",
166
+                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean().",
167
+                                animation: '" . $this->owner->Animation."',
168
+                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean().",
169
+                                controlNav: " . $this->owner->obj('SliderControlNav')->NiceAsBoolean().",
170
+                                directionNav: " . $this->owner->obj('SliderDirectionNav')->NiceAsBoolean().",
171 171
                                 prevText: '',
172 172
                                 nextText: '',
173 173
                                 pauseOnAction: true,
174 174
                                 pauseOnHover: true,
175
-                                " . $sync . "
175
+                                " . $sync."
176 176
                                 start: function(slider){
177 177
                                   $('body').removeClass('loading');
178 178
                                 },
179
-                                before: " . $before . ',
180
-                                after: ' . $after . ',
181
-                                slideshowSpeed: ' . $speed . ' 
179
+                                before: " . $before.',
180
+                                after: ' . $after.',
181
+                                slideshowSpeed: ' . $speed.' 
182 182
                             });
183 183
                         }
184 184
                     })
Please login to merge, or discard this patch.
code/SlideImage.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,20 +78,20 @@  discard block
 block discarded – undo
78 78
             'PageID',
79 79
         ]);
80 80
 
81
-        if($name = $fields->dataFieldByName('Name')){
81
+        if ($name = $fields->dataFieldByName('Name')) {
82 82
             $name->setDescription('for internal reference only');
83 83
         }
84 84
 
85
-        if($headline = $fields->dataFieldByName('Headline')){
85
+        if ($headline = $fields->dataFieldByName('Headline')) {
86 86
             $headline->setDescription('optional, used in template');
87 87
         }
88 88
 
89
-        if($description = $fields->dataFieldByName('Description')){
89
+        if ($description = $fields->dataFieldByName('Description')) {
90 90
             $description->setDescription('optional, used in template');
91 91
         }
92 92
 
93
-        if($link = $fields->dataFieldByName('PageLinkID')){
94
-            if(!$link instanceof TreeDropdownField){
93
+        if ($link = $fields->dataFieldByName('PageLinkID')) {
94
+            if (!$link instanceof TreeDropdownField) {
95 95
                 $fields->replaceField(
96 96
                     'PageLinkID',
97 97
                     $link = TreeDropdownField::create('PageLinkID', null, SiteTree::class)
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $link->setTitle("Choose a page to link to:");
101 101
         }
102 102
 
103
-        if($image = $fields->dataFieldByName('Image')){
103
+        if ($image = $fields->dataFieldByName('Image')) {
104 104
             $image->setFolderName('Uploads/SlideImages')
105 105
                 ->setAllowedMaxFileNumber(1)
106 106
                 ->setAllowedFileCategories('image');
Please login to merge, or discard this patch.