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(addon) {
var component;
@ -67,7 +67,7 @@
init: function() {
var $this = this, siblings = [];
var siblings = [];
this.index = 0;
this.siblings = [];
@ -85,7 +85,7 @@
siblings.push({
'source': ele.attr('href'),
'title' : ele.attr('title'),
'title' : ele.attr('data-title') || ele.attr('title'),
'type' : ele.attr("data-lightbox-type") || 'auto',
'link' : ele
});
@ -353,7 +353,7 @@
if(!cache[id]) {
var img = new Image();
var img = new Image(), lowres = false;
img.onerror = function(){
cache[id] = {width:640, height:320};
@ -361,11 +361,22 @@
};
img.onload = function(){
cache[id] = {width:img.width, height:img.height};
resolve(id, img.width, img.height);
//youtube default 404 thumb, fall back to lowres
if (img.width == 120 && img.height == 90) {
if (!lowres) {
lowres = true;
img.src = '//img.youtube.com/vi/' + id + '/0.jpg';
} else {
cache[id] = {width: 640, height: 320};
resolve(id, cache[id].width, cache[id].height);
}
} else {
cache[id] = {width: img.width, height: img.height};
resolve(id, img.width, img.height);
}
};
img.src = '//img.youtube.com/vi/'+id+'/0.jpg';
img.src = '//img.youtube.com/vi/'+id+'/maxresdefault.jpg';
} else {
resolve(id, cache[id].width, cache[id].height);