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(UI) {
3
3
 
4
4
  "use strict";
@@ -15,30 +15,30 @@
15
15
  UI.component('scrollspy', {
16
16
 
17
17
  defaults: {
18
- "target" : false,
19
- "cls" : "uk-scrollspy-inview",
20
- "initcls" : "uk-scrollspy-init-inview",
21
- "topoffset" : 0,
22
- "leftoffset" : 0,
23
- "repeat" : false,
24
- "delay" : 0
18
+ target : false,
19
+ cls : 'uk-scrollspy-inview',
20
+ initcls : 'uk-scrollspy-init-inview',
21
+ topoffset : 0,
22
+ leftoffset : 0,
23
+ repeat : false,
24
+ delay : 0
25
25
  },
26
26
 
27
27
  boot: function() {
28
28
 
29
29
  // listen to scroll and resize
30
- $doc.on("scrolling.uk.document", checkScrollSpy);
31
- $win.on("load resize orientationchange", UI.Utils.debounce(checkScrollSpy, 50));
30
+ $doc.on('scrolling.uk.document', checkScrollSpy);
31
+ $win.on('load resize orientationchange', UI.Utils.debounce(checkScrollSpy, 50));
32
32
 
33
33
  // init code
34
34
  UI.ready(function(context) {
35
35
 
36
- UI.$("[data-uk-scrollspy]", context).each(function() {
36
+ UI.$('[data-uk-scrollspy]', context).each(function() {
37
37
 
38
38
  var element = UI.$(this);
39
39
 
40
- if (!element.data("scrollspy")) {
41
- var obj = UI.scrollspy(element, UI.Utils.options(element.attr("data-uk-scrollspy")));
40
+ if (!element.data('scrollspy')) {
41
+ var obj = UI.scrollspy(element, UI.Utils.options(element.attr('data-uk-scrollspy')));
42
42
  }
43
43
  });
44
44
  });
@@ -66,13 +66,13 @@
66
66
  $this.offset = element.offset();
67
67
  initinview = true;
68
68
 
69
- element.trigger("init.uk.scrollspy");
69
+ element.trigger('init.uk.scrollspy');
70
70
  }
71
71
 
72
72
  element.data('scrollspy-idle', setTimeout(function(){
73
73
 
74
- element.addClass("uk-scrollspy-inview").toggleClass(toggle).width();
75
- element.trigger("inview.uk.scrollspy");
74
+ element.addClass('uk-scrollspy-inview').toggleClass(toggle).width();
75
+ element.trigger('inview.uk.scrollspy');
76
76
 
77
77
  element.data('scrollspy-idle', false);
78
78
  element.data('inviewstate', true);
@@ -89,10 +89,10 @@
89
89
  element.data('scrollspy-idle', false);
90
90
  }
91
91
 
92
- element.removeClass("uk-scrollspy-inview").toggleClass(toggle);
92
+ element.removeClass('uk-scrollspy-inview').toggleClass(toggle);
93
93
  element.data('inviewstate', false);
94
94
 
95
- element.trigger("outview.uk.scrollspy");
95
+ element.trigger('outview.uk.scrollspy');
96
96
  }
97
97
 
98
98
  toggleclsIdx = togglecls[toggleclsIdx + 1] ? (toggleclsIdx + 1) : 0;
@@ -119,28 +119,28 @@
119
119
  UI.component('scrollspynav', {
120
120
 
121
121
  defaults: {
122
- "cls" : 'uk-active',
123
- "closest" : false,
124
- "topoffset" : 0,
125
- "leftoffset" : 0,
126
- "smoothscroll" : false
122
+ cls : 'uk-active',
123
+ closest : false,
124
+ topoffset : 0,
125
+ leftoffset : 0,
126
+ smoothscroll : false
127
127
  },
128
128
 
129
129
  boot: function() {
130
130
 
131
131
  // listen to scroll and resize
132
- $doc.on("scrolling.uk.document", checkScrollSpyNavs);
133
- $win.on("resize orientationchange", UI.Utils.debounce(checkScrollSpyNavs, 50));
132
+ $doc.on('scrolling.uk.document', checkScrollSpyNavs);
133
+ $win.on('resize orientationchange', UI.Utils.debounce(checkScrollSpyNavs, 50));
134
134
 
135
135
  // init code
136
136
  UI.ready(function(context) {
137
137
 
138
- UI.$("[data-uk-scrollspy-nav]", context).each(function() {
138
+ UI.$('[data-uk-scrollspy-nav]', context).each(function() {
139
139
 
140
140
  var element = UI.$(this);
141
141
 
142
- if (!element.data("scrollspynav")) {
143
- var obj = UI.scrollspynav(element, UI.Utils.options(element.attr("data-uk-scrollspy-nav")));
142
+ if (!element.data('scrollspynav')) {
143
+ var obj = UI.scrollspynav(element, UI.Utils.options(element.attr('data-uk-scrollspy-nav')));
144
144
  }
145
145
  });
146
146
  });
@@ -149,7 +149,7 @@
149
149
  init: function() {
150
150
 
151
151
  var ids = [],
152
- links = this.find("a[href^='#']").each(function(){ if(this.getAttribute("href").trim()!=='#') ids.push(this.getAttribute("href")); }),
152
+ links = this.find("a[href^='#']").each(function(){ if(this.getAttribute('href').trim()!=='#') ids.push(this.getAttribute('href')); }),
153
153
  targets = UI.$(ids.join(",")),
154
154
 
155
155
  clsActive = this.options.cls,
@@ -171,7 +171,7 @@
171
171
  scrollTop = $win.scrollTop(),
172
172
  target = (function(){
173
173
  for(var i=0; i< inviews.length;i++){
174
- if(inviews[i].offset().top >= scrollTop){
174
+ if (inviews[i].offset().top - $this.options.topoffset >= scrollTop){
175
175
  return inviews[i];
176
176
  }
177
177
  }
@@ -181,12 +181,12 @@
181
181
 
182
182
  if ($this.options.closest) {
183
183
  links.blur().closest(clsClosest).removeClass(clsActive);
184
- navitems = links.filter("a[href='#"+target.attr("id")+"']").closest(clsClosest).addClass(clsActive);
184
+ navitems = links.filter("a[href='#"+target.attr('id')+"']").closest(clsClosest).addClass(clsActive);
185
185
  } else {
186
186
  navitems = links.removeClass(clsActive).filter("a[href='#"+target.attr("id")+"']").addClass(clsActive);
187
187
  }
188
188
 
189
- $this.element.trigger("inview.uk.scrollspynav", [target, navitems]);
189
+ $this.element.trigger('inview.uk.scrollspynav', [target, navitems]);
190
190
  }
191
191
  };
192
192
 
@@ -198,7 +198,7 @@
198
198
 
199
199
  fn();
200
200
 
201
- this.element.data("scrollspynav", this);
201
+ this.element.data('scrollspynav', this);
202
202
 
203
203
  this.check = fn;
204
204
  scrollspynavs.push(this);
@@ -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(UI) {
3
3
 
4
4
  "use strict";
@@ -8,12 +8,12 @@
8
8
  boot: function() {
9
9
 
10
10
  // init code
11
- UI.$html.on("click.smooth-scroll.uikit", "[data-uk-smooth-scroll]", function(e) {
11
+ UI.$html.on('click.smooth-scroll.uikit', '[data-uk-smooth-scroll]', function(e) {
12
12
  var ele = UI.$(this);
13
13
 
14
- if (!ele.data("smoothScroll")) {
15
- var obj = UI.smoothScroll(ele, UI.Utils.options(ele.attr("data-uk-smooth-scroll")));
16
- ele.trigger("click");
14
+ if (!ele.data('smoothScroll')) {
15
+ var obj = UI.smoothScroll(ele, UI.Utils.options(ele.attr('data-uk-smooth-scroll')));
16
+ ele.trigger('click');
17
17
  }
18
18
 
19
19
  return false;
@@ -24,9 +24,9 @@
24
24
 
25
25
  var $this = this;
26
26
 
27
- this.on("click", function(e) {
27
+ this.on('click', function(e) {
28
28
  e.preventDefault();
29
- scrollToElement(UI.$(this.hash).length ? UI.$(this.hash) : UI.$("body"), $this.options);
29
+ scrollToElement(UI.$(this.hash).length ? UI.$(this.hash) : UI.$('body'), $this.options);
30
30
  });
31
31
  }
32
32
  });
@@ -50,7 +50,7 @@
50
50
  }
51
51
 
52
52
  // animate to target, fire callback when done
53
- UI.$("html,body").stop().animate({scrollTop: target}, options.duration, options.transition).promise().done(options.complete);
53
+ UI.$('html,body').stop().animate({scrollTop: target}, options.duration, options.transition).promise().done(options.complete);
54
54
  }
55
55
 
56
56
  UI.Utils.scrollToElement = scrollToElement;
@@ -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(UI) {
3
3
 
4
4
  "use strict";
@@ -9,7 +9,7 @@
9
9
 
10
10
  defaults: {
11
11
  connect : false,
12
- toggle : ">*",
12
+ toggle : '>*',
13
13
  active : 0,
14
14
  animation : false,
15
15
  duration : 200,
@@ -23,11 +23,11 @@
23
23
  // init code
24
24
  UI.ready(function(context) {
25
25
 
26
- UI.$("[data-uk-switcher]", context).each(function() {
26
+ UI.$('[data-uk-switcher]', context).each(function() {
27
27
  var switcher = UI.$(this);
28
28
 
29
- if (!switcher.data("switcher")) {
30
- var obj = UI.switcher(switcher, UI.Utils.options(switcher.attr("data-uk-switcher")));
29
+ if (!switcher.data('switcher')) {
30
+ var obj = UI.switcher(switcher, UI.Utils.options(switcher.attr('data-uk-switcher')));
31
31
  }
32
32
  });
33
33
  });
@@ -37,70 +37,72 @@
37
37
 
38
38
  var $this = this;
39
39
 
40
- this.on("click.uk.switcher", this.options.toggle, function(e) {
40
+ this.on('click.uk.switcher', this.options.toggle, function(e) {
41
41
  e.preventDefault();
42
42
  $this.show(this);
43
43
  });
44
44
 
45
- if (this.options.connect) {
45
+ if (!this.options.connect) {
46
+ return;
47
+ }
46
48
 
47
- this.connect = UI.$(this.options.connect);
49
+ this.connect = UI.$(this.options.connect);
48
50
 
49
- this.connect.children().removeClass("uk-active");
51
+ if (!this.connect.length) {
52
+ return;
53
+ }
50
54
 
51
- // delegate switch commands within container content
52
- if (this.connect.length) {
55
+ this.connect.on('click.uk.switcher', '[data-uk-switcher-item]', function(e) {
53
56
 
54
- // Init ARIA for connect
55
- this.connect.children().attr('aria-hidden', 'true');
57
+ e.preventDefault();
56
58
 
57
- this.connect.on("click", '[data-uk-switcher-item]', function(e) {
59
+ var item = UI.$(this).attr('data-uk-switcher-item');
58
60
 
59
- e.preventDefault();
61
+ if ($this.index == item) return;
60
62
 
61
- var item = UI.$(this).attr('data-uk-switcher-item');
63
+ switch(item) {
64
+ case 'next':
65
+ case 'previous':
66
+ $this.show($this.index + (item=='next' ? 1:-1));
67
+ break;
68
+ default:
69
+ $this.show(parseInt(item, 10));
70
+ }
71
+ });
62
72
 
63
- if ($this.index == item) return;
73
+ if (this.options.swiping) {
64
74
 
65
- switch(item) {
66
- case 'next':
67
- case 'previous':
68
- $this.show($this.index + (item=='next' ? 1:-1));
69
- break;
70
- default:
71
- $this.show(parseInt(item, 10));
72
- }
73
- });
75
+ this.connect.on('swipeRight swipeLeft', function(e) {
76
+ e.preventDefault();
77
+ if (!window.getSelection().toString()) {
78
+ $this.show($this.index + (e.type == 'swipeLeft' ? 1 : -1));
79
+ }
80
+ });
81
+ }
74
82
 
75
- if (this.options.swiping) {
83
+ this.update();
84
+ },
76
85
 
77
- this.connect.on('swipeRight swipeLeft', function(e) {
78
- e.preventDefault();
79
- if(!window.getSelection().toString()) {
80
- $this.show($this.index + (e.type == 'swipeLeft' ? 1 : -1));
81
- }
82
- });
83
- }
84
- }
86
+ update: function() {
85
87
 
86
- var toggles = this.find(this.options.toggle),
87
- active = toggles.filter(".uk-active");
88
+ this.connect.children().removeClass('uk-active').attr('aria-hidden', 'true');
88
89
 
89
- if (active.length) {
90
- this.show(active, false);
91
- } else {
90
+ var toggles = this.find(this.options.toggle),
91
+ active = toggles.filter('.uk-active');
92
92
 
93
- if (this.options.active===false) return;
93
+ if (active.length) {
94
+ this.show(active, false);
95
+ } else {
94
96
 
95
- active = toggles.eq(this.options.active);
96
- this.show(active.length ? active : toggles.eq(0), false);
97
- }
97
+ if (this.options.active===false) return;
98
98
 
99
- // Init ARIA for toggles
100
- toggles.not(active).attr('aria-expanded', 'false');
101
- active.attr('aria-expanded', 'true');
99
+ active = toggles.eq(this.options.active);
100
+ this.show(active.length ? active : toggles.eq(0), false);
102
101
  }
103
102
 
103
+ // Init ARIA for toggles
104
+ toggles.not(active).attr('aria-expanded', 'false');
105
+ active.attr('aria-expanded', 'true');
104
106
  },
105
107
 
106
108
  show: function(tab, animate) {
@@ -109,18 +111,16 @@
109
111
  return;
110
112
  }
111
113
 
114
+ var toggles = this.find(this.options.toggle);
115
+
112
116
  if (isNaN(tab)) {
113
117
  tab = UI.$(tab);
114
118
  } else {
115
-
116
- var toggles = this.find(this.options.toggle);
117
-
118
119
  tab = tab < 0 ? toggles.length-1 : tab;
119
120
  tab = toggles.eq(toggles[tab] ? tab : 0);
120
121
  }
121
122
 
122
123
  var $this = this,
123
- toggles = this.find(this.options.toggle),
124
124
  active = UI.$(tab),
125
125
  animation = Animations[this.options.animation] || function(current, next) {
126
126
 
@@ -273,7 +273,9 @@
273
273
 
274
274
  next.addClass(clsIn).one(UI.support.animation.end, function() {
275
275
 
276
- next.removeClass(''+clsIn+'').css({opacity:'', display:''});
276
+ setTimeout(function () {
277
+ next.removeClass(''+clsIn+'').css({opacity:'', display:''});
278
+ }, 0);
277
279
 
278
280
  d.resolve();
279
281
 
@@ -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(UI) {
3
3
 
4
4
  "use strict";
@@ -6,12 +6,12 @@
6
6
  UI.component('tab', {
7
7
 
8
8
  defaults: {
9
- 'target' : '>li:not(.uk-tab-responsive, .uk-disabled)',
10
- 'connect' : false,
11
- 'active' : 0,
12
- 'animation' : false,
13
- 'duration' : 200,
14
- 'swiping' : true
9
+ target : '>li:not(.uk-tab-responsive, .uk-disabled)',
10
+ connect : false,
11
+ active : 0,
12
+ animation : false,
13
+ duration : 200,
14
+ swiping : true
15
15
  },
16
16
 
17
17
  boot: function() {
@@ -19,12 +19,12 @@
19
19
  // init code
20
20
  UI.ready(function(context) {
21
21
 
22
- UI.$("[data-uk-tab]", context).each(function() {
22
+ UI.$('[data-uk-tab]', context).each(function() {
23
23
 
24
24
  var tab = UI.$(this);
25
25
 
26
- if (!tab.data("tab")) {
27
- var obj = UI.tab(tab, UI.Utils.options(tab.attr("data-uk-tab")));
26
+ if (!tab.data('tab')) {
27
+ var obj = UI.tab(tab, UI.Utils.options(tab.attr('data-uk-tab')));
28
28
  }
29
29
  });
30
30
  });
@@ -36,7 +36,7 @@
36
36
 
37
37
  this.current = false;
38
38
 
39
- this.on("click.uk.tab", this.options.target, function(e) {
39
+ this.on('click.uk.tab', this.options.target, function(e) {
40
40
 
41
41
  e.preventDefault();
42
42
 
@@ -46,9 +46,9 @@
46
46
 
47
47
  var current = $this.find($this.options.target).not(this);
48
48
 
49
- current.removeClass("uk-active").blur();
49
+ current.removeClass('uk-active').blur();
50
50
 
51
- $this.trigger("change.uk.tab", [UI.$(this).addClass("uk-active"), $this.current]);
51
+ $this.trigger('change.uk.tab', [UI.$(this).addClass('uk-active'), $this.current]);
52
52
 
53
53
  $this.current = UI.$(this);
54
54
 
@@ -70,7 +70,7 @@
70
70
  this.responsivetab.lst = this.responsivetab.dropdown.find('ul');
71
71
  this.responsivetab.caption = this.responsivetab.find('a:first');
72
72
 
73
- if (this.element.hasClass("uk-tab-bottom")) this.responsivetab.dropdown.addClass("uk-dropdown-up");
73
+ if (this.element.hasClass('uk-tab-bottom')) this.responsivetab.dropdown.addClass('uk-dropdown-up');
74
74
 
75
75
  // handle click
76
76
  this.responsivetab.lst.on('click.uk.tab', 'a', function(e) {
@@ -91,29 +91,30 @@
91
91
 
92
92
  // init UIkit components
93
93
  if (this.options.connect) {
94
+
94
95
  this.switcher = UI.switcher(this.element, {
95
- 'toggle' : '>li:not(.uk-tab-responsive)',
96
- 'connect' : this.options.connect,
97
- 'active' : this.options.active,
98
- 'animation' : this.options.animation,
99
- 'duration' : this.options.duration,
100
- 'swiping' : this.options.swiping
96
+ toggle : '>li:not(.uk-tab-responsive)',
97
+ connect : this.options.connect,
98
+ active : this.options.active,
99
+ animation : this.options.animation,
100
+ duration : this.options.duration,
101
+ swiping : this.options.swiping
101
102
  });
102
103
  }
103
104
 
104
- UI.dropdown(this.responsivetab, {"mode": "click", "preventflip": "y"});
105
+ UI.dropdown(this.responsivetab, {mode: 'click', preventflip: 'y'});
105
106
 
106
107
  // init
107
- $this.trigger("change.uk.tab", [this.element.find(this.options.target).not('.uk-tab-responsive').filter('.uk-active')]);
108
+ $this.trigger('change.uk.tab', [this.element.find(this.options.target).not('.uk-tab-responsive').filter('.uk-active')]);
108
109
 
109
110
  this.check();
110
111
 
111
112
  UI.$win.on('resize orientationchange', UI.Utils.debounce(function(){
112
- if ($this.element.is(":visible")) $this.check();
113
+ if ($this.element.is(':visible')) $this.check();
113
114
  }, 100));
114
115
 
115
116
  this.on('display.uk.check', function(){
116
- if ($this.element.is(":visible")) $this.check();
117
+ if ($this.element.is(':visible')) $this.check();
117
118
  });
118
119
  },
119
120
 
@@ -150,7 +151,8 @@
150
151
 
151
152
  if (!item.hasClass('uk-disabled')) {
152
153
 
153
- clone = item[0].outerHTML.replace('<a ', '<a data-index="'+i+'" ');
154
+ clone = UI.$(item[0].outerHTML);
155
+ clone.find('a').data('index', i);
154
156
 
155
157
  this.responsivetab.lst.append(clone);
156
158
  }