Passed
Pull Request — 4.1 (#212)
by
unknown
03:54
created
src/ORM/FlexSlider.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -109,63 +109,63 @@  discard block
 block discarded – undo
109 109
             ]);
110 110
             $SlidesField = GridField::create(
111 111
                 'Slides',
112
-                _t(__CLASS__ . '.SLIDES', 'Slides'),
112
+                _t(__CLASS__.'.SLIDES', 'Slides'),
113 113
                 $this->owner->Slides()->sort('SortOrder'),
114 114
                 $config
115 115
             );
116 116
 
117
-            $slideTitle = $this->owner->stat('slide_tab_title') ?: _t(__CLASS__ . '.SLIDES', 'Slides');
117
+            $slideTitle = $this->owner->stat('slide_tab_title') ?: _t(__CLASS__.'.SLIDES', 'Slides');
118 118
 
119 119
             $animations = [];
120 120
             $animationOptions = $this->owner->dbObject('Animation')->getEnum();
121 121
             foreach ($animationOptions as $value) {
122
-                $animations[$value] = _t(__CLASS__ . ".$value", $value);
122
+                $animations[$value] = _t(__CLASS__.".$value", $value);
123 123
             }
124 124
 
125 125
             $fields->addFieldsToTab("Root.{$slideTitle}", [
126 126
                 $SlidesField,
127
-                ToggleCompositeField::create('ConfigHD', _t(__CLASS__ . '.SettingsLabel', 'Slider Settings'), [
127
+                ToggleCompositeField::create('ConfigHD', _t(__CLASS__.'.SettingsLabel', 'Slider Settings'), [
128 128
                     DropdownField::create(
129 129
                         'Animation',
130
-                        _t(__CLASS__ . '.ANIMATION_OPTION', 'Animation option'),
130
+                        _t(__CLASS__.'.ANIMATION_OPTION', 'Animation option'),
131 131
                         $animations
132 132
                     ),
133 133
                     CheckboxField::create(
134 134
                         'Animate',
135
-                        _t(__CLASS__ . '.ANIMATE', 'Animate automatically')
135
+                        _t(__CLASS__.'.ANIMATE', 'Animate automatically')
136 136
                     ),
137 137
                     CheckboxField::create(
138 138
                         'Loop',
139
-                        _t(__CLASS__ . '.LOOP', 'Loop the carousel')
139
+                        _t(__CLASS__.'.LOOP', 'Loop the carousel')
140 140
                     ),
141 141
                     CheckboxField::create(
142 142
                         'SliderControlNav',
143
-                        _t(__CLASS__ . '.CONTROL_NAV', 'Show ControlNav')
143
+                        _t(__CLASS__.'.CONTROL_NAV', 'Show ControlNav')
144 144
                     ),
145 145
                     CheckboxField::create(
146 146
                         'SliderDirectionNav',
147
-                        _t(__CLASS__ . '.DIRECTION_NAV', 'Show DirectionNav')
147
+                        _t(__CLASS__.'.DIRECTION_NAV', 'Show DirectionNav')
148 148
                     ),
149 149
                     CheckboxField::create(
150 150
                         'ThumbnailNav',
151
-                        _t(__CLASS__ . '.THUMBNAIL_NAV', 'Thumbnail Navigation')
151
+                        _t(__CLASS__.'.THUMBNAIL_NAV', 'Thumbnail Navigation')
152 152
                     ),
153 153
                     //DisplayLogicWrapper::create(
154 154
                     CheckboxField::create(
155 155
                         'CarouselControlNav',
156
-                        _t(__CLASS__ . '.CAROUSEL_CONTROL_NAV', 'Show Carousel ControlNav')
156
+                        _t(__CLASS__.'.CAROUSEL_CONTROL_NAV', 'Show Carousel ControlNav')
157 157
                     ),
158 158
                     CheckboxField::create(
159 159
                         'CarouselDirectionNav',
160
-                        _t(__CLASS__ . '.CAROUSEL_DIRECTION_NAV', 'Show Carousel DirectionNav')
160
+                        _t(__CLASS__.'.CAROUSEL_DIRECTION_NAV', 'Show Carousel DirectionNav')
161 161
                     ),
162 162
                     NumericField::create(
163 163
                         'CarouselThumbnailCt',
164
-                        _t(__CLASS__ . '.CAROUSEL_THUMBNAIL_COUNT', 'Number of thumbnails')
164
+                        _t(__CLASS__.'.CAROUSEL_THUMBNAIL_COUNT', 'Number of thumbnails')
165 165
                     ),
166 166
                     NumericField::create(
167 167
                         'FlexSliderSpeed',
168
-                        _t(__CLASS__ . '.SLIDER_SPEED', 'Slider Speed')
168
+                        _t(__CLASS__.'.SLIDER_SPEED', 'Slider Speed')
169 169
                     )
170 170
                         ->setDescription('In Seconds')
171 171
                         ->setScale(2),
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     public function getCustomScript()
208 208
     {
209 209
         // Flexslider options
210
-        $sync = ($this->owner->ThumbnailNav == true) ? "sync: '.fs-carousel:eq('+index+')'," : '';
210
+        $sync = ($this->owner->ThumbnailNav==true) ? "sync: '.fs-carousel:eq('+index+')'," : '';
211 211
 
212 212
         $before = $this->owner->hasMethod('flexSliderBeforeAction')
213 213
             ? $this->owner->flexSliderBeforeAction()
@@ -226,18 +226,18 @@  discard block
 block discarded – undo
226 226
 
227 227
                          if(jQuery('.fs-carousel').eq(index).length) {
228 228
                              jQuery('.fs-carousel').eq(index).flexslider({
229
-                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean() . ",
229
+                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean().",
230 230
                                 animation: 'slide',
231
-                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean() . ",
232
-                                controlNav: " . $this->owner->obj('CarouselControlNav')->NiceAsBoolean() . ",
233
-                                directionNav: " . $this->owner->obj('CarouselDirectionNav')->NiceAsBoolean() . ",
231
+                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean().",
232
+                                controlNav: " . $this->owner->obj('CarouselControlNav')->NiceAsBoolean().",
233
+                                directionNav: " . $this->owner->obj('CarouselDirectionNav')->NiceAsBoolean().",
234 234
                                 prevText: '',
235 235
                                 nextText: '',
236 236
                                 pausePlay: false,
237 237
                                 asNavFor: '.flexslider:eq('+index+')',
238
-                                minItems: " . $this->owner->obj('CarouselThumbnailCt') . ",
239
-                                maxItems: " . $this->owner->obj('CarouselThumbnailCt') . ",
240
-                                move: " . $this->owner->obj('CarouselThumbnailCt') . ",
238
+                                minItems: " . $this->owner->obj('CarouselThumbnailCt').",
239
+                                maxItems: " . $this->owner->obj('CarouselThumbnailCt').",
240
+                                move: " . $this->owner->obj('CarouselThumbnailCt').",
241 241
                                 itemWidth: 100,
242 242
                                 itemMargin: 10
243 243
                               });
@@ -245,22 +245,22 @@  discard block
 block discarded – undo
245 245
 
246 246
                         if(jQuery('.flexslider').eq(index).length){
247 247
                             jQuery('.flexslider').eq(index).flexslider({
248
-                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean() . ",
249
-                                animation: '" . $this->owner->Animation . "',
250
-                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean() . ",
251
-                                controlNav: " . $this->owner->obj('SliderControlNav')->NiceAsBoolean() . ",
252
-                                directionNav: " . $this->owner->obj('SliderDirectionNav')->NiceAsBoolean() . ",
248
+                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean().",
249
+                                animation: '" . $this->owner->Animation."',
250
+                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean().",
251
+                                controlNav: " . $this->owner->obj('SliderControlNav')->NiceAsBoolean().",
252
+                                directionNav: " . $this->owner->obj('SliderDirectionNav')->NiceAsBoolean().",
253 253
                                 prevText: '',
254 254
                                 nextText: '',
255 255
                                 pauseOnAction: true,
256 256
                                 pauseOnHover: true,
257
-                                " . $sync . "
257
+                                " . $sync."
258 258
                                 start: function(slider){
259 259
                                   $('body').removeClass('loading');
260 260
                                 },
261
-                                before: " . $before . ',
262
-                                after: ' . $after . ',
263
-                                slideshowSpeed: ' . $speed . '
261
+                                before: " . $before.',
262
+                                after: ' . $after.',
263
+                                slideshowSpeed: ' . $speed.'
264 264
                             });
265 265
                         }
266 266
                     })
Please login to merge, or discard this patch.