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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/uikit2/rails/version.rb +1 -1
- data/vendor/assets/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/javascripts/uikit.js +512 -425
- data/vendor/assets/javascripts/uikit/components/accordion.js +19 -13
- data/vendor/assets/javascripts/uikit/components/autocomplete.js +23 -17
- data/vendor/assets/javascripts/uikit/components/datepicker.js +25 -24
- data/vendor/assets/javascripts/uikit/components/form-password.js +16 -16
- data/vendor/assets/javascripts/uikit/components/form-select.js +33 -25
- data/vendor/assets/javascripts/uikit/components/grid-parallax.js +12 -12
- data/vendor/assets/javascripts/uikit/components/grid.js +47 -34
- data/vendor/assets/javascripts/uikit/components/htmleditor.js +47 -3
- data/vendor/assets/javascripts/uikit/components/lightbox.js +68 -70
- data/vendor/assets/javascripts/uikit/components/nestable.js +6 -6
- data/vendor/assets/javascripts/uikit/components/notify.js +9 -9
- data/vendor/assets/javascripts/uikit/components/pagination.js +8 -8
- data/vendor/assets/javascripts/uikit/components/parallax.js +13 -13
- data/vendor/assets/javascripts/uikit/components/search.js +11 -11
- data/vendor/assets/javascripts/uikit/components/slider.js +27 -15
- data/vendor/assets/javascripts/uikit/components/slideset.js +21 -12
- data/vendor/assets/javascripts/uikit/components/slideshow-fx.js +35 -28
- data/vendor/assets/javascripts/uikit/components/slideshow.js +129 -95
- data/vendor/assets/javascripts/uikit/components/sortable.js +45 -36
- data/vendor/assets/javascripts/uikit/components/sticky.js +19 -13
- data/vendor/assets/javascripts/uikit/components/timepicker.js +6 -6
- data/vendor/assets/javascripts/uikit/components/tooltip.js +47 -46
- data/vendor/assets/javascripts/uikit/components/upload.js +46 -44
- data/vendor/assets/javascripts/uikit/core/alert.js +17 -17
- data/vendor/assets/javascripts/uikit/core/button.js +25 -26
- data/vendor/assets/javascripts/uikit/core/core.js +58 -23
- data/vendor/assets/javascripts/uikit/core/cover.js +9 -17
- data/vendor/assets/javascripts/uikit/core/dropdown.js +108 -99
- data/vendor/assets/javascripts/uikit/core/grid.js +16 -16
- data/vendor/assets/javascripts/uikit/core/modal.js +35 -41
- data/vendor/assets/javascripts/uikit/core/nav.js +35 -18
- data/vendor/assets/javascripts/uikit/core/offcanvas.js +50 -33
- data/vendor/assets/javascripts/uikit/core/scrollspy.js +33 -33
- data/vendor/assets/javascripts/uikit/core/smooth-scroll.js +8 -8
- data/vendor/assets/javascripts/uikit/core/switcher.js +54 -52
- data/vendor/assets/javascripts/uikit/core/tab.js +27 -25
- data/vendor/assets/javascripts/uikit/core/toggle.js +12 -8
- data/vendor/assets/javascripts/uikit/core/touch.js +3 -3
- data/vendor/assets/javascripts/uikit/core/utility.js +35 -19
- data/vendor/assets/stylesheets/uikit.almost-flat.css +299 -242
- data/vendor/assets/stylesheets/uikit.css +280 -223
- data/vendor/assets/stylesheets/uikit.gradient.css +309 -252
- data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/accordion.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/accordion.gradient.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/autocomplete.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.css +10 -10
- data/vendor/assets/stylesheets/uikit/components/datepicker.css +10 -10
- data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.css +9 -9
- data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/dotnav.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/form-advanced.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-file.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-file.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/form-password.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/form-password.gradient.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-select.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-select.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.css +12 -12
- data/vendor/assets/stylesheets/uikit/components/htmleditor.css +12 -12
- data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.css +13 -13
- data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.css +7 -3
- data/vendor/assets/stylesheets/uikit/components/nestable.css +6 -2
- data/vendor/assets/stylesheets/uikit/components/nestable.gradient.css +9 -5
- data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.css +4 -4
- data/vendor/assets/stylesheets/uikit/components/notify.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/notify.gradient.css +4 -4
- data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/placeholder.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/progress.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/progress.gradient.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/search.almost-flat.css +18 -18
- data/vendor/assets/stylesheets/uikit/components/search.css +17 -17
- data/vendor/assets/stylesheets/uikit/components/search.gradient.css +18 -18
- data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slidenav.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.css +10 -1
- data/vendor/assets/stylesheets/uikit/components/slider.css +10 -1
- data/vendor/assets/stylesheets/uikit/components/slider.gradient.css +10 -1
- data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slideshow.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.css +5 -1
- data/vendor/assets/stylesheets/uikit/components/sortable.css +5 -1
- data/vendor/assets/stylesheets/uikit/components/sortable.gradient.css +5 -1
- data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.css +4 -1
- data/vendor/assets/stylesheets/uikit/components/sticky.css +4 -1
- data/vendor/assets/stylesheets/uikit/components/sticky.gradient.css +4 -1
- data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.css +8 -7
- data/vendor/assets/stylesheets/uikit/components/tooltip.css +8 -7
- data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.css +8 -7
- data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/upload.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/upload.gradient.css +1 -1
- metadata +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! UIkit 2.
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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(
|
31
|
-
$win.on(
|
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.$(
|
36
|
+
UI.$('[data-uk-scrollspy]', context).each(function() {
|
37
37
|
|
38
38
|
var element = UI.$(this);
|
39
39
|
|
40
|
-
if (!element.data(
|
41
|
-
var obj = UI.scrollspy(element, UI.Utils.options(element.attr(
|
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(
|
69
|
+
element.trigger('init.uk.scrollspy');
|
70
70
|
}
|
71
71
|
|
72
72
|
element.data('scrollspy-idle', setTimeout(function(){
|
73
73
|
|
74
|
-
element.addClass(
|
75
|
-
element.trigger(
|
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(
|
92
|
+
element.removeClass('uk-scrollspy-inview').toggleClass(toggle);
|
93
93
|
element.data('inviewstate', false);
|
94
94
|
|
95
|
-
element.trigger(
|
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
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
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(
|
133
|
-
$win.on(
|
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.$(
|
138
|
+
UI.$('[data-uk-scrollspy-nav]', context).each(function() {
|
139
139
|
|
140
140
|
var element = UI.$(this);
|
141
141
|
|
142
|
-
if (!element.data(
|
143
|
-
var obj = UI.scrollspynav(element, UI.Utils.options(element.attr(
|
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(
|
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(
|
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(
|
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(
|
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.
|
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(
|
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(
|
15
|
-
var obj = UI.smoothScroll(ele, UI.Utils.options(ele.attr(
|
16
|
-
ele.trigger(
|
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(
|
27
|
+
this.on('click', function(e) {
|
28
28
|
e.preventDefault();
|
29
|
-
scrollToElement(UI.$(this.hash).length ? UI.$(this.hash) : UI.$(
|
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.$(
|
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.
|
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.$(
|
26
|
+
UI.$('[data-uk-switcher]', context).each(function() {
|
27
27
|
var switcher = UI.$(this);
|
28
28
|
|
29
|
-
if (!switcher.data(
|
30
|
-
var obj = UI.switcher(switcher, UI.Utils.options(switcher.attr(
|
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(
|
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
|
-
|
49
|
+
this.connect = UI.$(this.options.connect);
|
48
50
|
|
49
|
-
|
51
|
+
if (!this.connect.length) {
|
52
|
+
return;
|
53
|
+
}
|
50
54
|
|
51
|
-
|
52
|
-
if (this.connect.length) {
|
55
|
+
this.connect.on('click.uk.switcher', '[data-uk-switcher-item]', function(e) {
|
53
56
|
|
54
|
-
|
55
|
-
this.connect.children().attr('aria-hidden', 'true');
|
57
|
+
e.preventDefault();
|
56
58
|
|
57
|
-
|
59
|
+
var item = UI.$(this).attr('data-uk-switcher-item');
|
58
60
|
|
59
|
-
|
61
|
+
if ($this.index == item) return;
|
60
62
|
|
61
|
-
|
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
|
-
|
73
|
+
if (this.options.swiping) {
|
64
74
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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
|
-
|
83
|
+
this.update();
|
84
|
+
},
|
76
85
|
|
77
|
-
|
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
|
-
|
87
|
-
active = toggles.filter(".uk-active");
|
88
|
+
this.connect.children().removeClass('uk-active').attr('aria-hidden', 'true');
|
88
89
|
|
89
|
-
|
90
|
-
|
91
|
-
} else {
|
90
|
+
var toggles = this.find(this.options.toggle),
|
91
|
+
active = toggles.filter('.uk-active');
|
92
92
|
|
93
|
-
|
93
|
+
if (active.length) {
|
94
|
+
this.show(active, false);
|
95
|
+
} else {
|
94
96
|
|
95
|
-
|
96
|
-
this.show(active.length ? active : toggles.eq(0), false);
|
97
|
-
}
|
97
|
+
if (this.options.active===false) return;
|
98
98
|
|
99
|
-
|
100
|
-
|
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
|
-
|
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.
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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.$(
|
22
|
+
UI.$('[data-uk-tab]', context).each(function() {
|
23
23
|
|
24
24
|
var tab = UI.$(this);
|
25
25
|
|
26
|
-
if (!tab.data(
|
27
|
-
var obj = UI.tab(tab, UI.Utils.options(tab.attr(
|
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(
|
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(
|
49
|
+
current.removeClass('uk-active').blur();
|
50
50
|
|
51
|
-
$this.trigger(
|
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(
|
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
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
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, {
|
105
|
+
UI.dropdown(this.responsivetab, {mode: 'click', preventflip: 'y'});
|
105
106
|
|
106
107
|
// init
|
107
|
-
$this.trigger(
|
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(
|
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(
|
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
|
154
|
+
clone = UI.$(item[0].outerHTML);
|
155
|
+
clone.find('a').data('index', i);
|
154
156
|
|
155
157
|
this.responsivetab.lst.append(clone);
|
156
158
|
}
|