updated Uikit v2

This commit is contained in:
2017-11-12 02:33:10 +02:00
parent 7d27af5d59
commit 1cc40dbfe4
437 changed files with 9171 additions and 5797 deletions

View File

@@ -1,4 +1,4 @@
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.27.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
(function(UI) {
"use strict";
@@ -6,12 +6,12 @@
UI.component('tab', {
defaults: {
'target' : '>li:not(.uk-tab-responsive, .uk-disabled)',
'connect' : false,
'active' : 0,
'animation' : false,
'duration' : 200,
'swiping' : true
target : '>li:not(.uk-tab-responsive, .uk-disabled)',
connect : false,
active : 0,
animation : false,
duration : 200,
swiping : true
},
boot: function() {
@@ -19,12 +19,12 @@
// init code
UI.ready(function(context) {
UI.$("[data-uk-tab]", context).each(function() {
UI.$('[data-uk-tab]', context).each(function() {
var tab = UI.$(this);
if (!tab.data("tab")) {
var obj = UI.tab(tab, UI.Utils.options(tab.attr("data-uk-tab")));
if (!tab.data('tab')) {
var obj = UI.tab(tab, UI.Utils.options(tab.attr('data-uk-tab')));
}
});
});
@@ -36,7 +36,7 @@
this.current = false;
this.on("click.uk.tab", this.options.target, function(e) {
this.on('click.uk.tab', this.options.target, function(e) {
e.preventDefault();
@@ -46,9 +46,9 @@
var current = $this.find($this.options.target).not(this);
current.removeClass("uk-active").blur();
current.removeClass('uk-active').blur();
$this.trigger("change.uk.tab", [UI.$(this).addClass("uk-active"), $this.current]);
$this.trigger('change.uk.tab', [UI.$(this).addClass('uk-active'), $this.current]);
$this.current = UI.$(this);
@@ -70,7 +70,7 @@
this.responsivetab.lst = this.responsivetab.dropdown.find('ul');
this.responsivetab.caption = this.responsivetab.find('a:first');
if (this.element.hasClass("uk-tab-bottom")) this.responsivetab.dropdown.addClass("uk-dropdown-up");
if (this.element.hasClass('uk-tab-bottom')) this.responsivetab.dropdown.addClass('uk-dropdown-up');
// handle click
this.responsivetab.lst.on('click.uk.tab', 'a', function(e) {
@@ -91,29 +91,30 @@
// init UIkit components
if (this.options.connect) {
this.switcher = UI.switcher(this.element, {
'toggle' : '>li:not(.uk-tab-responsive)',
'connect' : this.options.connect,
'active' : this.options.active,
'animation' : this.options.animation,
'duration' : this.options.duration,
'swiping' : this.options.swiping
toggle : '>li:not(.uk-tab-responsive)',
connect : this.options.connect,
active : this.options.active,
animation : this.options.animation,
duration : this.options.duration,
swiping : this.options.swiping
});
}
UI.dropdown(this.responsivetab, {"mode": "click", "preventflip": "y"});
UI.dropdown(this.responsivetab, {mode: 'click', preventflip: 'y'});
// init
$this.trigger("change.uk.tab", [this.element.find(this.options.target).not('.uk-tab-responsive').filter('.uk-active')]);
$this.trigger('change.uk.tab', [this.element.find(this.options.target).not('.uk-tab-responsive').filter('.uk-active')]);
this.check();
UI.$win.on('resize orientationchange', UI.Utils.debounce(function(){
if ($this.element.is(":visible")) $this.check();
if ($this.element.is(':visible')) $this.check();
}, 100));
this.on('display.uk.check', function(){
if ($this.element.is(":visible")) $this.check();
if ($this.element.is(':visible')) $this.check();
});
},
@@ -150,7 +151,8 @@
if (!item.hasClass('uk-disabled')) {
clone = item[0].outerHTML.replace('<a ', '<a data-index="'+i+'" ');
clone = UI.$(item[0].outerHTML);
clone.find('a').data('index', i);
this.responsivetab.lst.append(clone);
}
@@ -164,4 +166,4 @@
}
});
})(UIkit);
})(UIkit2);