uikit2-rails 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/uikit2/rails/version.rb +1 -1
  4. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  5. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  6. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  7. data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
  8. data/vendor/assets/javascripts/uikit.js +512 -425
  9. data/vendor/assets/javascripts/uikit/components/accordion.js +19 -13
  10. data/vendor/assets/javascripts/uikit/components/autocomplete.js +23 -17
  11. data/vendor/assets/javascripts/uikit/components/datepicker.js +25 -24
  12. data/vendor/assets/javascripts/uikit/components/form-password.js +16 -16
  13. data/vendor/assets/javascripts/uikit/components/form-select.js +33 -25
  14. data/vendor/assets/javascripts/uikit/components/grid-parallax.js +12 -12
  15. data/vendor/assets/javascripts/uikit/components/grid.js +47 -34
  16. data/vendor/assets/javascripts/uikit/components/htmleditor.js +47 -3
  17. data/vendor/assets/javascripts/uikit/components/lightbox.js +68 -70
  18. data/vendor/assets/javascripts/uikit/components/nestable.js +6 -6
  19. data/vendor/assets/javascripts/uikit/components/notify.js +9 -9
  20. data/vendor/assets/javascripts/uikit/components/pagination.js +8 -8
  21. data/vendor/assets/javascripts/uikit/components/parallax.js +13 -13
  22. data/vendor/assets/javascripts/uikit/components/search.js +11 -11
  23. data/vendor/assets/javascripts/uikit/components/slider.js +27 -15
  24. data/vendor/assets/javascripts/uikit/components/slideset.js +21 -12
  25. data/vendor/assets/javascripts/uikit/components/slideshow-fx.js +35 -28
  26. data/vendor/assets/javascripts/uikit/components/slideshow.js +129 -95
  27. data/vendor/assets/javascripts/uikit/components/sortable.js +45 -36
  28. data/vendor/assets/javascripts/uikit/components/sticky.js +19 -13
  29. data/vendor/assets/javascripts/uikit/components/timepicker.js +6 -6
  30. data/vendor/assets/javascripts/uikit/components/tooltip.js +47 -46
  31. data/vendor/assets/javascripts/uikit/components/upload.js +46 -44
  32. data/vendor/assets/javascripts/uikit/core/alert.js +17 -17
  33. data/vendor/assets/javascripts/uikit/core/button.js +25 -26
  34. data/vendor/assets/javascripts/uikit/core/core.js +58 -23
  35. data/vendor/assets/javascripts/uikit/core/cover.js +9 -17
  36. data/vendor/assets/javascripts/uikit/core/dropdown.js +108 -99
  37. data/vendor/assets/javascripts/uikit/core/grid.js +16 -16
  38. data/vendor/assets/javascripts/uikit/core/modal.js +35 -41
  39. data/vendor/assets/javascripts/uikit/core/nav.js +35 -18
  40. data/vendor/assets/javascripts/uikit/core/offcanvas.js +50 -33
  41. data/vendor/assets/javascripts/uikit/core/scrollspy.js +33 -33
  42. data/vendor/assets/javascripts/uikit/core/smooth-scroll.js +8 -8
  43. data/vendor/assets/javascripts/uikit/core/switcher.js +54 -52
  44. data/vendor/assets/javascripts/uikit/core/tab.js +27 -25
  45. data/vendor/assets/javascripts/uikit/core/toggle.js +12 -8
  46. data/vendor/assets/javascripts/uikit/core/touch.js +3 -3
  47. data/vendor/assets/javascripts/uikit/core/utility.js +35 -19
  48. data/vendor/assets/stylesheets/uikit.almost-flat.css +299 -242
  49. data/vendor/assets/stylesheets/uikit.css +280 -223
  50. data/vendor/assets/stylesheets/uikit.gradient.css +309 -252
  51. data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.css +2 -2
  52. data/vendor/assets/stylesheets/uikit/components/accordion.css +2 -2
  53. data/vendor/assets/stylesheets/uikit/components/accordion.gradient.css +2 -2
  54. data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.css +5 -5
  55. data/vendor/assets/stylesheets/uikit/components/autocomplete.css +5 -5
  56. data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.css +5 -5
  57. data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.css +10 -10
  58. data/vendor/assets/stylesheets/uikit/components/datepicker.css +10 -10
  59. data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.css +9 -9
  60. data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.css +1 -1
  61. data/vendor/assets/stylesheets/uikit/components/dotnav.css +1 -1
  62. data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.css +1 -1
  63. data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.css +5 -5
  64. data/vendor/assets/stylesheets/uikit/components/form-advanced.css +5 -5
  65. data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.css +5 -5
  66. data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.css +1 -1
  67. data/vendor/assets/stylesheets/uikit/components/form-file.css +1 -1
  68. data/vendor/assets/stylesheets/uikit/components/form-file.gradient.css +1 -1
  69. data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.css +3 -3
  70. data/vendor/assets/stylesheets/uikit/components/form-password.css +3 -3
  71. data/vendor/assets/stylesheets/uikit/components/form-password.gradient.css +3 -3
  72. data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.css +1 -1
  73. data/vendor/assets/stylesheets/uikit/components/form-select.css +1 -1
  74. data/vendor/assets/stylesheets/uikit/components/form-select.gradient.css +1 -1
  75. data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.css +12 -12
  76. data/vendor/assets/stylesheets/uikit/components/htmleditor.css +12 -12
  77. data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.css +13 -13
  78. data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.css +7 -3
  79. data/vendor/assets/stylesheets/uikit/components/nestable.css +6 -2
  80. data/vendor/assets/stylesheets/uikit/components/nestable.gradient.css +9 -5
  81. data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.css +4 -4
  82. data/vendor/assets/stylesheets/uikit/components/notify.css +3 -3
  83. data/vendor/assets/stylesheets/uikit/components/notify.gradient.css +4 -4
  84. data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.css +3 -3
  85. data/vendor/assets/stylesheets/uikit/components/placeholder.css +3 -3
  86. data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.css +3 -3
  87. data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.css +2 -2
  88. data/vendor/assets/stylesheets/uikit/components/progress.css +3 -3
  89. data/vendor/assets/stylesheets/uikit/components/progress.gradient.css +2 -2
  90. data/vendor/assets/stylesheets/uikit/components/search.almost-flat.css +18 -18
  91. data/vendor/assets/stylesheets/uikit/components/search.css +17 -17
  92. data/vendor/assets/stylesheets/uikit/components/search.gradient.css +18 -18
  93. data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.css +1 -1
  94. data/vendor/assets/stylesheets/uikit/components/slidenav.css +1 -1
  95. data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.css +1 -1
  96. data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.css +10 -1
  97. data/vendor/assets/stylesheets/uikit/components/slider.css +10 -1
  98. data/vendor/assets/stylesheets/uikit/components/slider.gradient.css +10 -1
  99. data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.css +1 -1
  100. data/vendor/assets/stylesheets/uikit/components/slideshow.css +1 -1
  101. data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.css +1 -1
  102. data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.css +5 -1
  103. data/vendor/assets/stylesheets/uikit/components/sortable.css +5 -1
  104. data/vendor/assets/stylesheets/uikit/components/sortable.gradient.css +5 -1
  105. data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.css +4 -1
  106. data/vendor/assets/stylesheets/uikit/components/sticky.css +4 -1
  107. data/vendor/assets/stylesheets/uikit/components/sticky.gradient.css +4 -1
  108. data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.css +8 -7
  109. data/vendor/assets/stylesheets/uikit/components/tooltip.css +8 -7
  110. data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.css +8 -7
  111. data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.css +1 -1
  112. data/vendor/assets/stylesheets/uikit/components/upload.css +1 -1
  113. data/vendor/assets/stylesheets/uikit/components/upload.gradient.css +1 -1
  114. metadata +2 -2
