Updated the footable Lib.

This commit is contained in:
2016-03-19 03:51:35 +02:00
parent 1cad434a39
commit 3bc71a935c
801 changed files with 8543 additions and 3032 deletions

View File

@ -1,4 +1,4 @@
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
(function(UI) {
"use strict";
@ -6,6 +6,7 @@
UI.component('buttonRadio', {
defaults: {
"activeClass": 'uk-active',
"target": ".uk-button"
},
@ -33,7 +34,7 @@
var $this = this;
// Init ARIA
this.find($this.options.target).attr('aria-checked', 'false').filter(".uk-active").attr('aria-checked', 'true');
this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
this.on("click", this.options.target, function(e) {
@ -41,8 +42,8 @@
if (ele.is('a[href="#"]')) e.preventDefault();
$this.find($this.options.target).not(ele).removeClass("uk-active").blur();
ele.addClass("uk-active");
$this.find($this.options.target).not(ele).removeClass($this.options.activeClass).blur();
ele.addClass($this.options.activeClass);
// Update ARIA
$this.find($this.options.target).not(ele).attr('aria-checked', 'false');
@ -54,13 +55,14 @@
},
getSelected: function() {
return this.find(".uk-active");
return this.find('.' + this.options.activeClass);
}
});
UI.component('buttonCheckbox', {
defaults: {
"activeClass": 'uk-active',
"target": ".uk-button"
},
@ -86,17 +88,17 @@
var $this = this;
// Init ARIA
this.find($this.options.target).attr('aria-checked', 'false').filter(".uk-active").attr('aria-checked', 'true');
this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
this.on("click", this.options.target, function(e) {
var ele = UI.$(this);
if (ele.is('a[href="#"]')) e.preventDefault();
ele.toggleClass("uk-active").blur();
ele.toggleClass($this.options.activeClass).blur();
// Update ARIA
ele.attr('aria-checked', ele.hasClass("uk-active"));
ele.attr('aria-checked', ele.hasClass($this.options.activeClass));
$this.trigger("change.uk.button", [ele]);
});
@ -104,7 +106,7 @@
},
getSelected: function() {
return this.find(".uk-active");
return this.find('.' + this.options.activeClass);
}
});
@ -152,3 +154,4 @@
});
})(UIkit);