@@ -1,4 +1,4 @@
1
- /*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
2
  (function(addon) {
3
3
 
4
4
  var component;
@@ -7,8 +7,8 @@
7
7
  component = addon(UIkit);
8
8
  }
9
9
 
10
- if (typeof define == "function" && define.amd) {
11
- define("uikit-slideshow-fx", ["uikit"], function() {
10
+ if (typeof define == 'function' && define.amd) {
11
+ define('uikit-slideshow-fx', ['uikit'], function() {
12
12
  return component || addon(UIkit);
13
13
  });
14
14
  }
@@ -20,7 +20,7 @@
20
20
  var Animations = UI.slideshow.animations;
21
21
 
22
22
  UI.$.extend(UI.slideshow.animations, {
23
- 'slice': function(current, next, dir, fromfx) {
23
+ slice: function(current, next, dir, fromfx) {
24
24
 
25
25
  if (!current.data('cover')) {
26
26
  return Animations.fade.apply(this, arguments);
@@ -30,7 +30,7 @@
30
30
 
31
31
  var sliceWidth = Math.ceil(this.element.width() / this.options.slices),
32
32
  bgimage = next.data('cover').css('background-image'),
33
- ghost = UI.$('<li></li>').css({
33
+ ghost = UI.$('<li class="uk-slideshow-ghost"></li>').css({
34
34
  top : 0,
35
35
  left : 0,
36
36
  width : this.container.width(),
@@ -80,19 +80,18 @@
80
80
  this.container.append(ghost);
81
81
 
82
82
  ghost.children().last().on(UI.support.transition.end, function() {
83
- ghost.remove();
84
- d.resolve();
83
+
84
+ setTimeout(function() {
85
+ ghost.remove();
86
+ d.resolve();
87
+ }, 0);
85
88
  });
86
89
 
87
90
  ghost.width();
88
91
 
89
92
  ghost.children().each(function() {
90
- var bar = UI.$(this);
91
-
92
- bar.css({
93
- 'clip': bar.data('clip'),
94
- 'opacity': 1
95
- });
93
+ bar = UI.$(this);
94
+ bar.css({ clip: bar.data('clip'), opacity: 1 });
96
95
  });
97
96
 
98
97
  return d.promise();
@@ -110,7 +109,7 @@
110
109
  return Animations.slice.apply(this, [current, next, dir, 'slice-up-down']);
111
110
  },
112
111
 
113
- 'fold': function(current, next, dir) {
112
+ fold: function(current, next, dir) {
114
113
 
115
114
  if (!next.data('cover')) {
116
115
  return Animations.fade.apply(this, arguments);
@@ -120,7 +119,7 @@
120
119
 
121
120
  var sliceWidth = Math.ceil(this.element.width() / this.options.slices),
122
121
  bgimage = next.data('cover').css('background-image'),
123
- ghost = UI.$('<li></li>').css({
122
+ ghost = UI.$('<li class="uk-slideshow-ghost"></li>').css({
124
123
  width : next.width(),
125
124
  height : next.height(),
126
125
  opacity: 1,
@@ -155,17 +154,19 @@
155
154
  ghost.width();
156
155
 
157
156
  ghost.children().first().on(UI.support.transition.end, function() {
158
- ghost.remove();
159
- d.resolve();
157
+ setTimeout(function() {
158
+ ghost.remove();
159
+ d.resolve();
160
+ }, 0);
160
161
  }).end().css({
161
- 'transform': 'scaleX(1)',
162
- 'opacity': 1
162
+ transform: 'scaleX(1)',
163
+ opacity: 1
163
164
  });
164
165
 
165
166
  return d.promise();
166
167
  },
167
168
 
168
- 'puzzle': function(current, next, dir) {
169
+ puzzle: function(current, next, dir) {
169
170
 
170
171
  if (!next.data('cover')) {
171
172
  return Animations.fade.apply(this, arguments);
@@ -178,7 +179,7 @@
178
179
  boxRows = Math.round(next.height()/boxWidth),
179
180
  boxHeight = Math.round(next.height()/boxRows)+1,
180
181
  bgimage = next.data('cover').css('background-image'),
181
- ghost = UI.$('<li></li>').css({
182
+ ghost = UI.$('<li class="uk-slideshow-ghost"></li>').css({
182
183
  width : this.container.width(),
183
184
  height : this.container.height(),
184
185
  opacity : 1,
@@ -228,18 +229,21 @@
228
229
  '-webkit-transition': 'all '+$this.options.duration+'ms ease-in-out '+(50+i*25)+'ms'
229
230
  });
230
231
  }).last().on(UI.support.transition.end, function() {
231
- ghost.remove();
232
- d.resolve();
232
+
233
+ setTimeout(function() {
234
+ ghost.remove();
235
+ d.resolve();
236
+ }, 0);
233
237
  });
234
238
 
235
239
  ghost.width();
236
240
 
237
- boxes.css({'opacity': 1});
241
+ boxes.css({opacity: 1});
238
242
 
239
243
  return d.promise();
240
244
  },
241
245
 
242
- 'boxes': function(current, next, dir, fromfx) {
246
+ boxes: function(current, next, dir, fromfx) {
243
247
 
244
248
  if (!next.data('cover')) {
245
249
  return Animations.fade.apply(this, arguments);
@@ -252,7 +256,7 @@
252
256
  boxRows = Math.round(next.height()/boxWidth),
253
257
  boxHeight = Math.round(next.height()/boxRows)+1,
254
258
  bgimage = next.data('cover').css('background-image'),
255
- ghost = UI.$('<li></li>').css({
259
+ ghost = UI.$('<li class="uk-slideshow-ghost"></li>').css({
256
260
  width : next.width(),
257
261
  height : next.height(),
258
262
  opacity : 1,
@@ -332,8 +336,11 @@
332
336
  }
333
337
 
334
338
  boxes.last().on(UI.support.transition.end, function() {
335
- ghost.remove();
336
- d.resolve();
339
+
340
+ setTimeout(function() {
341
+ ghost.remove();
342
+ d.resolve();
343
+ }, 0);
337
344
  });
338
345
 
339
346
  ghost.width();
@@ -1,4 +1,4 @@
1
- /*! UIkit 2.26.3 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
2
  (function(addon) {
3
3
 
4
4
  var component;
@@ -7,8 +7,8 @@
7
7
  component = addon(UIkit);
8
8
  }
9
9
 
10
- if (typeof define == "function" && define.amd) {
11
- define("uikit-slideshow", ["uikit"], function() {
10
+ if (typeof define == 'function' && define.amd) {
11
+ define('uikit-slideshow', ['uikit'], function() {
12
12
  return component || addon(UIkit);
13
13
  });
14
14
  }
@@ -22,9 +22,9 @@
22
22
  UI.component('slideshow', {
23
23
 
24
24
  defaults: {
25
- animation : "fade",
25
+ animation : 'fade',
26
26
  duration : 500,
27
- height : "auto",
27
+ height : 'auto',
28
28
  start : 0,
29
29
  autoplay : false,
30
30
  autoplayInterval : 7000,
@@ -56,8 +56,8 @@
56
56
 
57
57
  var slideshow = UI.$(this);
58
58
 
59
- if (!slideshow.data("slideshow")) {
60
- UI.slideshow(slideshow, UI.Utils.options(slideshow.attr("data-uk-slideshow")));
59
+ if (!slideshow.data('slideshow')) {
60
+ UI.slideshow(slideshow, UI.Utils.options(slideshow.attr('data-uk-slideshow')));
61
61
  }
62
62
  });
63
63
  });
@@ -65,22 +65,20 @@
65
65
 
66
66
  init: function() {
67
67
 
68
- var $this = this, canvas, kbanimduration;
68
+ var $this = this;
69
69
 
70
- this.container = this.element.hasClass('uk-slideshow') ? this.element : UI.$(this.find('.uk-slideshow'));
71
- this.slides = this.container.children();
72
- this.slidesCount = this.slides.length;
70
+ this.container = this.element.hasClass('uk-slideshow') ? this.element : UI.$(this.find('.uk-slideshow:first'));
73
71
  this.current = this.options.start;
74
72
  this.animating = false;
75
- this.triggers = this.find('[data-uk-slideshow-item]');
73
+
76
74
  this.fixFullscreen = navigator.userAgent.match(/(iPad|iPhone|iPod)/g) && this.container.hasClass('uk-slideshow-fullscreen'); // viewport unit fix for height:100vh - should be fixed in iOS 8
77
75
 
78
76
  if (this.options.kenburns) {
79
77
 
80
- kbanimduration = this.options.kenburns === true ? '15s': this.options.kenburns;
78
+ this.kbanimduration = this.options.kenburns === true ? '15s': this.options.kenburns;
81
79
 
82
- if (!String(kbanimduration).match(/(ms|s)$/)) {
83
- kbanimduration += 'ms';
80
+ if (!String(this.kbanimduration).match(/(ms|s)$/)) {
81
+ this.kbanimduration += 'ms';
84
82
  }
85
83
 
86
84
  if (typeof(this.options.kenburnsanimations) == 'string') {
@@ -88,10 +86,103 @@
88
86
  }
89
87
  }
90
88
 
89
+ this.update();
90
+
91
+ this.on('click.uk.slideshow', '[data-uk-slideshow-item]', function(e) {
92
+
93
+ e.preventDefault();
94
+
95
+ var slide = UI.$(this).attr('data-uk-slideshow-item');
96
+
97
+ if ($this.current == slide) return;
98
+
99
+ switch(slide) {
100
+ case 'next':
101
+ case 'previous':
102
+ $this[slide=='next' ? 'next':'previous']();
103
+ break;
104
+ default:
105
+ $this.show(parseInt(slide, 10));
106
+ }
107
+
108
+ $this.stop();
109
+ });
110
+
111
+ UI.$win.on("resize load", UI.Utils.debounce(function() {
112
+ $this.resize();
113
+
114
+ if ($this.fixFullscreen) {
115
+ $this.container.css('height', window.innerHeight);
116
+ $this.slides.css('height', window.innerHeight);
117
+ }
118
+ }, 100));
119
+
120
+ // chrome image load fix
121
+ setTimeout(function(){
122
+ $this.resize();
123
+ }, 80);
124
+
125
+ // Set autoplay
126
+ if (this.options.autoplay) {
127
+ this.start();
128
+ }
129
+
130
+ if (this.options.videoautoplay && this.slides.eq(this.current).data('media')) {
131
+ this.playmedia(this.slides.eq(this.current).data('media'));
132
+ }
133
+
134
+ if (this.options.kenburns) {
135
+ this.applyKenBurns(this.slides.eq(this.current));
136
+ }
137
+
138
+ this.container.on({
139
+ mouseenter: function() { if ($this.options.pauseOnHover) $this.hovering = true; },
140
+ mouseleave: function() { $this.hovering = false; }
141
+ });
142
+
143
+ this.on('swipeRight swipeLeft', function(e) {
144
+ $this[e.type=='swipeLeft' ? 'next' : 'previous']();
145
+ });
146
+
147
+ this.on('display.uk.check', function(){
148
+ if ($this.element.is(':visible')) {
149
+
150
+ $this.resize();
151
+
152
+ if ($this.fixFullscreen) {
153
+ $this.container.css('height', window.innerHeight);
154
+ $this.slides.css('height', window.innerHeight);
155
+ }
156
+ }
157
+ });
158
+
159
+ UI.domObserve(this.element, function(e) {
160
+ if ($this.container.children(':not([data-slideshow-slide])').not('.uk-slideshow-ghost').length) {
161
+ $this.update(true);
162
+ }
163
+ });
164
+ },
165
+
166
+ update: function(resize) {
167
+
168
+ var $this = this, canvas, processed = 0;
169
+
170
+ this.slides = this.container.children();
171
+ this.slidesCount = this.slides.length;
172
+
173
+ if (!this.slides.eq(this.current).length) {
174
+ this.current = 0;
175
+ }
176
+
91
177
  this.slides.each(function(index) {
92
178
 
93
- var slide = UI.$(this),
94
- media = slide.children('img,video,iframe').eq(0);
179
+ var slide = UI.$(this);
180
+
181
+ if (slide.data('processed')) {
182
+ return;
183
+ }
184
+
185
+ var media = slide.children('img,video,iframe').eq(0), type = 'html';
95
186
 
96
187
  slide.data('media', media);
97
188
  slide.data('sizer', media);
@@ -100,6 +191,8 @@
100
191
 
101
192
  var placeholder;
102
193
 
194
+ type = media[0].nodeName.toLowerCase();
195
+
103
196
  switch(media[0].nodeName) {
104
197
  case 'IMG':
105
198
 
@@ -180,86 +273,29 @@
180
273
  if ($this.hasKenBurns(slide)) {
181
274
 
182
275
  slide.data('cover').css({
183
- '-webkit-animation-duration': kbanimduration,
184
- 'animation-duration': kbanimduration
276
+ '-webkit-animation-duration': $this.kbanimduration,
277
+ 'animation-duration': $this.kbanimduration
185
278
  });
186
279
  }
187
- });
188
280
 
189
- this.on("click.uk.slideshow", '[data-uk-slideshow-item]', function(e) {
190
-
191
- e.preventDefault();
192
-
193
- var slide = UI.$(this).attr('data-uk-slideshow-item');
194
-
195
- if ($this.current == slide) return;
196
-
197
- switch(slide) {
198
- case 'next':
199
- case 'previous':
200
- $this[slide=='next' ? 'next':'previous']();
201
- break;
202
- default:
203
- $this.show(parseInt(slide, 10));
204
- }
205
-
206
- $this.stop();
281
+ slide.data('processed', ++processed);
282
+ slide.attr('data-slideshow-slide', type);
207
283
  });
208
284
 
209
- // Set start slide
210
- this.slides.attr('aria-hidden', 'true').eq(this.current).addClass('uk-active').attr('aria-hidden', 'false');
211
- this.triggers.filter('[data-uk-slideshow-item="'+this.current+'"]').addClass('uk-active');
285
+ if (processed) {
212
286
 
213
- UI.$win.on("resize load", UI.Utils.debounce(function() {
214
- $this.resize();
287
+ this.triggers = this.find('[data-uk-slideshow-item]');
215
288
 
216
- if ($this.fixFullscreen) {
217
- $this.container.css('height', window.innerHeight);
218
- $this.slides.css('height', window.innerHeight);
219
- }
220
- }, 100));
221
-
222
- // chrome image load fix
223
- setTimeout(function(){
224
- $this.resize();
225
- }, 80);
226
-
227
- // Set autoplay
228
- if (this.options.autoplay) {
229
- this.start();
289
+ // Set start slide
290
+ this.slides.attr('aria-hidden', 'true').removeClass('uk-active').eq(this.current).addClass('uk-active').attr('aria-hidden', 'false');
291
+ this.triggers.filter('[data-uk-slideshow-item="'+this.current+'"]').addClass('uk-active');
230
292
  }
231
293
 
232
- if (this.options.videoautoplay && this.slides.eq(this.current).data('media')) {
233
- this.playmedia(this.slides.eq(this.current).data('media'));
294
+ if (resize && processed) {
295
+ this.resize();
234
296
  }
235
-
236
- if (this.options.kenburns) {
237
- this.applyKenBurns(this.slides.eq(this.current));
238
- }
239
-
240
- this.container.on({
241
- mouseenter: function() { if ($this.options.pauseOnHover) $this.hovering = true; },
242
- mouseleave: function() { $this.hovering = false; }
243
- });
244
-
245
- this.on('swipeRight swipeLeft', function(e) {
246
- $this[e.type=='swipeLeft' ? 'next' : 'previous']();
247
- });
248
-
249
- this.on('display.uk.check', function(){
250
- if ($this.element.is(":visible")) {
251
-
252
- $this.resize();
253
-
254
- if ($this.fixFullscreen) {
255
- $this.container.css('height', window.innerHeight);
256
- $this.slides.css('height', window.innerHeight);
257
- }
258
- }
259
- });
260
297
  },
261
298
 
262
-
263
299
  resize: function() {
264
300
 
265
301
  if (this.container.hasClass('uk-slideshow-fullscreen')) return;
@@ -304,8 +340,8 @@
304
340
  $this.playmedia(nextmedia);
305
341
  }
306
342
 
307
- next.addClass("uk-active").attr('aria-hidden', 'false');
308
- current.removeClass("uk-active").attr('aria-hidden', 'true');
343
+ next.addClass('uk-active').attr('aria-hidden', 'false');
344
+ current.removeClass('uk-active').attr('aria-hidden', 'true');
309
345
 
310
346
  $this.animating = false;
311
347
  $this.current = index;
@@ -444,8 +480,8 @@
444
480
 
445
481
  next.css('opacity', 1).one(UI.support.animation.end, function() {
446
482
 
447
- current.removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
448
- next.css('opacity', '').removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
483
+ current.css('opacity', 0).removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
484
+ next.removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
449
485
  d.resolve();
450
486
 
451
487
  }.bind(this));
@@ -466,8 +502,8 @@
466
502
 
467
503
  next.css('opacity', 1).one(UI.support.animation.end, function() {
468
504
 
469
- current.removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
470
- next.css('opacity', '').removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
505
+ current.css('opacity', 0).removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
506
+ next.removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
471
507
  d.resolve();
472
508
 
473
509
  }.bind(this));
@@ -490,8 +526,7 @@
490
526
 
491
527
  current.one(UI.support.animation.end, function() {
492
528
 
493
- current.removeClass('uk-slideshow-scale-out');
494
- next.css('opacity', '');
529
+ current.css('opacity', 0).removeClass('uk-slideshow-scale-out');
495
530
  d.resolve();
496
531
 
497
532
  }.bind(this));
@@ -521,8 +556,7 @@
521
556
 
522
557
  current.one(UI.support.animation.end, function() {
523
558
 
524
- current.removeClass('uk-slideshow-fade-out');
525
- next.css('opacity', '');
559
+ current.css('opacity', 0).removeClass('uk-slideshow-fade-out');
526
560
  d.resolve();
527
561
 
528
562
  }.bind(this));