Updated the footable Lib.
This commit is contained in:
@ -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";
|
||||
|
2
admin/custom/uikit/js/core/alert.min.js
vendored
2
admin/custom/uikit/js/core/alert.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! 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(t){"use strict";t.component("alert",{defaults:{fade:!0,duration:200,trigger:".uk-alert-close"},boot:function(){t.$html.on("click.alert.uikit","[data-uk-alert]",function(i){var o=t.$(this);if(!o.data("alert")){var e=t.alert(o,t.Utils.options(o.attr("data-uk-alert")));t.$(i.target).is(e.options.trigger)&&(i.preventDefault(),e.close())}})},init:function(){var t=this;this.on("click",this.options.trigger,function(i){i.preventDefault(),t.close()})},close:function(){var t=this.trigger("close.uk.alert"),i=function(){this.trigger("closed.uk.alert").remove()}.bind(this);this.options.fade?t.css("overflow","hidden").css("max-height",t.height()).animate({height:0,opacity:0,"padding-top":0,"padding-bottom":0,"margin-top":0,"margin-bottom":0},this.options.duration,i):i()}})}(UIkit);
|
@ -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);
|
||||
|
||||
|
4
admin/custom/uikit/js/core/button.min.js
vendored
4
admin/custom/uikit/js/core/button.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";t.component("buttonRadio",{defaults:{target:".uk-button"},boot:function(){t.$html.on("click.buttonradio.uikit","[data-uk-button-radio]",function(i){var e=t.$(this);if(!e.data("buttonRadio")){var a=t.buttonRadio(e,t.Utils.options(e.attr("data-uk-button-radio"))),n=t.$(i.target);n.is(a.options.target)&&n.trigger("click")}})},init:function(){var i=this;this.find(i.options.target).attr("aria-checked","false").filter(".uk-active").attr("aria-checked","true"),this.on("click",this.options.target,function(e){var a=t.$(this);a.is('a[href="#"]')&&e.preventDefault(),i.find(i.options.target).not(a).removeClass("uk-active").blur(),a.addClass("uk-active"),i.find(i.options.target).not(a).attr("aria-checked","false"),a.attr("aria-checked","true"),i.trigger("change.uk.button",[a])})},getSelected:function(){return this.find(".uk-active")}}),t.component("buttonCheckbox",{defaults:{target:".uk-button"},boot:function(){t.$html.on("click.buttoncheckbox.uikit","[data-uk-button-checkbox]",function(i){var e=t.$(this);if(!e.data("buttonCheckbox")){var a=t.buttonCheckbox(e,t.Utils.options(e.attr("data-uk-button-checkbox"))),n=t.$(i.target);n.is(a.options.target)&&n.trigger("click")}})},init:function(){var i=this;this.find(i.options.target).attr("aria-checked","false").filter(".uk-active").attr("aria-checked","true"),this.on("click",this.options.target,function(e){var a=t.$(this);a.is('a[href="#"]')&&e.preventDefault(),a.toggleClass("uk-active").blur(),a.attr("aria-checked",a.hasClass("uk-active")),i.trigger("change.uk.button",[a])})},getSelected:function(){return this.find(".uk-active")}}),t.component("button",{defaults:{},boot:function(){t.$html.on("click.button.uikit","[data-uk-button]",function(){var i=t.$(this);if(!i.data("button")){{t.button(i,t.Utils.options(i.attr("data-uk-button")))}i.trigger("click")}})},init:function(){var t=this;this.element.attr("aria-pressed",this.element.hasClass("uk-active")),this.on("click",function(i){t.element.is('a[href="#"]')&&i.preventDefault(),t.toggle(),t.trigger("change.uk.button",[t.element.blur().hasClass("uk-active")])})},toggle:function(){this.element.toggleClass("uk-active"),this.element.attr("aria-pressed",this.element.hasClass("uk-active"))}})}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";t.component("buttonRadio",{defaults:{activeClass:"uk-active",target:".uk-button"},boot:function(){t.$html.on("click.buttonradio.uikit","[data-uk-button-radio]",function(i){var a=t.$(this);if(!a.data("buttonRadio")){var e=t.buttonRadio(a,t.Utils.options(a.attr("data-uk-button-radio"))),o=t.$(i.target);o.is(e.options.target)&&o.trigger("click")}})},init:function(){var i=this;this.find(i.options.target).attr("aria-checked","false").filter("."+i.options.activeClass).attr("aria-checked","true"),this.on("click",this.options.target,function(a){var e=t.$(this);e.is('a[href="#"]')&&a.preventDefault(),i.find(i.options.target).not(e).removeClass(i.options.activeClass).blur(),e.addClass(i.options.activeClass),i.find(i.options.target).not(e).attr("aria-checked","false"),e.attr("aria-checked","true"),i.trigger("change.uk.button",[e])})},getSelected:function(){return this.find("."+this.options.activeClass)}}),t.component("buttonCheckbox",{defaults:{activeClass:"uk-active",target:".uk-button"},boot:function(){t.$html.on("click.buttoncheckbox.uikit","[data-uk-button-checkbox]",function(i){var a=t.$(this);if(!a.data("buttonCheckbox")){var e=t.buttonCheckbox(a,t.Utils.options(a.attr("data-uk-button-checkbox"))),o=t.$(i.target);o.is(e.options.target)&&o.trigger("click")}})},init:function(){var i=this;this.find(i.options.target).attr("aria-checked","false").filter("."+i.options.activeClass).attr("aria-checked","true"),this.on("click",this.options.target,function(a){var e=t.$(this);e.is('a[href="#"]')&&a.preventDefault(),e.toggleClass(i.options.activeClass).blur(),e.attr("aria-checked",e.hasClass(i.options.activeClass)),i.trigger("change.uk.button",[e])})},getSelected:function(){return this.find("."+this.options.activeClass)}}),t.component("button",{defaults:{},boot:function(){t.$html.on("click.button.uikit","[data-uk-button]",function(){var i=t.$(this);if(!i.data("button")){{t.button(i,t.Utils.options(i.attr("data-uk-button")))}i.trigger("click")}})},init:function(){var t=this;this.element.attr("aria-pressed",this.element.hasClass("uk-active")),this.on("click",function(i){t.element.is('a[href="#"]')&&i.preventDefault(),t.toggle(),t.trigger("change.uk.button",[t.element.blur().hasClass("uk-active")])})},toggle:function(){this.element.toggleClass("uk-active"),this.element.attr("aria-pressed",this.element.hasClass("uk-active"))}})}(UIkit);
|
@ -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(core) {
|
||||
|
||||
if (typeof define == "function" && define.amd) { // AMD
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
var UI = {}, _UI = global.UIkit ? Object.create(global.UIkit) : undefined;
|
||||
|
||||
UI.version = '2.21.0';
|
||||
UI.version = '2.25.0';
|
||||
|
||||
UI.noConflict = function() {
|
||||
// restore UIkit version
|
||||
@ -110,27 +110,30 @@
|
||||
})();
|
||||
|
||||
// requestAnimationFrame polyfill
|
||||
// https://gist.github.com/paulirish/1579671
|
||||
(function(){
|
||||
//https://github.com/darius/requestAnimationFrame
|
||||
(function() {
|
||||
|
||||
var lastTime = 0;
|
||||
Date.now = Date.now || function() { return new Date().getTime(); };
|
||||
|
||||
global.requestAnimationFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || function(callback, element) {
|
||||
var currTime = new Date().getTime();
|
||||
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
||||
var id = global.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall);
|
||||
lastTime = currTime + timeToCall;
|
||||
return id;
|
||||
};
|
||||
|
||||
if (!global.cancelAnimationFrame) {
|
||||
|
||||
global.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
var vendors = ['webkit', 'moz'];
|
||||
for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
|
||||
var vp = vendors[i];
|
||||
window.requestAnimationFrame = window[vp+'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame']
|
||||
|| window[vp+'CancelRequestAnimationFrame']);
|
||||
}
|
||||
|
||||
})();
|
||||
if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) // iOS6 is buggy
|
||||
|| !window.requestAnimationFrame || !window.cancelAnimationFrame) {
|
||||
var lastTime = 0;
|
||||
window.requestAnimationFrame = function(callback) {
|
||||
var now = Date.now();
|
||||
var nextTime = Math.max(lastTime + 16, now);
|
||||
return setTimeout(function() { callback(lastTime = nextTime); },
|
||||
nextTime - now);
|
||||
};
|
||||
window.cancelAnimationFrame = clearTimeout;
|
||||
}
|
||||
}());
|
||||
|
||||
UI.support.touch = (
|
||||
('ontouchstart' in document) ||
|
||||
@ -145,7 +148,7 @@
|
||||
UI.Utils = {};
|
||||
|
||||
UI.Utils.isFullscreen = function() {
|
||||
return document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.fullscreenElement || false;
|
||||
return document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.fullscreenElement || false;
|
||||
};
|
||||
|
||||
UI.Utils.str2json = function(str, notevil) {
|
||||
@ -257,7 +260,11 @@
|
||||
|
||||
UI.Utils.options = function(string) {
|
||||
|
||||
if ($.isPlainObject(string)) return string;
|
||||
if ($.type(string)!='string') return string;
|
||||
|
||||
if (string.indexOf(':') != -1 && string.trim().substr(-1) != '}') {
|
||||
string = '{'+string+'}';
|
||||
}
|
||||
|
||||
var start = (string ? string.indexOf("{") : -1), options = {};
|
||||
|
||||
@ -275,12 +282,11 @@
|
||||
var d = $.Deferred();
|
||||
|
||||
element = UI.$(element);
|
||||
cls = cls;
|
||||
|
||||
element.css('display', 'none').addClass(cls).one(UI.support.animation.end, function() {
|
||||
element.removeClass(cls);
|
||||
d.resolve();
|
||||
}).width();
|
||||
});
|
||||
|
||||
element.css('display', '');
|
||||
|
||||
@ -615,84 +621,103 @@
|
||||
if (UI.domready) UI.Utils.checkDisplay();
|
||||
});
|
||||
|
||||
$(function(){
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
|
||||
UI.$body = UI.$('body');
|
||||
var domReady = function() {
|
||||
|
||||
UI.ready(function(context){
|
||||
UI.domObserve('[data-uk-observe]');
|
||||
});
|
||||
UI.$body = UI.$('body');
|
||||
|
||||
UI.on('changed.uk.dom', function(e) {
|
||||
UI.init(e.target);
|
||||
UI.Utils.checkDisplay(e.target);
|
||||
});
|
||||
UI.ready(function(context){
|
||||
UI.domObserve('[data-uk-observe]');
|
||||
});
|
||||
|
||||
UI.trigger('beforeready.uk.dom');
|
||||
UI.on('changed.uk.dom', function(e) {
|
||||
UI.init(e.target);
|
||||
UI.Utils.checkDisplay(e.target);
|
||||
});
|
||||
|
||||
UI.component.bootComponents();
|
||||
UI.trigger('beforeready.uk.dom');
|
||||
|
||||
// custom scroll observer
|
||||
setInterval((function(){
|
||||
UI.component.bootComponents();
|
||||
|
||||
var memory = {x: window.pageXOffset, y:window.pageYOffset}, dir;
|
||||
// custom scroll observer
|
||||
requestAnimationFrame((function(){
|
||||
|
||||
var fn = function(){
|
||||
var memory = {dir: {x:0, y:0}, x: window.pageXOffset, y:window.pageYOffset};
|
||||
|
||||
if (memory.x != window.pageXOffset || memory.y != window.pageYOffset) {
|
||||
var fn = function(){
|
||||
// reading this (window.page[X|Y]Offset) causes a full page recalc of the layout in Chrome,
|
||||
// so we only want to do this once
|
||||
var wpxo = window.pageXOffset;
|
||||
var wpyo = window.pageYOffset;
|
||||
|
||||
dir = {x: 0 , y: 0};
|
||||
// Did the scroll position change since the last time we were here?
|
||||
if (memory.x != wpxo || memory.y != wpyo) {
|
||||
|
||||
if (window.pageXOffset != memory.x) dir.x = window.pageXOffset > memory.x ? 1:-1;
|
||||
if (window.pageYOffset != memory.y) dir.y = window.pageYOffset > memory.y ? 1:-1;
|
||||
// Set the direction of the scroll and store the new position
|
||||
if (wpxo != memory.x) {memory.dir.x = wpxo > memory.x ? 1:-1; } else { memory.dir.x = 0; }
|
||||
if (wpyo != memory.y) {memory.dir.y = wpyo > memory.y ? 1:-1; } else { memory.dir.y = 0; }
|
||||
|
||||
memory = {
|
||||
"dir": dir, "x": window.pageXOffset, "y": window.pageYOffset
|
||||
};
|
||||
memory.x = wpxo;
|
||||
memory.y = wpyo;
|
||||
|
||||
UI.$doc.trigger('scrolling.uk.document', [memory]);
|
||||
// Trigger the scroll event, this could probably be sent using memory.clone() but this is
|
||||
// more explicit and easier to see exactly what is being sent in the event.
|
||||
UI.$doc.trigger('scrolling.uk.document', [{
|
||||
"dir": {"x": memory.dir.x, "y": memory.dir.y}, "x": wpxo, "y": wpyo
|
||||
}]);
|
||||
}
|
||||
|
||||
requestAnimationFrame(fn);
|
||||
};
|
||||
|
||||
if (UI.support.touch) {
|
||||
UI.$html.on('touchmove touchend MSPointerMove MSPointerUp pointermove pointerup', fn);
|
||||
}
|
||||
};
|
||||
|
||||
if (memory.x || memory.y) fn();
|
||||
|
||||
return fn;
|
||||
|
||||
})());
|
||||
|
||||
// run component init functions on dom
|
||||
UI.trigger('domready.uk.dom');
|
||||
|
||||
if (UI.support.touch) {
|
||||
UI.$html.on('touchmove touchend MSPointerMove MSPointerUp pointermove pointerup', fn);
|
||||
|
||||
// remove css hover rules for touch devices
|
||||
// UI.Utils.removeCssRules(/\.uk-(?!navbar).*:hover/);
|
||||
|
||||
// viewport unit fix for uk-height-viewport - should be fixed in iOS 8
|
||||
if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
|
||||
|
||||
UI.$win.on('load orientationchange resize', UI.Utils.debounce((function(){
|
||||
|
||||
var fn = function() {
|
||||
$('.uk-height-viewport').css('height', window.innerHeight);
|
||||
return fn;
|
||||
};
|
||||
|
||||
return fn();
|
||||
|
||||
})(), 100));
|
||||
}
|
||||
}
|
||||
|
||||
if (memory.x || memory.y) fn();
|
||||
UI.trigger('afterready.uk.dom');
|
||||
|
||||
return fn;
|
||||
// mark that domready is left behind
|
||||
UI.domready = true;
|
||||
};
|
||||
|
||||
})(), 15);
|
||||
|
||||
// run component init functions on dom
|
||||
UI.trigger('domready.uk.dom');
|
||||
|
||||
if (UI.support.touch) {
|
||||
|
||||
// remove css hover rules for touch devices
|
||||
// UI.Utils.removeCssRules(/\.uk-(?!navbar).*:hover/);
|
||||
|
||||
// viewport unit fix for uk-height-viewport - should be fixed in iOS 8
|
||||
if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
|
||||
|
||||
UI.$win.on('load orientationchange resize', UI.Utils.debounce((function(){
|
||||
|
||||
var fn = function() {
|
||||
$('.uk-height-viewport').css('height', window.innerHeight);
|
||||
return fn;
|
||||
};
|
||||
|
||||
return fn();
|
||||
|
||||
})(), 100));
|
||||
}
|
||||
if (document.readyState == 'complete' || document.readyState == 'interactive') {
|
||||
setTimeout(domReady);
|
||||
}
|
||||
|
||||
UI.trigger('afterready.uk.dom');
|
||||
return domReady;
|
||||
|
||||
// mark that domready is left behind
|
||||
UI.domready = true;
|
||||
});
|
||||
}());
|
||||
|
||||
// add touch identifier class
|
||||
UI.$html.addClass(UI.support.touch ? "uk-touch" : "uk-notouch");
|
||||
@ -700,15 +725,18 @@
|
||||
// add uk-hover class on tap to support overlays on touch devices
|
||||
if (UI.support.touch) {
|
||||
|
||||
var hoverset = false, exclude, hovercls = 'uk-hover', selector = '.uk-overlay, .uk-overlay-hover, .uk-overlay-toggle, .uk-animation-hover, .uk-has-hover';
|
||||
var hoverset = false,
|
||||
exclude,
|
||||
hovercls = 'uk-hover',
|
||||
selector = '.uk-overlay, .uk-overlay-hover, .uk-overlay-toggle, .uk-animation-hover, .uk-has-hover';
|
||||
|
||||
UI.$html.on('touchstart MSPointerDown pointerdown', selector, function() {
|
||||
UI.$html.on('mouseenter touchstart MSPointerDown pointerdown', selector, function() {
|
||||
|
||||
if (hoverset) $('.'+hovercls).removeClass(hovercls);
|
||||
|
||||
hoverset = $(this).addClass(hovercls);
|
||||
|
||||
}).on('touchend MSPointerUp pointerup', function(e) {
|
||||
}).on('mouseleave touchend MSPointerUp pointerup', function(e) {
|
||||
|
||||
exclude = $(e.target).parents(selector);
|
||||
|
||||
|
4
admin/custom/uikit/js/core/core.min.js
vendored
4
admin/custom/uikit/js/core/core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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";
|
||||
|
2
admin/custom/uikit/js/core/cover.min.js
vendored
2
admin/custom/uikit/js/core/cover.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! 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(t){"use strict";t.component("cover",{defaults:{automute:!0},boot:function(){t.ready(function(i){t.$("[data-uk-cover]",i).each(function(){var i=t.$(this);if(!i.data("cover")){t.cover(i,t.Utils.options(i.attr("data-uk-cover")))}})})},init:function(){if(this.parent=this.element.parent(),t.$win.on("load resize orientationchange",t.Utils.debounce(function(){this.check()}.bind(this),100)),this.on("display.uk.check",function(){this.element.is(":visible")&&this.check()}.bind(this)),this.check(),this.element.is("iframe")&&this.options.automute){var i=this.element.attr("src");this.element.attr("src","").on("load",function(){this.contentWindow.postMessage('{ "event": "command", "func": "mute", "method":"setVolume", "value":0}',"*")}).attr("src",[i,i.indexOf("?")>-1?"&":"?","enablejsapi=1&api=1"].join(""))}},check:function(){this.element.css({width:"",height:""}),this.dimension={w:this.element.width(),h:this.element.height()},this.element.attr("width")&&!isNaN(this.element.attr("width"))&&(this.dimension.w=this.element.attr("width")),this.element.attr("height")&&!isNaN(this.element.attr("height"))&&(this.dimension.h=this.element.attr("height")),this.ratio=this.dimension.w/this.dimension.h;var t,i,e=this.parent.width(),n=this.parent.height();e/this.ratio<n?(t=Math.ceil(n*this.ratio),i=n):(t=e,i=Math.ceil(e/this.ratio)),this.element.css({width:t,height:i})}})}(UIkit);
|
@ -1,19 +1,66 @@
|
||||
/*! 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";
|
||||
|
||||
var active = false, hoverIdle;
|
||||
var active = false, hoverIdle, flips = {
|
||||
'x': {
|
||||
"bottom-left" : 'bottom-right',
|
||||
"bottom-right" : 'bottom-left',
|
||||
"bottom-center" : 'bottom-center',
|
||||
"top-left" : 'top-right',
|
||||
"top-right" : 'top-left',
|
||||
"top-center" : 'top-center',
|
||||
"left-top" : 'right-top',
|
||||
"left-bottom" : 'right-bottom',
|
||||
"left-center" : 'right-center',
|
||||
"right-top" : 'left-top',
|
||||
"right-bottom" : 'left-bottom',
|
||||
"right-center" : 'left-center'
|
||||
},
|
||||
'y': {
|
||||
"bottom-left" : 'top-left',
|
||||
"bottom-right" : 'top-right',
|
||||
"bottom-center" : 'top-center',
|
||||
"top-left" : 'bottom-left',
|
||||
"top-right" : 'bottom-right',
|
||||
"top-center" : 'bottom-center',
|
||||
"left-top" : 'left-bottom',
|
||||
"left-bottom" : 'left-top',
|
||||
"left-center" : 'left-center',
|
||||
"right-top" : 'right-bottom',
|
||||
"right-bottom" : 'right-top',
|
||||
"right-center" : 'right-center'
|
||||
},
|
||||
'xy': {
|
||||
"bottom-left" : 'top-right',
|
||||
"bottom-right" : 'top-left',
|
||||
"bottom-center" : 'top-center',
|
||||
"top-left" : 'bottom-right',
|
||||
"top-right" : 'bottom-left',
|
||||
"top-center" : 'bottom-center',
|
||||
"left-top" : 'right-bottom',
|
||||
"left-bottom" : 'right-top',
|
||||
"left-center" : 'right-center',
|
||||
"right-top" : 'left-bottom',
|
||||
"right-bottom" : 'left-top',
|
||||
"right-center" : 'left-center'
|
||||
}
|
||||
};
|
||||
|
||||
UI.component('dropdown', {
|
||||
|
||||
defaults: {
|
||||
'mode' : 'hover',
|
||||
'remaintime' : 800,
|
||||
'justify' : false,
|
||||
'boundary' : UI.$win,
|
||||
'delay' : 0,
|
||||
'hoverDelayIdle' : 250
|
||||
'mode' : 'hover',
|
||||
'pos' : 'bottom-left',
|
||||
'offset' : 0,
|
||||
'remaintime' : 800,
|
||||
'justify' : false,
|
||||
'boundary' : UI.$win,
|
||||
'delay' : 0,
|
||||
'dropdownSelector': '.uk-dropdown,.uk-dropdown-blank',
|
||||
'hoverDelayIdle' : 250,
|
||||
'preventflip' : false
|
||||
},
|
||||
|
||||
remainIdle: false,
|
||||
@ -35,7 +82,7 @@
|
||||
dropdown.element.trigger(triggerevent);
|
||||
}
|
||||
|
||||
if (dropdown.element.find('.uk-dropdown').length) {
|
||||
if (dropdown.element.find(dropdown.options.dropdownSelector).length) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
@ -46,29 +93,43 @@
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.dropdown = this.find('.uk-dropdown');
|
||||
this.dropdown = this.find(this.options.dropdownSelector);
|
||||
this.offsetParent = this.dropdown.parents().filter(function() {
|
||||
return UI.$.inArray(UI.$(this).css('position'), ['relative', 'fixed', 'absolute']) !== -1;
|
||||
}).slice(0,1);
|
||||
|
||||
this.centered = this.dropdown.hasClass('uk-dropdown-center');
|
||||
this.justified = this.options.justify ? UI.$(this.options.justify) : false;
|
||||
|
||||
this.boundary = UI.$(this.options.boundary);
|
||||
this.flipped = this.dropdown.hasClass('uk-dropdown-flip');
|
||||
|
||||
if (!this.boundary.length) {
|
||||
this.boundary = UI.$win;
|
||||
}
|
||||
|
||||
// legacy DEPRECATED!
|
||||
if (this.dropdown.hasClass('uk-dropdown-up')) {
|
||||
this.options.pos = 'top-left';
|
||||
}
|
||||
if (this.dropdown.hasClass('uk-dropdown-flip')) {
|
||||
this.options.pos = this.options.pos.replace('left','right');
|
||||
}
|
||||
if (this.dropdown.hasClass('uk-dropdown-center')) {
|
||||
this.options.pos = this.options.pos.replace(/(left|right)/,'center');
|
||||
}
|
||||
//-- end legacy
|
||||
|
||||
// Init ARIA
|
||||
this.element.attr('aria-haspopup', 'true');
|
||||
this.element.attr('aria-expanded', this.element.hasClass("uk-open"));
|
||||
|
||||
if (this.options.mode == "click" || UI.support.touch) {
|
||||
|
||||
this.on("click.uikit.dropdown", function(e) {
|
||||
this.on("click.uk.dropdown", function(e) {
|
||||
|
||||
var $target = UI.$(e.target);
|
||||
|
||||
if (!$target.parents(".uk-dropdown").length) {
|
||||
if (!$target.parents($this.options.dropdownSelector).length) {
|
||||
|
||||
if ($target.is("a[href='#']") || $target.parent().is("a[href='#']") || ($this.dropdown.length && !$this.dropdown.is(":visible")) ){
|
||||
e.preventDefault();
|
||||
@ -83,7 +144,7 @@
|
||||
|
||||
} else {
|
||||
|
||||
if ($target.is("a:not(.js-uk-prevent)") || $target.is(".uk-dropdown-close") || !$this.dropdown.find(e.target).length) {
|
||||
if (!$this.dropdown.find(e.target).length || $target.is(".uk-dropdown-close") || $target.parents(".uk-dropdown-close").length) {
|
||||
$this.hide();
|
||||
}
|
||||
}
|
||||
@ -93,6 +154,8 @@
|
||||
|
||||
this.on("mouseenter", function(e) {
|
||||
|
||||
$this.trigger('pointerenter.uk.dropdown', [$this]);
|
||||
|
||||
if ($this.remainIdle) {
|
||||
clearTimeout($this.remainIdle);
|
||||
}
|
||||
@ -127,6 +190,8 @@
|
||||
if (active && active == $this) $this.hide();
|
||||
}, $this.options.remaintime);
|
||||
|
||||
$this.trigger('pointerleave.uk.dropdown', [$this]);
|
||||
|
||||
}).on("click", function(e){
|
||||
|
||||
var $target = UI.$(e.target);
|
||||
@ -135,6 +200,13 @@
|
||||
clearTimeout($this.remainIdle);
|
||||
}
|
||||
|
||||
if (active && active == $this) {
|
||||
if (!$this.dropdown.find(e.target).length || $target.is(".uk-dropdown-close") || $target.parents(".uk-dropdown-close").length) {
|
||||
$this.hide();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ($target.is("a[href='#']") || $target.parent().is("a[href='#']")){
|
||||
e.preventDefault();
|
||||
}
|
||||
@ -149,13 +221,15 @@
|
||||
UI.$html.off("click.outer.dropdown");
|
||||
|
||||
if (active && active != this) {
|
||||
active.hide();
|
||||
active.hide(true);
|
||||
}
|
||||
|
||||
if (hoverIdle) {
|
||||
clearTimeout(hoverIdle);
|
||||
}
|
||||
|
||||
this.trigger('beforeshow.uk.dropdown', [this]);
|
||||
|
||||
this.checkDimensions();
|
||||
this.element.addClass('uk-open');
|
||||
|
||||
@ -170,7 +244,10 @@
|
||||
this.registerOuterClick();
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
hide: function(force) {
|
||||
|
||||
this.trigger('beforehide.uk.dropdown', [this, force]);
|
||||
|
||||
this.element.removeClass('uk-open');
|
||||
|
||||
if (this.remainIdle) {
|
||||
@ -182,7 +259,7 @@
|
||||
// Update ARIA
|
||||
this.element.attr('aria-expanded', 'false');
|
||||
|
||||
this.trigger('hide.uk.dropdown', [this]);
|
||||
this.trigger('hide.uk.dropdown', [this, force]);
|
||||
|
||||
if (active == this) active = false;
|
||||
},
|
||||
@ -203,8 +280,8 @@
|
||||
|
||||
var $target = UI.$(e.target);
|
||||
|
||||
if (active == $this && ($target.is("a:not(.js-uk-prevent)") || $target.is(".uk-dropdown-close") || !$this.dropdown.find(e.target).length)) {
|
||||
$this.hide();
|
||||
if (active == $this && !$this.element.find(e.target).length) {
|
||||
$this.hide(true);
|
||||
UI.$html.off("click.outer.dropdown");
|
||||
}
|
||||
});
|
||||
@ -215,82 +292,234 @@
|
||||
|
||||
if (!this.dropdown.length) return;
|
||||
|
||||
// reset
|
||||
this.dropdown.removeClass('uk-dropdown-top uk-dropdown-bottom uk-dropdown-left uk-dropdown-right uk-dropdown-stack').css({
|
||||
'top-left':'',
|
||||
'left':'',
|
||||
'margin-left' :'',
|
||||
'margin-right':''
|
||||
});
|
||||
|
||||
if (this.justified && this.justified.length) {
|
||||
this.dropdown.css("min-width", "");
|
||||
}
|
||||
|
||||
var $this = this,
|
||||
dropdown = this.dropdown.css("margin-" + UI.langdirection, ""),
|
||||
offset = dropdown.show().offset(),
|
||||
width = dropdown.outerWidth(),
|
||||
var $this = this,
|
||||
pos = UI.$.extend({}, this.offsetParent.offset(), {width: this.offsetParent[0].offsetWidth, height: this.offsetParent[0].offsetHeight}),
|
||||
posoffset = this.options.offset,
|
||||
dropdown = this.dropdown,
|
||||
offset = dropdown.show().offset() || {left: 0, top: 0},
|
||||
width = dropdown.outerWidth(),
|
||||
height = dropdown.outerHeight(),
|
||||
boundarywidth = this.boundary.width(),
|
||||
boundaryoffset = this.boundary.offset() ? this.boundary.offset().left:0;
|
||||
boundaryoffset = this.boundary[0] !== window && this.boundary.offset() ? this.boundary.offset(): {top:0, left:0},
|
||||
dpos = this.options.pos;
|
||||
|
||||
// centered dropdown
|
||||
if (this.centered) {
|
||||
dropdown.css("margin-" + UI.langdirection, (parseFloat(width) / 2 - dropdown.parent().width() / 2) * -1);
|
||||
offset = dropdown.offset();
|
||||
var variants = {
|
||||
"bottom-left" : {top: 0 + pos.height + posoffset, left: 0},
|
||||
"bottom-right" : {top: 0 + pos.height + posoffset, left: 0 + pos.width - width},
|
||||
"bottom-center" : {top: 0 + pos.height + posoffset, left: 0 + pos.width / 2 - width / 2},
|
||||
"top-left" : {top: 0 - height - posoffset, left: 0},
|
||||
"top-right" : {top: 0 - height - posoffset, left: 0 + pos.width - width},
|
||||
"top-center" : {top: 0 - height - posoffset, left: 0 + pos.width / 2 - width / 2},
|
||||
"left-top" : {top: 0, left: 0 - width - posoffset},
|
||||
"left-bottom" : {top: 0 + pos.height - height, left: 0 - width - posoffset},
|
||||
"left-center" : {top: 0 + pos.height / 2 - height / 2, left: 0 - width - posoffset},
|
||||
"right-top" : {top: 0, left: 0 + pos.width + posoffset},
|
||||
"right-bottom" : {top: 0 + pos.height - height, left: 0 + pos.width + posoffset},
|
||||
"right-center" : {top: 0 + pos.height / 2 - height / 2, left: 0 + pos.width + posoffset}
|
||||
},
|
||||
css = {},
|
||||
pp;
|
||||
|
||||
// reset dropdown
|
||||
if ((width + offset.left) > boundarywidth || offset.left < 0) {
|
||||
dropdown.css("margin-" + UI.langdirection, "");
|
||||
offset = dropdown.offset();
|
||||
}
|
||||
}
|
||||
pp = dpos.split('-');
|
||||
css = variants[dpos] ? variants[dpos] : variants['bottom-left'];
|
||||
|
||||
// justify dropdown
|
||||
if (this.justified && this.justified.length) {
|
||||
justify(dropdown.css({left:0}), this.justified, boundarywidth);
|
||||
} else {
|
||||
|
||||
var jwidth = this.justified.outerWidth();
|
||||
if (this.options.preventflip !== true) {
|
||||
|
||||
dropdown.css("min-width", jwidth);
|
||||
var fdpos;
|
||||
|
||||
if (UI.langdirection == 'right') {
|
||||
|
||||
var right1 = boundarywidth - (this.justified.offset().left + jwidth),
|
||||
right2 = boundarywidth - (dropdown.offset().left + dropdown.outerWidth());
|
||||
|
||||
dropdown.css("margin-right", right1 - right2);
|
||||
|
||||
} else {
|
||||
dropdown.css("margin-left", this.justified.offset().left - offset.left);
|
||||
}
|
||||
|
||||
offset = dropdown.offset();
|
||||
|
||||
}
|
||||
|
||||
if ((width + (offset.left-boundaryoffset)) > boundarywidth) {
|
||||
dropdown.addClass('uk-dropdown-flip');
|
||||
offset = dropdown.offset();
|
||||
}
|
||||
|
||||
if ((offset.left-boundaryoffset) < 0) {
|
||||
|
||||
dropdown.addClass("uk-dropdown-stack");
|
||||
|
||||
if (dropdown.hasClass('uk-dropdown-flip')) {
|
||||
|
||||
if (!this.flipped) {
|
||||
dropdown.removeClass('uk-dropdown-flip');
|
||||
offset = dropdown.offset();
|
||||
dropdown.addClass('uk-dropdown-flip');
|
||||
switch(this.checkBoundary(pos.left + css.left, pos.top + css.top, width, height, boundarywidth)) {
|
||||
case "x":
|
||||
if(this.options.preventflip !=='x') fdpos = flips['x'][dpos] || 'right-top';
|
||||
break;
|
||||
case "y":
|
||||
if(this.options.preventflip !=='y') fdpos = flips['y'][dpos] || 'top-left';
|
||||
break;
|
||||
case "xy":
|
||||
if(!this.options.preventflip) fdpos = flips['xy'][dpos] || 'right-bottom';
|
||||
break;
|
||||
}
|
||||
|
||||
setTimeout(function(){
|
||||
if (fdpos) {
|
||||
|
||||
if ((dropdown.offset().left-boundaryoffset) < 0 || !$this.flipped && (dropdown.outerWidth() + (offset.left-boundaryoffset)) < boundarywidth) {
|
||||
dropdown.removeClass('uk-dropdown-flip');
|
||||
pp = fdpos.split('-');
|
||||
css = variants[fdpos] ? variants[fdpos] : variants['bottom-left'];
|
||||
|
||||
// check flipped
|
||||
if (this.checkBoundary(pos.left + css.left, pos.top + css.top, width, height, boundarywidth)) {
|
||||
pp = dpos.split('-');
|
||||
css = variants[dpos] ? variants[dpos] : variants['bottom-left'];
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (width > boundarywidth) {
|
||||
dropdown.addClass("uk-dropdown-stack");
|
||||
this.trigger('stack.uk.dropdown', [this]);
|
||||
}
|
||||
|
||||
dropdown.css("display", "");
|
||||
dropdown.css(css).css("display", "").addClass('uk-dropdown-'+pp[0]);
|
||||
},
|
||||
|
||||
checkBoundary: function(left, top, width, height, boundarywidth) {
|
||||
|
||||
var axis = "";
|
||||
|
||||
if (left < 0 || ((left - UI.$win.scrollLeft())+width) > boundarywidth) {
|
||||
axis += "x";
|
||||
}
|
||||
|
||||
if ((top - UI.$win.scrollTop()) < 0 || ((top - UI.$win.scrollTop())+height) > window.innerHeight) {
|
||||
axis += "y";
|
||||
}
|
||||
|
||||
return axis;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
UI.component('dropdownOverlay', {
|
||||
|
||||
defaults: {
|
||||
'justify' : false,
|
||||
'cls' : '',
|
||||
'duration': 200
|
||||
},
|
||||
|
||||
boot: function() {
|
||||
|
||||
// init code
|
||||
UI.ready(function(context) {
|
||||
|
||||
UI.$("[data-uk-dropdown-overlay]", context).each(function() {
|
||||
var ele = UI.$(this);
|
||||
|
||||
if (!ele.data("dropdownOverlay")) {
|
||||
UI.dropdownOverlay(ele, UI.Utils.options(ele.attr("data-uk-dropdown-overlay")));
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
init: function() {
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.justified = this.options.justify ? UI.$(this.options.justify) : false;
|
||||
this.overlay = this.element.find('uk-dropdown-overlay');
|
||||
|
||||
if (!this.overlay.length) {
|
||||
this.overlay = UI.$('<div class="uk-dropdown-overlay"></div>').appendTo(this.element);
|
||||
}
|
||||
|
||||
this.overlay.addClass(this.options.cls);
|
||||
|
||||
this.on({
|
||||
|
||||
'beforeshow.uk.dropdown': function(e, dropdown) {
|
||||
$this.dropdown = dropdown;
|
||||
|
||||
if ($this.justified && $this.justified.length) {
|
||||
justify($this.overlay.css({'display':'block', 'margin-left':'','margin-right':''}), $this.justified, $this.justified.outerWidth());
|
||||
}
|
||||
},
|
||||
|
||||
'show.uk.dropdown': function(e, dropdown) {
|
||||
|
||||
var h = $this.dropdown.dropdown.outerHeight(true);
|
||||
|
||||
$this.dropdown.element.removeClass('uk-open');
|
||||
|
||||
$this.overlay.stop().css('display', 'block').animate({height: h}, $this.options.duration, function() {
|
||||
|
||||
$this.dropdown.dropdown.css('visibility', '');
|
||||
$this.dropdown.element.addClass('uk-open');
|
||||
|
||||
UI.Utils.checkDisplay($this.dropdown.dropdown, true);
|
||||
});
|
||||
|
||||
$this.pointerleave = false;
|
||||
},
|
||||
|
||||
'hide.uk.dropdown': function() {
|
||||
$this.overlay.stop().animate({height: 0}, $this.options.duration);
|
||||
},
|
||||
|
||||
'pointerenter.uk.dropdown': function(e, dropdown) {
|
||||
clearTimeout($this.remainIdle);
|
||||
},
|
||||
|
||||
'pointerleave.uk.dropdown': function(e, dropdown) {
|
||||
$this.pointerleave = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.overlay.on({
|
||||
|
||||
'mouseenter': function() {
|
||||
if ($this.remainIdle) {
|
||||
clearTimeout($this.dropdown.remainIdle);
|
||||
clearTimeout($this.remainIdle);
|
||||
}
|
||||
},
|
||||
|
||||
'mouseleave': function(){
|
||||
|
||||
if ($this.pointerleave && active) {
|
||||
|
||||
$this.remainIdle = setTimeout(function() {
|
||||
if(active) active.hide();
|
||||
}, active.options.remaintime);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
function justify(ele, justifyTo, boundarywidth, offset) {
|
||||
|
||||
ele = UI.$(ele);
|
||||
justifyTo = UI.$(justifyTo);
|
||||
boundarywidth = boundarywidth || window.innerWidth;
|
||||
offset = offset || ele.offset();
|
||||
|
||||
if (justifyTo.length) {
|
||||
|
||||
var jwidth = justifyTo.outerWidth();
|
||||
|
||||
ele.css("min-width", jwidth);
|
||||
|
||||
if (UI.langdirection == 'right') {
|
||||
|
||||
var right1 = boundarywidth - (justifyTo.offset().left + jwidth),
|
||||
right2 = boundarywidth - (ele.offset().left + ele.outerWidth());
|
||||
|
||||
ele.css("margin-right", right1 - right2);
|
||||
|
||||
} else {
|
||||
ele.css("margin-left", justifyTo.offset().left - offset.left);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})(UIkit);
|
||||
|
4
admin/custom/uikit/js/core/dropdown.min.js
vendored
4
admin/custom/uikit/js/core/dropdown.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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";
|
||||
@ -87,7 +87,8 @@
|
||||
UI.component('gridMargin', {
|
||||
|
||||
defaults: {
|
||||
"cls": "uk-grid-margin"
|
||||
cls : 'uk-grid-margin',
|
||||
rowfirst : 'uk-row-first'
|
||||
},
|
||||
|
||||
boot: function() {
|
||||
|
4
admin/custom/uikit/js/core/grid.min.js
vendored
4
admin/custom/uikit/js/core/grid.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var i=[];t.component("gridMatchHeight",{defaults:{target:!1,row:!0,ignorestacked:!1},boot:function(){t.ready(function(i){t.$("[data-uk-grid-match]",i).each(function(){var i,n=t.$(this);n.data("gridMatchHeight")||(i=t.gridMatchHeight(n,t.Utils.options(n.attr("data-uk-grid-match"))))})})},init:function(){var n=this;this.columns=this.element.children(),this.elements=this.options.target?this.find(this.options.target):this.columns,this.columns.length&&(t.$win.on("load resize orientationchange",function(){var i=function(){n.match()};return t.$(function(){i()}),t.Utils.debounce(i,50)}()),t.$html.on("changed.uk.dom",function(){n.columns=n.element.children(),n.elements=n.options.target?n.find(n.options.target):n.columns,n.match()}),this.on("display.uk.check",function(){this.element.is(":visible")&&this.match()}.bind(this)),i.push(this))},match:function(){var i=this.columns.filter(":visible:first");if(i.length){var n=Math.ceil(100*parseFloat(i.css("width"))/parseFloat(i.parent().css("width")))>=100;return n&&!this.options.ignorestacked?this.revert():t.Utils.matchHeights(this.elements,this.options),this}},revert:function(){return this.elements.css("min-height",""),this}}),t.component("gridMargin",{defaults:{cls:"uk-grid-margin"},boot:function(){t.ready(function(i){t.$("[data-uk-grid-margin]",i).each(function(){var i,n=t.$(this);n.data("gridMargin")||(i=t.gridMargin(n,t.Utils.options(n.attr("data-uk-grid-margin"))))})})},init:function(){t.stackMargin(this.element,this.options)}})}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var i=[];t.component("gridMatchHeight",{defaults:{target:!1,row:!0,ignorestacked:!1},boot:function(){t.ready(function(i){t.$("[data-uk-grid-match]",i).each(function(){var i,n=t.$(this);n.data("gridMatchHeight")||(i=t.gridMatchHeight(n,t.Utils.options(n.attr("data-uk-grid-match"))))})})},init:function(){var n=this;this.columns=this.element.children(),this.elements=this.options.target?this.find(this.options.target):this.columns,this.columns.length&&(t.$win.on("load resize orientationchange",function(){var i=function(){n.match()};return t.$(function(){i()}),t.Utils.debounce(i,50)}()),t.$html.on("changed.uk.dom",function(){n.columns=n.element.children(),n.elements=n.options.target?n.find(n.options.target):n.columns,n.match()}),this.on("display.uk.check",function(){this.element.is(":visible")&&this.match()}.bind(this)),i.push(this))},match:function(){var i=this.columns.filter(":visible:first");if(i.length){var n=Math.ceil(100*parseFloat(i.css("width"))/parseFloat(i.parent().css("width")))>=100;return n&&!this.options.ignorestacked?this.revert():t.Utils.matchHeights(this.elements,this.options),this}},revert:function(){return this.elements.css("min-height",""),this}}),t.component("gridMargin",{defaults:{cls:"uk-grid-margin",rowfirst:"uk-row-first"},boot:function(){t.ready(function(i){t.$("[data-uk-grid-margin]",i).each(function(){var i,n=t.$(this);n.data("gridMargin")||(i=t.gridMargin(n,t.Utils.options(n.attr("data-uk-grid-margin"))))})})},init:function(){t.stackMargin(this.element,this.options)}})}(UIkit);
|
@ -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";
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
scrollable: false,
|
||||
transition: false,
|
||||
hasTransitioned: true,
|
||||
|
||||
init: function() {
|
||||
|
||||
@ -74,7 +75,14 @@
|
||||
|
||||
activeCount++;
|
||||
|
||||
this.element.addClass("uk-open");
|
||||
if (UI.support.transition) {
|
||||
this.hasTransitioned = false;
|
||||
this.element.one(UI.support.transition.end, function(){
|
||||
$this.hasTransitioned = true;
|
||||
}).addClass("uk-open");
|
||||
} else {
|
||||
this.element.addClass("uk-open");
|
||||
}
|
||||
|
||||
$html.addClass("uk-modal-page").height(); // force browser engine redraw
|
||||
|
||||
@ -90,7 +98,7 @@
|
||||
|
||||
hide: function(force) {
|
||||
|
||||
if (!force && UI.support.transition) {
|
||||
if (!force && UI.support.transition && this.hasTransitioned) {
|
||||
|
||||
var $this = this;
|
||||
|
||||
@ -136,14 +144,17 @@
|
||||
|
||||
if (scrollable.length) {
|
||||
|
||||
scrollable.css("height", 0);
|
||||
scrollable.css('height', 0);
|
||||
|
||||
var offset = Math.abs(parseInt(this.dialog.css("margin-top"), 10)),
|
||||
var offset = Math.abs(parseInt(this.dialog.css('margin-top'), 10)),
|
||||
dh = this.dialog.outerHeight(),
|
||||
wh = window.innerHeight,
|
||||
h = wh - 2*(offset < 20 ? 20:offset) - dh;
|
||||
|
||||
scrollable.css("height", h < this.options.minScrollHeight ? "":h);
|
||||
scrollable.css({
|
||||
'max-height': (h < this.options.minScrollHeight ? '':h),
|
||||
'height':''
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -154,21 +165,22 @@
|
||||
_hide: function() {
|
||||
|
||||
this.active = false;
|
||||
activeCount--;
|
||||
if (activeCount > 0) activeCount--;
|
||||
else activeCount = 0;
|
||||
|
||||
this.element.hide().removeClass("uk-open");
|
||||
this.element.hide().removeClass('uk-open');
|
||||
|
||||
// Update ARIA
|
||||
this.element.attr('aria-hidden', 'true');
|
||||
|
||||
if (!activeCount) {
|
||||
$html.removeClass("uk-modal-page");
|
||||
$html.removeClass('uk-modal-page');
|
||||
body.css(this.paddingdir, "");
|
||||
}
|
||||
|
||||
if(active===this) active = false;
|
||||
|
||||
this.trigger("hide.uk.modal");
|
||||
this.trigger('hide.uk.modal');
|
||||
},
|
||||
|
||||
isActive: function() {
|
||||
@ -265,31 +277,34 @@
|
||||
}, 50);
|
||||
});
|
||||
|
||||
modal.show();
|
||||
return modal.show();
|
||||
};
|
||||
|
||||
UI.modal.confirm = function(content, onconfirm, options) {
|
||||
UI.modal.confirm = function(content, onconfirm, oncancel) {
|
||||
|
||||
var options = arguments.length > 1 && arguments[arguments.length-1] ? arguments[arguments.length-1] : {};
|
||||
|
||||
onconfirm = UI.$.isFunction(onconfirm) ? onconfirm : function(){};
|
||||
options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
|
||||
oncancel = UI.$.isFunction(oncancel) ? oncancel : function(){};
|
||||
options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, UI.$.isFunction(options) ? {}:options);
|
||||
|
||||
var modal = UI.modal.dialog(([
|
||||
'<div class="uk-margin uk-modal-content">'+String(content)+'</div>',
|
||||
'<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary js-modal-confirm">'+options.labels.Ok+'</button> <button class="uk-button uk-modal-close">'+options.labels.Cancel+'</button></div>'
|
||||
'<div class="uk-modal-footer uk-text-right"><button class="uk-button js-modal-confirm-cancel">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-confirm">'+options.labels.Ok+'</button></div>'
|
||||
]).join(""), options);
|
||||
|
||||
modal.element.find(".js-modal-confirm").on("click", function(){
|
||||
onconfirm();
|
||||
modal.element.find(".js-modal-confirm, .js-modal-confirm-cancel").on("click", function(){
|
||||
UI.$(this).is('.js-modal-confirm') ? onconfirm() : oncancel();
|
||||
modal.hide();
|
||||
});
|
||||
|
||||
modal.on('show.uk.modal', function(){
|
||||
setTimeout(function(){
|
||||
modal.element.find('button:first').focus();
|
||||
modal.element.find('.js-modal-confirm').focus();
|
||||
}, 50);
|
||||
});
|
||||
|
||||
modal.show();
|
||||
return modal.show();
|
||||
};
|
||||
|
||||
UI.modal.prompt = function(text, value, onsubmit, options) {
|
||||
@ -300,7 +315,7 @@
|
||||
var modal = UI.modal.dialog(([
|
||||
text ? '<div class="uk-modal-content uk-form">'+String(text)+'</div>':'',
|
||||
'<div class="uk-margin-small-top uk-modal-content uk-form"><p><input type="text" class="uk-width-1-1"></p></div>',
|
||||
'<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary js-modal-ok">'+options.labels.Ok+'</button> <button class="uk-button uk-modal-close">'+options.labels.Cancel+'</button></div>'
|
||||
'<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-modal-close">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-ok">'+options.labels.Ok+'</button></div>'
|
||||
]).join(""), options),
|
||||
|
||||
input = modal.element.find("input[type='text']").val(value || '').on('keyup', function(e){
|
||||
@ -321,7 +336,7 @@
|
||||
}, 50);
|
||||
});
|
||||
|
||||
modal.show();
|
||||
return modal.show();
|
||||
};
|
||||
|
||||
UI.modal.blockUI = function(content, options) {
|
||||
@ -331,9 +346,8 @@
|
||||
]).join(""), UI.$.extend({bgclose:false, keyboard:false, modal:false}, options));
|
||||
|
||||
modal.content = modal.element.find('.uk-modal-content:first');
|
||||
modal.show();
|
||||
|
||||
return modal;
|
||||
return modal.show();
|
||||
};
|
||||
|
||||
|
||||
|
4
admin/custom/uikit/js/core/modal.min.js
vendored
4
admin/custom/uikit/js/core/modal.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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";
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.on("click.uikit.nav", this.options.toggle, function(e) {
|
||||
this.on("click.uk.nav", this.options.toggle, function(e) {
|
||||
e.preventDefault();
|
||||
var ele = UI.$(this);
|
||||
$this.open(ele.parent()[0] == $this.element[0] ? ele : ele.parent("li"));
|
||||
|
4
admin/custom/uikit/js/core/nav.min.js
vendored
4
admin/custom/uikit/js/core/nav.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(i){"use strict";function t(t){var s=i.$(t),a="auto";if(s.is(":visible"))a=s.outerHeight();else{var e={position:s.css("position"),visibility:s.css("visibility"),display:s.css("display")};a=s.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),s.css(e)}return a}i.component("nav",{defaults:{toggle:">li.uk-parent > a[href='#']",lists:">li.uk-parent > ul",multiple:!1},boot:function(){i.ready(function(t){i.$("[data-uk-nav]",t).each(function(){var t=i.$(this);if(!t.data("nav")){i.nav(t,i.Utils.options(t.attr("data-uk-nav")))}})})},init:function(){var t=this;this.on("click.uikit.nav",this.options.toggle,function(s){s.preventDefault();var a=i.$(this);t.open(a.parent()[0]==t.element[0]?a:a.parent("li"))}),this.find(this.options.lists).each(function(){var s=i.$(this),a=s.parent(),e=a.hasClass("uk-active");s.wrap('<div style="overflow:hidden;height:0;position:relative;"></div>'),a.data("list-container",s.parent()[e?"removeClass":"addClass"]("uk-hidden")),a.attr("aria-expanded",a.hasClass("uk-open")),e&&t.open(a,!0)})},open:function(s,a){var e=this,n=this.element,o=i.$(s),l=o.data("list-container");this.options.multiple||n.children(".uk-open").not(s).each(function(){var t=i.$(this);t.data("list-container")&&t.data("list-container").stop().animate({height:0},function(){i.$(this).parent().removeClass("uk-open").end().addClass("uk-hidden")})}),o.toggleClass("uk-open"),o.attr("aria-expanded",o.hasClass("uk-open")),l&&(o.hasClass("uk-open")&&l.removeClass("uk-hidden"),a?(l.stop().height(o.hasClass("uk-open")?"auto":0),o.hasClass("uk-open")||l.addClass("uk-hidden"),this.trigger("display.uk.check")):l.stop().animate({height:o.hasClass("uk-open")?t(l.find("ul:first")):0},function(){o.hasClass("uk-open")?l.css("height",""):l.addClass("uk-hidden"),e.trigger("display.uk.check")}))}})}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(i){"use strict";function t(t){var s=i.$(t),a="auto";if(s.is(":visible"))a=s.outerHeight();else{var e={position:s.css("position"),visibility:s.css("visibility"),display:s.css("display")};a=s.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),s.css(e)}return a}i.component("nav",{defaults:{toggle:">li.uk-parent > a[href='#']",lists:">li.uk-parent > ul",multiple:!1},boot:function(){i.ready(function(t){i.$("[data-uk-nav]",t).each(function(){var t=i.$(this);if(!t.data("nav")){i.nav(t,i.Utils.options(t.attr("data-uk-nav")))}})})},init:function(){var t=this;this.on("click.uk.nav",this.options.toggle,function(s){s.preventDefault();var a=i.$(this);t.open(a.parent()[0]==t.element[0]?a:a.parent("li"))}),this.find(this.options.lists).each(function(){var s=i.$(this),a=s.parent(),e=a.hasClass("uk-active");s.wrap('<div style="overflow:hidden;height:0;position:relative;"></div>'),a.data("list-container",s.parent()[e?"removeClass":"addClass"]("uk-hidden")),a.attr("aria-expanded",a.hasClass("uk-open")),e&&t.open(a,!0)})},open:function(s,a){var e=this,n=this.element,o=i.$(s),l=o.data("list-container");this.options.multiple||n.children(".uk-open").not(s).each(function(){var t=i.$(this);t.data("list-container")&&t.data("list-container").stop().animate({height:0},function(){i.$(this).parent().removeClass("uk-open").end().addClass("uk-hidden")})}),o.toggleClass("uk-open"),o.attr("aria-expanded",o.hasClass("uk-open")),l&&(o.hasClass("uk-open")&&l.removeClass("uk-hidden"),a?(l.stop().height(o.hasClass("uk-open")?"auto":0),o.hasClass("uk-open")||l.addClass("uk-hidden"),this.trigger("display.uk.check")):l.stop().animate({height:o.hasClass("uk-open")?t(l.find("ul:first")):0},function(){o.hasClass("uk-open")?l.css("height",""):l.addClass("uk-hidden"),e.trigger("display.uk.check")}))}})}(UIkit);
|
@ -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";
|
||||
@ -19,13 +19,15 @@
|
||||
bar = element.find(".uk-offcanvas-bar:first"),
|
||||
rtl = (UI.langdirection == "right"),
|
||||
flip = bar.hasClass("uk-offcanvas-bar-flip") ? -1:1,
|
||||
dir = flip * (rtl ? -1 : 1);
|
||||
dir = flip * (rtl ? -1 : 1),
|
||||
|
||||
scrollbarwidth = window.innerWidth - $body.width();
|
||||
|
||||
scrollpos = {x: window.pageXOffset, y: window.pageYOffset};
|
||||
|
||||
element.addClass("uk-active");
|
||||
|
||||
$body.css({"width": window.innerWidth, "height": window.innerHeight}).addClass("uk-offcanvas-page");
|
||||
$body.css({"width": window.innerWidth - scrollbarwidth, "height": window.innerHeight}).addClass("uk-offcanvas-page");
|
||||
$body.css((rtl ? "margin-right" : "margin-left"), (rtl ? -1 : 1) * (bar.outerWidth() * dir)).width(); // .width() - force redraw
|
||||
|
||||
$html.css('margin-top', scrollpos.y * -1);
|
||||
@ -96,7 +98,7 @@
|
||||
Offcanvas.hide();
|
||||
});
|
||||
|
||||
element.on("click", "a[href^='#']", function(e){
|
||||
element.on("click", "a[href*='#']", function(e){
|
||||
|
||||
var link = UI.$(this),
|
||||
href = link.attr("href");
|
||||
@ -110,16 +112,16 @@
|
||||
var target;
|
||||
|
||||
try {
|
||||
target = UI.$(href);
|
||||
target = UI.$(link[0].hash);
|
||||
} catch (e){
|
||||
target = ""
|
||||
target = '';
|
||||
}
|
||||
|
||||
if (!target.length) {
|
||||
target = UI.$('[name="'+href.replace('#','')+'"]');
|
||||
target = UI.$('[name="'+link[0].hash.replace('#','')+'"]');
|
||||
}
|
||||
|
||||
if (target.length && link.attr('data-uk-smooth-scroll') && UI.Utils.scrollToElement) {
|
||||
if (target.length && UI.Utils.scrollToElement) {
|
||||
UI.Utils.scrollToElement(target, UI.Utils.options(link.attr('data-uk-smooth-scroll') || '{}'));
|
||||
} else {
|
||||
window.location.href = href;
|
||||
|
4
admin/custom/uikit/js/core/offcanvas.min.js
vendored
4
admin/custom/uikit/js/core/offcanvas.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(a){"use strict";var t={x:window.scrollX,y:window.scrollY},n=(a.$win,a.$doc,a.$html),i={show:function(i){if(i=a.$(i),i.length){var o=a.$("body"),s=i.find(".uk-offcanvas-bar:first"),e="right"==a.langdirection,f=s.hasClass("uk-offcanvas-bar-flip")?-1:1,r=f*(e?-1:1);t={x:window.pageXOffset,y:window.pageYOffset},i.addClass("uk-active"),o.css({width:window.innerWidth,height:window.innerHeight}).addClass("uk-offcanvas-page"),o.css(e?"margin-right":"margin-left",(e?-1:1)*s.outerWidth()*r).width(),n.css("margin-top",-1*t.y),s.addClass("uk-offcanvas-bar-show"),this._initElement(i),s.trigger("show.uk.offcanvas",[i,s]),i.attr("aria-hidden","false")}},hide:function(i){var o=a.$("body"),s=a.$(".uk-offcanvas.uk-active"),e="right"==a.langdirection,f=s.find(".uk-offcanvas-bar:first"),r=function(){o.removeClass("uk-offcanvas-page").css({width:"",height:"","margin-left":"","margin-right":""}),s.removeClass("uk-active"),f.removeClass("uk-offcanvas-bar-show"),n.css("margin-top",""),window.scrollTo(t.x,t.y),f.trigger("hide.uk.offcanvas",[s,f]),s.attr("aria-hidden","true")};s.length&&(a.support.transition&&!i?(o.one(a.support.transition.end,function(){r()}).css(e?"margin-right":"margin-left",""),setTimeout(function(){f.removeClass("uk-offcanvas-bar-show")},0)):r())},_initElement:function(t){t.data("OffcanvasInit")||(t.on("click.uk.offcanvas swipeRight.uk.offcanvas swipeLeft.uk.offcanvas",function(t){var n=a.$(t.target);if(!t.type.match(/swipe/)&&!n.hasClass("uk-offcanvas-close")){if(n.hasClass("uk-offcanvas-bar"))return;if(n.parents(".uk-offcanvas-bar:first").length)return}t.stopImmediatePropagation(),i.hide()}),t.on("click","a[href^='#']",function(){var t=a.$(this),n=t.attr("href");"#"!=n&&(a.$doc.one("hide.uk.offcanvas",function(){var i;try{i=a.$(n)}catch(o){i=""}i.length||(i=a.$('[name="'+n.replace("#","")+'"]')),i.length&&t.attr("data-uk-smooth-scroll")&&a.Utils.scrollToElement?a.Utils.scrollToElement(i,a.Utils.options(t.attr("data-uk-smooth-scroll")||"{}")):window.location.href=n}),i.hide())}),t.data("OffcanvasInit",!0))}};a.component("offcanvasTrigger",{boot:function(){n.on("click.offcanvas.uikit","[data-uk-offcanvas]",function(t){t.preventDefault();var n=a.$(this);if(!n.data("offcanvasTrigger")){{a.offcanvasTrigger(n,a.Utils.options(n.attr("data-uk-offcanvas")))}n.trigger("click")}}),n.on("keydown.uk.offcanvas",function(a){27===a.keyCode&&i.hide()})},init:function(){var t=this;this.options=a.$.extend({target:t.element.is("a")?t.element.attr("href"):!1},this.options),this.on("click",function(a){a.preventDefault(),i.show(t.options.target)})}}),a.offcanvas=i}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(a){"use strict";var t={x:window.scrollX,y:window.scrollY},n=(a.$win,a.$doc,a.$html),i={show:function(i){if(i=a.$(i),i.length){var o=a.$("body"),s=i.find(".uk-offcanvas-bar:first"),e="right"==a.langdirection,f=s.hasClass("uk-offcanvas-bar-flip")?-1:1,r=f*(e?-1:1),c=window.innerWidth-o.width();t={x:window.pageXOffset,y:window.pageYOffset},i.addClass("uk-active"),o.css({width:window.innerWidth-c,height:window.innerHeight}).addClass("uk-offcanvas-page"),o.css(e?"margin-right":"margin-left",(e?-1:1)*s.outerWidth()*r).width(),n.css("margin-top",-1*t.y),s.addClass("uk-offcanvas-bar-show"),this._initElement(i),s.trigger("show.uk.offcanvas",[i,s]),i.attr("aria-hidden","false")}},hide:function(i){var o=a.$("body"),s=a.$(".uk-offcanvas.uk-active"),e="right"==a.langdirection,f=s.find(".uk-offcanvas-bar:first"),r=function(){o.removeClass("uk-offcanvas-page").css({width:"",height:"","margin-left":"","margin-right":""}),s.removeClass("uk-active"),f.removeClass("uk-offcanvas-bar-show"),n.css("margin-top",""),window.scrollTo(t.x,t.y),f.trigger("hide.uk.offcanvas",[s,f]),s.attr("aria-hidden","true")};s.length&&(a.support.transition&&!i?(o.one(a.support.transition.end,function(){r()}).css(e?"margin-right":"margin-left",""),setTimeout(function(){f.removeClass("uk-offcanvas-bar-show")},0)):r())},_initElement:function(t){t.data("OffcanvasInit")||(t.on("click.uk.offcanvas swipeRight.uk.offcanvas swipeLeft.uk.offcanvas",function(t){var n=a.$(t.target);if(!t.type.match(/swipe/)&&!n.hasClass("uk-offcanvas-close")){if(n.hasClass("uk-offcanvas-bar"))return;if(n.parents(".uk-offcanvas-bar:first").length)return}t.stopImmediatePropagation(),i.hide()}),t.on("click","a[href*='#']",function(){var t=a.$(this),n=t.attr("href");"#"!=n&&(a.$doc.one("hide.uk.offcanvas",function(){var i;try{i=a.$(t[0].hash)}catch(o){i=""}i.length||(i=a.$('[name="'+t[0].hash.replace("#","")+'"]')),i.length&&a.Utils.scrollToElement?a.Utils.scrollToElement(i,a.Utils.options(t.attr("data-uk-smooth-scroll")||"{}")):window.location.href=n}),i.hide())}),t.data("OffcanvasInit",!0))}};a.component("offcanvasTrigger",{boot:function(){n.on("click.offcanvas.uikit","[data-uk-offcanvas]",function(t){t.preventDefault();var n=a.$(this);if(!n.data("offcanvasTrigger")){{a.offcanvasTrigger(n,a.Utils.options(n.attr("data-uk-offcanvas")))}n.trigger("click")}}),n.on("keydown.uk.offcanvas",function(a){27===a.keyCode&&i.hide()})},init:function(){var t=this;this.options=a.$.extend({target:t.element.is("a")?t.element.attr("href"):!1},this.options),this.on("click",function(a){a.preventDefault(),i.show(t.options.target)})}}),a.offcanvas=i}(UIkit);
|
@ -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";
|
||||
@ -86,6 +86,7 @@
|
||||
|
||||
if (element.data('scrollspy-idle')) {
|
||||
clearTimeout(element.data('scrollspy-idle'));
|
||||
element.data('scrollspy-idle', false);
|
||||
}
|
||||
|
||||
element.removeClass("uk-scrollspy-inview").toggleClass(toggle);
|
||||
@ -148,7 +149,7 @@
|
||||
init: function() {
|
||||
|
||||
var ids = [],
|
||||
links = this.find("a[href^='#']").each(function(){ ids.push(UI.$(this).attr("href")); }),
|
||||
links = this.find("a[href^='#']").each(function(){ if(this.getAttribute("href").trim()!=='#') ids.push(this.getAttribute("href")); }),
|
||||
targets = UI.$(ids.join(",")),
|
||||
|
||||
clsActive = this.options.cls,
|
||||
@ -179,7 +180,7 @@
|
||||
if (!target) return;
|
||||
|
||||
if ($this.options.closest) {
|
||||
links.closest(clsClosest).removeClass(clsActive);
|
||||
links.blur().closest(clsClosest).removeClass(clsActive);
|
||||
navitems = links.filter("a[href='#"+target.attr("id")+"']").closest(clsClosest).addClass(clsActive);
|
||||
} else {
|
||||
navitems = links.removeClass(clsActive).filter("a[href='#"+target.attr("id")+"']").addClass(clsActive);
|
||||
|
4
admin/custom/uikit/js/core/scrollspy.min.js
vendored
4
admin/custom/uikit/js/core/scrollspy.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var s=t.$win,o=t.$doc,i=[],e=function(){for(var t=0;t<i.length;t++)window.requestAnimationFrame.apply(window,[i[t].check])};t.component("scrollspy",{defaults:{target:!1,cls:"uk-scrollspy-inview",initcls:"uk-scrollspy-init-inview",topoffset:0,leftoffset:0,repeat:!1,delay:0},boot:function(){o.on("scrolling.uk.document",e),s.on("load resize orientationchange",t.Utils.debounce(e,50)),t.ready(function(s){t.$("[data-uk-scrollspy]",s).each(function(){var s=t.$(this);if(!s.data("scrollspy")){t.scrollspy(s,t.Utils.options(s.attr("data-uk-scrollspy")))}})})},init:function(){var s,o=this,e=this.options.cls.split(/,/),l=function(){var i=o.options.target?o.element.find(o.options.target):o.element,l=1===i.length?1:0,n=0;i.each(function(){var i=t.$(this),a=i.data("inviewstate"),r=t.Utils.isInView(i,o.options),c=i.data("ukScrollspyCls")||e[n].trim();!r||a||i.data("scrollspy-idle")||(s||(i.addClass(o.options.initcls),o.offset=i.offset(),s=!0,i.trigger("init.uk.scrollspy")),i.data("scrollspy-idle",setTimeout(function(){i.addClass("uk-scrollspy-inview").toggleClass(c).width(),i.trigger("inview.uk.scrollspy"),i.data("scrollspy-idle",!1),i.data("inviewstate",!0)},o.options.delay*l)),l++),!r&&a&&o.options.repeat&&(i.data("scrollspy-idle")&&clearTimeout(i.data("scrollspy-idle")),i.removeClass("uk-scrollspy-inview").toggleClass(c),i.data("inviewstate",!1),i.trigger("outview.uk.scrollspy")),n=e[n+1]?n+1:0})};l(),this.check=l,i.push(this)}});var l=[],n=function(){for(var t=0;t<l.length;t++)window.requestAnimationFrame.apply(window,[l[t].check])};t.component("scrollspynav",{defaults:{cls:"uk-active",closest:!1,topoffset:0,leftoffset:0,smoothscroll:!1},boot:function(){o.on("scrolling.uk.document",n),s.on("resize orientationchange",t.Utils.debounce(n,50)),t.ready(function(s){t.$("[data-uk-scrollspy-nav]",s).each(function(){var s=t.$(this);if(!s.data("scrollspynav")){t.scrollspynav(s,t.Utils.options(s.attr("data-uk-scrollspy-nav")))}})})},init:function(){var o,i=[],e=this.find("a[href^='#']").each(function(){i.push(t.$(this).attr("href"))}),n=t.$(i.join(",")),a=this.options.cls,r=this.options.closest||this.options.closest,c=this,p=function(){o=[];for(var i=0;i<n.length;i++)t.Utils.isInView(n.eq(i),c.options)&&o.push(n.eq(i));if(o.length){var l,p=s.scrollTop(),f=function(){for(var t=0;t<o.length;t++)if(o[t].offset().top>=p)return o[t]}();if(!f)return;c.options.closest?(e.closest(r).removeClass(a),l=e.filter("a[href='#"+f.attr("id")+"']").closest(r).addClass(a)):l=e.removeClass(a).filter("a[href='#"+f.attr("id")+"']").addClass(a),c.element.trigger("inview.uk.scrollspynav",[f,l])}};this.options.smoothscroll&&t.smoothScroll&&e.each(function(){t.smoothScroll(this,c.options.smoothscroll)}),p(),this.element.data("scrollspynav",this),this.check=p,l.push(this)}})}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var s=t.$win,o=t.$doc,i=[],e=function(){for(var t=0;t<i.length;t++)window.requestAnimationFrame.apply(window,[i[t].check])};t.component("scrollspy",{defaults:{target:!1,cls:"uk-scrollspy-inview",initcls:"uk-scrollspy-init-inview",topoffset:0,leftoffset:0,repeat:!1,delay:0},boot:function(){o.on("scrolling.uk.document",e),s.on("load resize orientationchange",t.Utils.debounce(e,50)),t.ready(function(s){t.$("[data-uk-scrollspy]",s).each(function(){var s=t.$(this);if(!s.data("scrollspy")){t.scrollspy(s,t.Utils.options(s.attr("data-uk-scrollspy")))}})})},init:function(){var s,o=this,e=this.options.cls.split(/,/),l=function(){var i=o.options.target?o.element.find(o.options.target):o.element,l=1===i.length?1:0,n=0;i.each(function(){var i=t.$(this),a=i.data("inviewstate"),r=t.Utils.isInView(i,o.options),c=i.data("ukScrollspyCls")||e[n].trim();!r||a||i.data("scrollspy-idle")||(s||(i.addClass(o.options.initcls),o.offset=i.offset(),s=!0,i.trigger("init.uk.scrollspy")),i.data("scrollspy-idle",setTimeout(function(){i.addClass("uk-scrollspy-inview").toggleClass(c).width(),i.trigger("inview.uk.scrollspy"),i.data("scrollspy-idle",!1),i.data("inviewstate",!0)},o.options.delay*l)),l++),!r&&a&&o.options.repeat&&(i.data("scrollspy-idle")&&(clearTimeout(i.data("scrollspy-idle")),i.data("scrollspy-idle",!1)),i.removeClass("uk-scrollspy-inview").toggleClass(c),i.data("inviewstate",!1),i.trigger("outview.uk.scrollspy")),n=e[n+1]?n+1:0})};l(),this.check=l,i.push(this)}});var l=[],n=function(){for(var t=0;t<l.length;t++)window.requestAnimationFrame.apply(window,[l[t].check])};t.component("scrollspynav",{defaults:{cls:"uk-active",closest:!1,topoffset:0,leftoffset:0,smoothscroll:!1},boot:function(){o.on("scrolling.uk.document",n),s.on("resize orientationchange",t.Utils.debounce(n,50)),t.ready(function(s){t.$("[data-uk-scrollspy-nav]",s).each(function(){var s=t.$(this);if(!s.data("scrollspynav")){t.scrollspynav(s,t.Utils.options(s.attr("data-uk-scrollspy-nav")))}})})},init:function(){var o,i=[],e=this.find("a[href^='#']").each(function(){"#"!==this.getAttribute("href").trim()&&i.push(this.getAttribute("href"))}),n=t.$(i.join(",")),a=this.options.cls,r=this.options.closest||this.options.closest,c=this,p=function(){o=[];for(var i=0;i<n.length;i++)t.Utils.isInView(n.eq(i),c.options)&&o.push(n.eq(i));if(o.length){var l,p=s.scrollTop(),u=function(){for(var t=0;t<o.length;t++)if(o[t].offset().top>=p)return o[t]}();if(!u)return;c.options.closest?(e.blur().closest(r).removeClass(a),l=e.filter("a[href='#"+u.attr("id")+"']").closest(r).addClass(a)):l=e.removeClass(a).filter("a[href='#"+u.attr("id")+"']").addClass(a),c.element.trigger("inview.uk.scrollspynav",[u,l])}};this.options.smoothscroll&&t.smoothScroll&&e.each(function(){t.smoothScroll(this,c.options.smoothscroll)}),p(),this.element.data("scrollspynav",this),this.check=p,l.push(this)}})}(UIkit);
|
@ -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";
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! 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(t){"use strict";function o(o,i){i=t.$.extend({duration:1e3,transition:"easeOutExpo",offset:0,complete:function(){}},i);var n=o.offset().top-i.offset,s=t.$doc.height(),e=window.innerHeight;n+e>s&&(n=s-e),t.$("html,body").stop().animate({scrollTop:n},i.duration,i.transition).promise().done(i.complete)}t.component("smoothScroll",{boot:function(){t.$html.on("click.smooth-scroll.uikit","[data-uk-smooth-scroll]",function(){var o=t.$(this);if(!o.data("smoothScroll")){{t.smoothScroll(o,t.Utils.options(o.attr("data-uk-smooth-scroll")))}o.trigger("click")}return!1})},init:function(){var i=this;this.on("click",function(n){n.preventDefault(),o(t.$(this.hash).length?t.$(this.hash):t.$("body"),i.options)})}}),t.Utils.scrollToElement=o,t.$.easing.easeOutExpo||(t.$.easing.easeOutExpo=function(t,o,i,n,s){return o==s?i+n:n*(-Math.pow(2,-10*o/s)+1)+i})}(UIkit);
|
@ -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";
|
||||
@ -12,7 +12,8 @@
|
||||
toggle : ">*",
|
||||
active : 0,
|
||||
animation : false,
|
||||
duration : 200
|
||||
duration : 200,
|
||||
swiping : true
|
||||
},
|
||||
|
||||
animating: false,
|
||||
@ -36,7 +37,7 @@
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.on("click.uikit.switcher", this.options.toggle, function(e) {
|
||||
this.on("click.uk.switcher", this.options.toggle, function(e) {
|
||||
e.preventDefault();
|
||||
$this.show(this);
|
||||
});
|
||||
@ -69,12 +70,17 @@
|
||||
default:
|
||||
$this.show(parseInt(item, 10));
|
||||
}
|
||||
}).on('swipeRight swipeLeft', function(e) {
|
||||
e.preventDefault();
|
||||
if(!window.getSelection().toString()) {
|
||||
$this.show($this.index + (e.type == 'swipeLeft' ? 1 : -1));
|
||||
}
|
||||
});
|
||||
|
||||
if (this.options.swiping) {
|
||||
|
||||
this.connect.on('swipeRight swipeLeft', function(e) {
|
||||
e.preventDefault();
|
||||
if(!window.getSelection().toString()) {
|
||||
$this.show($this.index + (e.type == 'swipeLeft' ? 1 : -1));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var toggles = this.find(this.options.toggle),
|
||||
@ -180,6 +186,7 @@
|
||||
UI.Utils.checkDisplay(next, true);
|
||||
|
||||
$this.animating = false;
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -262,6 +269,8 @@
|
||||
clsOut = cls[1] || cls[0];
|
||||
}
|
||||
|
||||
UI.$body.css('overflow-x', 'hidden'); // fix scroll jumping in iOS
|
||||
|
||||
release = function() {
|
||||
|
||||
if (current) current.hide().removeClass('uk-active '+clsOut+' uk-animation-reverse');
|
||||
@ -272,6 +281,8 @@
|
||||
|
||||
d.resolve();
|
||||
|
||||
UI.$body.css('overflow-x', '');
|
||||
|
||||
if (current) current.css({opacity:'', display:''});
|
||||
|
||||
}.bind(this)).show();
|
||||
|
4
admin/custom/uikit/js/core/switcher.min.js
vendored
4
admin/custom/uikit/js/core/switcher.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";function i(i,n,e){var a,s=t.$.Deferred(),o=i,r=i;return e[0]===n[0]?(s.resolve(),s.promise()):("object"==typeof i&&(o=i[0],r=i[1]||i[0]),a=function(){n&&n.hide().removeClass("uk-active "+r+" uk-animation-reverse"),e.addClass(o).one(t.support.animation.end,function(){e.removeClass(""+o).css({opacity:"",display:""}),s.resolve(),n&&n.css({opacity:"",display:""})}.bind(this)).show()},e.css("animation-duration",this.options.duration+"ms"),n&&n.length?(n.css("animation-duration",this.options.duration+"ms"),n.css("display","none").addClass(r+" uk-animation-reverse").one(t.support.animation.end,function(){a()}.bind(this)).css("display","")):(e.addClass("uk-active"),a()),s.promise())}var n;t.component("switcher",{defaults:{connect:!1,toggle:">*",active:0,animation:!1,duration:200},animating:!1,boot:function(){t.ready(function(i){t.$("[data-uk-switcher]",i).each(function(){var i=t.$(this);if(!i.data("switcher")){t.switcher(i,t.Utils.options(i.attr("data-uk-switcher")))}})})},init:function(){var i=this;if(this.on("click.uikit.switcher",this.options.toggle,function(t){t.preventDefault(),i.show(this)}),this.options.connect){this.connect=t.$(this.options.connect),this.connect.find(".uk-active").removeClass(".uk-active"),this.connect.length&&(this.connect.children().attr("aria-hidden","true"),this.connect.on("click","[data-uk-switcher-item]",function(n){n.preventDefault();var e=t.$(this).attr("data-uk-switcher-item");if(i.index!=e)switch(e){case"next":case"previous":i.show(i.index+("next"==e?1:-1));break;default:i.show(parseInt(e,10))}}).on("swipeRight swipeLeft",function(t){t.preventDefault(),window.getSelection().toString()||i.show(i.index+("swipeLeft"==t.type?1:-1))}));var n=this.find(this.options.toggle),e=n.filter(".uk-active");if(e.length)this.show(e,!1);else{if(this.options.active===!1)return;e=n.eq(this.options.active),this.show(e.length?e:n.eq(0),!1)}n.not(e).attr("aria-expanded","false"),e.attr("aria-expanded","true"),this.on("changed.uk.dom",function(){i.connect=t.$(i.options.connect)})}},show:function(e,a){if(!this.animating){if(isNaN(e))e=t.$(e);else{var s=this.find(this.options.toggle);e=0>e?s.length-1:e,e=s.eq(s[e]?e:0)}var o=this,s=this.find(this.options.toggle),r=t.$(e),c=n[this.options.animation]||function(t,e){if(!o.options.animation)return n.none.apply(o);var a=o.options.animation.split(",");return 1==a.length&&(a[1]=a[0]),a[0]=a[0].trim(),a[1]=a[1].trim(),i.apply(o,[a,t,e])};a!==!1&&t.support.animation||(c=n.none),r.hasClass("uk-disabled")||(s.attr("aria-expanded","false"),r.attr("aria-expanded","true"),s.filter(".uk-active").removeClass("uk-active"),r.addClass("uk-active"),this.options.connect&&this.connect.length&&(this.index=this.find(this.options.toggle).index(r),-1==this.index&&(this.index=0),this.connect.each(function(){var i=t.$(this),n=t.$(i.children()),e=t.$(n.filter(".uk-active")),a=t.$(n.eq(o.index));o.animating=!0,c.apply(o,[e,a]).then(function(){e.removeClass("uk-active"),a.addClass("uk-active"),e.attr("aria-hidden","true"),a.attr("aria-hidden","false"),t.Utils.checkDisplay(a,!0),o.animating=!1})})),this.trigger("show.uk.switcher",[r]))}}}),n={none:function(){var i=t.$.Deferred();return i.resolve(),i.promise()},fade:function(t,n){return i.apply(this,["uk-animation-fade",t,n])},"slide-bottom":function(t,n){return i.apply(this,["uk-animation-slide-bottom",t,n])},"slide-top":function(t,n){return i.apply(this,["uk-animation-slide-top",t,n])},"slide-vertical":function(t,n){var e=["uk-animation-slide-top","uk-animation-slide-bottom"];return t&&t.index()>n.index()&&e.reverse(),i.apply(this,[e,t,n])},"slide-left":function(t,n){return i.apply(this,["uk-animation-slide-left",t,n])},"slide-right":function(t,n){return i.apply(this,["uk-animation-slide-right",t,n])},"slide-horizontal":function(t,n){var e=["uk-animation-slide-right","uk-animation-slide-left"];return t&&t.index()>n.index()&&e.reverse(),i.apply(this,[e,t,n])},scale:function(t,n){return i.apply(this,["uk-animation-scale-up",t,n])}},t.switcher.animations=n}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";function i(i,n,e){var s,a=t.$.Deferred(),o=i,r=i;return e[0]===n[0]?(a.resolve(),a.promise()):("object"==typeof i&&(o=i[0],r=i[1]||i[0]),t.$body.css("overflow-x","hidden"),s=function(){n&&n.hide().removeClass("uk-active "+r+" uk-animation-reverse"),e.addClass(o).one(t.support.animation.end,function(){e.removeClass(""+o).css({opacity:"",display:""}),a.resolve(),t.$body.css("overflow-x",""),n&&n.css({opacity:"",display:""})}.bind(this)).show()},e.css("animation-duration",this.options.duration+"ms"),n&&n.length?(n.css("animation-duration",this.options.duration+"ms"),n.css("display","none").addClass(r+" uk-animation-reverse").one(t.support.animation.end,function(){s()}.bind(this)).css("display","")):(e.addClass("uk-active"),s()),a.promise())}var n;t.component("switcher",{defaults:{connect:!1,toggle:">*",active:0,animation:!1,duration:200,swiping:!0},animating:!1,boot:function(){t.ready(function(i){t.$("[data-uk-switcher]",i).each(function(){var i=t.$(this);if(!i.data("switcher")){t.switcher(i,t.Utils.options(i.attr("data-uk-switcher")))}})})},init:function(){var i=this;if(this.on("click.uk.switcher",this.options.toggle,function(t){t.preventDefault(),i.show(this)}),this.options.connect){this.connect=t.$(this.options.connect),this.connect.find(".uk-active").removeClass(".uk-active"),this.connect.length&&(this.connect.children().attr("aria-hidden","true"),this.connect.on("click","[data-uk-switcher-item]",function(n){n.preventDefault();var e=t.$(this).attr("data-uk-switcher-item");if(i.index!=e)switch(e){case"next":case"previous":i.show(i.index+("next"==e?1:-1));break;default:i.show(parseInt(e,10))}}),this.options.swiping&&this.connect.on("swipeRight swipeLeft",function(t){t.preventDefault(),window.getSelection().toString()||i.show(i.index+("swipeLeft"==t.type?1:-1))}));var n=this.find(this.options.toggle),e=n.filter(".uk-active");if(e.length)this.show(e,!1);else{if(this.options.active===!1)return;e=n.eq(this.options.active),this.show(e.length?e:n.eq(0),!1)}n.not(e).attr("aria-expanded","false"),e.attr("aria-expanded","true"),this.on("changed.uk.dom",function(){i.connect=t.$(i.options.connect)})}},show:function(e,s){if(!this.animating){if(isNaN(e))e=t.$(e);else{var a=this.find(this.options.toggle);e=0>e?a.length-1:e,e=a.eq(a[e]?e:0)}var o=this,a=this.find(this.options.toggle),r=t.$(e),c=n[this.options.animation]||function(t,e){if(!o.options.animation)return n.none.apply(o);var s=o.options.animation.split(",");return 1==s.length&&(s[1]=s[0]),s[0]=s[0].trim(),s[1]=s[1].trim(),i.apply(o,[s,t,e])};s!==!1&&t.support.animation||(c=n.none),r.hasClass("uk-disabled")||(a.attr("aria-expanded","false"),r.attr("aria-expanded","true"),a.filter(".uk-active").removeClass("uk-active"),r.addClass("uk-active"),this.options.connect&&this.connect.length&&(this.index=this.find(this.options.toggle).index(r),-1==this.index&&(this.index=0),this.connect.each(function(){var i=t.$(this),n=t.$(i.children()),e=t.$(n.filter(".uk-active")),s=t.$(n.eq(o.index));o.animating=!0,c.apply(o,[e,s]).then(function(){e.removeClass("uk-active"),s.addClass("uk-active"),e.attr("aria-hidden","true"),s.attr("aria-hidden","false"),t.Utils.checkDisplay(s,!0),o.animating=!1})})),this.trigger("show.uk.switcher",[r]))}}}),n={none:function(){var i=t.$.Deferred();return i.resolve(),i.promise()},fade:function(t,n){return i.apply(this,["uk-animation-fade",t,n])},"slide-bottom":function(t,n){return i.apply(this,["uk-animation-slide-bottom",t,n])},"slide-top":function(t,n){return i.apply(this,["uk-animation-slide-top",t,n])},"slide-vertical":function(t,n){var e=["uk-animation-slide-top","uk-animation-slide-bottom"];return t&&t.index()>n.index()&&e.reverse(),i.apply(this,[e,t,n])},"slide-left":function(t,n){return i.apply(this,["uk-animation-slide-left",t,n])},"slide-right":function(t,n){return i.apply(this,["uk-animation-slide-right",t,n])},"slide-horizontal":function(t,n){var e=["uk-animation-slide-right","uk-animation-slide-left"];return t&&t.index()>n.index()&&e.reverse(),i.apply(this,[e,t,n])},scale:function(t,n){return i.apply(this,["uk-animation-scale-up",t,n])}},t.switcher.animations=n}(UIkit);
|
@ -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";
|
||||
@ -10,7 +10,8 @@
|
||||
'connect' : false,
|
||||
'active' : 0,
|
||||
'animation' : false,
|
||||
'duration' : 200
|
||||
'duration' : 200,
|
||||
'swiping' : true
|
||||
},
|
||||
|
||||
boot: function() {
|
||||
@ -35,7 +36,7 @@
|
||||
|
||||
this.current = false;
|
||||
|
||||
this.on("click.uikit.tab", this.options.target, function(e) {
|
||||
this.on("click.uk.tab", this.options.target, function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
@ -72,7 +73,7 @@
|
||||
if (this.element.hasClass("uk-tab-bottom")) this.responsivetab.dropdown.addClass("uk-dropdown-up");
|
||||
|
||||
// handle click
|
||||
this.responsivetab.lst.on('click.uikit.tab', 'a', function(e) {
|
||||
this.responsivetab.lst.on('click.uk.tab', 'a', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
@ -91,15 +92,16 @@
|
||||
// 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
|
||||
'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"});
|
||||
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')]);
|
||||
|
4
admin/custom/uikit/js/core/tab.min.js
vendored
4
admin/custom/uikit/js/core/tab.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";t.component("tab",{defaults:{target:">li:not(.uk-tab-responsive, .uk-disabled)",connect:!1,active:0,animation:!1,duration:200},boot:function(){t.ready(function(i){t.$("[data-uk-tab]",i).each(function(){var i=t.$(this);if(!i.data("tab")){t.tab(i,t.Utils.options(i.attr("data-uk-tab")))}})})},init:function(){var i=this;this.current=!1,this.on("click.uikit.tab",this.options.target,function(e){if(e.preventDefault(),!i.switcher||!i.switcher.animating){var s=i.find(i.options.target).not(this);s.removeClass("uk-active").blur(),i.trigger("change.uk.tab",[t.$(this).addClass("uk-active"),i.current]),i.current=t.$(this),i.options.connect||(s.attr("aria-expanded","false"),t.$(this).attr("aria-expanded","true"))}}),this.options.connect&&(this.connect=t.$(this.options.connect)),this.responsivetab=t.$('<li class="uk-tab-responsive uk-active"><a></a></li>').append('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>'),this.responsivetab.dropdown=this.responsivetab.find(".uk-dropdown"),this.responsivetab.lst=this.responsivetab.dropdown.find("ul"),this.responsivetab.caption=this.responsivetab.find("a:first"),this.element.hasClass("uk-tab-bottom")&&this.responsivetab.dropdown.addClass("uk-dropdown-up"),this.responsivetab.lst.on("click.uikit.tab","a",function(e){e.preventDefault(),e.stopPropagation();var s=t.$(this);i.element.children("li:not(.uk-tab-responsive)").eq(s.data("index")).trigger("click")}),this.on("show.uk.switcher change.uk.tab",function(t,e){i.responsivetab.caption.html(e.text())}),this.element.append(this.responsivetab),this.options.connect&&(this.switcher=t.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})),t.dropdown(this.responsivetab,{mode:"click"}),i.trigger("change.uk.tab",[this.element.find(this.options.target).not(".uk-tab-responsive").filter(".uk-active")]),this.check(),t.$win.on("resize orientationchange",t.Utils.debounce(function(){i.element.is(":visible")&&i.check()},100)),this.on("display.uk.check",function(){i.element.is(":visible")&&i.check()})},check:function(){var i=this.element.children("li:not(.uk-tab-responsive)").removeClass("uk-hidden");if(!i.length)return this.responsivetab.addClass("uk-hidden"),void 0;var e,s,n,a=i.eq(0).offset().top+Math.ceil(i.eq(0).height()/2),o=!1;if(this.responsivetab.lst.empty(),i.each(function(){t.$(this).offset().top>a&&(o=!0)}),o)for(var r=0;r<i.length;r++)e=t.$(i.eq(r)),s=e.find("a"),"none"==e.css("float")||e.attr("uk-dropdown")||(e.hasClass("uk-disabled")||(n=e[0].outerHTML.replace("<a ",'<a data-index="'+r+'" '),this.responsivetab.lst.append(n)),e.addClass("uk-hidden"));this.responsivetab[this.responsivetab.lst.children("li").length?"removeClass":"addClass"]("uk-hidden")}})}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";t.component("tab",{defaults:{target:">li:not(.uk-tab-responsive, .uk-disabled)",connect:!1,active:0,animation:!1,duration:200,swiping:!0},boot:function(){t.ready(function(i){t.$("[data-uk-tab]",i).each(function(){var i=t.$(this);if(!i.data("tab")){t.tab(i,t.Utils.options(i.attr("data-uk-tab")))}})})},init:function(){var i=this;this.current=!1,this.on("click.uk.tab",this.options.target,function(e){if(e.preventDefault(),!i.switcher||!i.switcher.animating){var s=i.find(i.options.target).not(this);s.removeClass("uk-active").blur(),i.trigger("change.uk.tab",[t.$(this).addClass("uk-active"),i.current]),i.current=t.$(this),i.options.connect||(s.attr("aria-expanded","false"),t.$(this).attr("aria-expanded","true"))}}),this.options.connect&&(this.connect=t.$(this.options.connect)),this.responsivetab=t.$('<li class="uk-tab-responsive uk-active"><a></a></li>').append('<div class="uk-dropdown uk-dropdown-small"><ul class="uk-nav uk-nav-dropdown"></ul><div>'),this.responsivetab.dropdown=this.responsivetab.find(".uk-dropdown"),this.responsivetab.lst=this.responsivetab.dropdown.find("ul"),this.responsivetab.caption=this.responsivetab.find("a:first"),this.element.hasClass("uk-tab-bottom")&&this.responsivetab.dropdown.addClass("uk-dropdown-up"),this.responsivetab.lst.on("click.uk.tab","a",function(e){e.preventDefault(),e.stopPropagation();var s=t.$(this);i.element.children("li:not(.uk-tab-responsive)").eq(s.data("index")).trigger("click")}),this.on("show.uk.switcher change.uk.tab",function(t,e){i.responsivetab.caption.html(e.text())}),this.element.append(this.responsivetab),this.options.connect&&(this.switcher=t.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})),t.dropdown(this.responsivetab,{mode:"click",preventflip:"y"}),i.trigger("change.uk.tab",[this.element.find(this.options.target).not(".uk-tab-responsive").filter(".uk-active")]),this.check(),t.$win.on("resize orientationchange",t.Utils.debounce(function(){i.element.is(":visible")&&i.check()},100)),this.on("display.uk.check",function(){i.element.is(":visible")&&i.check()})},check:function(){var i=this.element.children("li:not(.uk-tab-responsive)").removeClass("uk-hidden");if(!i.length)return this.responsivetab.addClass("uk-hidden"),void 0;var e,s,n,a=i.eq(0).offset().top+Math.ceil(i.eq(0).height()/2),o=!1;if(this.responsivetab.lst.empty(),i.each(function(){t.$(this).offset().top>a&&(o=!0)}),o)for(var r=0;r<i.length;r++)e=t.$(i.eq(r)),s=e.find("a"),"none"==e.css("float")||e.attr("uk-dropdown")||(e.hasClass("uk-disabled")||(n=e[0].outerHTML.replace("<a ",'<a data-index="'+r+'" '),this.responsivetab.lst.append(n)),e.addClass("uk-hidden"));this.responsivetab[this.responsivetab.lst.children("li").length?"removeClass":"addClass"]("uk-hidden")}})}(UIkit);
|
@ -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";
|
||||
@ -70,26 +70,29 @@
|
||||
|
||||
this.totoggle.css('animation-duration', this.options.duration+'ms');
|
||||
|
||||
if (this.totoggle.hasClass(this.options.cls)) {
|
||||
this.totoggle.each(function(){
|
||||
|
||||
this.totoggle.toggleClass(this.options.cls);
|
||||
var ele = UI.$(this);
|
||||
|
||||
this.totoggle.each(function(){
|
||||
UI.Utils.animate(this, animations[0]).then(function(){
|
||||
UI.$(this).css('animation-duration', '');
|
||||
UI.Utils.checkDisplay(this);
|
||||
if (ele.hasClass($this.options.cls)) {
|
||||
|
||||
ele.toggleClass($this.options.cls);
|
||||
|
||||
UI.Utils.animate(ele, animations[0]).then(function(){
|
||||
ele.css('animation-duration', '');
|
||||
UI.Utils.checkDisplay(ele);
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
this.totoggle.each(function(){
|
||||
UI.Utils.animate(this, animations[1]+' uk-animation-reverse').then(function(){
|
||||
UI.$(this).toggleClass($this.options.cls).css('animation-duration', '');
|
||||
UI.Utils.checkDisplay(this);
|
||||
}.bind(this));
|
||||
});
|
||||
}
|
||||
ele.toggleClass($this.options.cls).css('animation-duration', '');
|
||||
UI.Utils.checkDisplay(ele);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
this.totoggle.toggleClass(this.options.cls);
|
||||
|
4
admin/custom/uikit/js/core/toggle.min.js
vendored
4
admin/custom/uikit/js/core/toggle.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var i=[];t.component("toggle",{defaults:{target:!1,cls:"uk-hidden",animation:!1,duration:200},boot:function(){t.ready(function(s){t.$("[data-uk-toggle]",s).each(function(){var i=t.$(this);if(!i.data("toggle")){t.toggle(i,t.Utils.options(i.attr("data-uk-toggle")))}}),setTimeout(function(){i.forEach(function(t){t.getToggles()})},0)})},init:function(){var t=this;this.aria=-1!==this.options.cls.indexOf("uk-hidden"),this.getToggles(),this.on("click",function(i){t.element.is('a[href="#"]')&&i.preventDefault(),t.toggle()}),i.push(this)},toggle:function(){if(this.totoggle.length){if(this.options.animation&&t.support.animation){var i=this,s=this.options.animation.split(",");1==s.length&&(s[1]=s[0]),s[0]=s[0].trim(),s[1]=s[1].trim(),this.totoggle.css("animation-duration",this.options.duration+"ms"),this.totoggle.hasClass(this.options.cls)?(this.totoggle.toggleClass(this.options.cls),this.totoggle.each(function(){t.Utils.animate(this,s[0]).then(function(){t.$(this).css("animation-duration",""),t.Utils.checkDisplay(this)})})):this.totoggle.each(function(){t.Utils.animate(this,s[1]+" uk-animation-reverse").then(function(){t.$(this).toggleClass(i.options.cls).css("animation-duration",""),t.Utils.checkDisplay(this)}.bind(this))})}else this.totoggle.toggleClass(this.options.cls),t.Utils.checkDisplay(this.totoggle);this.updateAria()}},getToggles:function(){this.totoggle=this.options.target?t.$(this.options.target):[],this.updateAria()},updateAria:function(){this.aria&&this.totoggle.length&&this.totoggle.each(function(){t.$(this).attr("aria-hidden",t.$(this).hasClass("uk-hidden"))})}})}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var i=[];t.component("toggle",{defaults:{target:!1,cls:"uk-hidden",animation:!1,duration:200},boot:function(){t.ready(function(o){t.$("[data-uk-toggle]",o).each(function(){var i=t.$(this);if(!i.data("toggle")){t.toggle(i,t.Utils.options(i.attr("data-uk-toggle")))}}),setTimeout(function(){i.forEach(function(t){t.getToggles()})},0)})},init:function(){var t=this;this.aria=-1!==this.options.cls.indexOf("uk-hidden"),this.getToggles(),this.on("click",function(i){t.element.is('a[href="#"]')&&i.preventDefault(),t.toggle()}),i.push(this)},toggle:function(){if(this.totoggle.length){if(this.options.animation&&t.support.animation){var i=this,o=this.options.animation.split(",");1==o.length&&(o[1]=o[0]),o[0]=o[0].trim(),o[1]=o[1].trim(),this.totoggle.css("animation-duration",this.options.duration+"ms"),this.totoggle.each(function(){var s=t.$(this);s.hasClass(i.options.cls)?(s.toggleClass(i.options.cls),t.Utils.animate(s,o[0]).then(function(){s.css("animation-duration",""),t.Utils.checkDisplay(s)})):t.Utils.animate(this,o[1]+" uk-animation-reverse").then(function(){s.toggleClass(i.options.cls).css("animation-duration",""),t.Utils.checkDisplay(s)})})}else this.totoggle.toggleClass(this.options.cls),t.Utils.checkDisplay(this.totoggle);this.updateAria()}},getToggles:function(){this.totoggle=this.options.target?t.$(this.options.target):[],this.updateAria()},updateAria:function(){this.aria&&this.totoggle.length&&this.totoggle.each(function(){t.$(this).attr("aria-hidden",t.$(this).hasClass("uk-hidden"))})}})}(UIkit);
|
@ -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 */
|
||||
// Based on Zeptos touch.js
|
||||
// https://raw.github.com/madrobby/zepto/master/src/touch.js
|
||||
// Zepto.js may be freely distributed under the MIT license.
|
||||
@ -19,7 +19,7 @@
|
||||
function longTap() {
|
||||
longTapTimeout = null;
|
||||
if (touch.last) {
|
||||
touch.el.trigger('longTap');
|
||||
if ( touch.el !== undefined ) touch.el.trigger('longTap');
|
||||
touch = {};
|
||||
}
|
||||
}
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
var swipeDirectionFromVelocity = e.originalEvent.velocityX > 1 ? 'Right' : e.originalEvent.velocityX < -1 ? 'Left' : e.originalEvent.velocityY > 1 ? 'Down' : e.originalEvent.velocityY < -1 ? 'Up' : null;
|
||||
|
||||
if (swipeDirectionFromVelocity) {
|
||||
if (swipeDirectionFromVelocity && touch.el !== undefined) {
|
||||
touch.el.trigger('swipe');
|
||||
touch.el.trigger('swipe'+ swipeDirectionFromVelocity);
|
||||
}
|
||||
@ -115,8 +115,10 @@
|
||||
if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)){
|
||||
|
||||
swipeTimeout = setTimeout(function() {
|
||||
touch.el.trigger('swipe');
|
||||
touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2)));
|
||||
if ( touch.el !== undefined ) {
|
||||
touch.el.trigger('swipe');
|
||||
touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2)));
|
||||
}
|
||||
touch = {};
|
||||
}, 0);
|
||||
|
||||
@ -134,11 +136,11 @@
|
||||
// (cancelTouch cancels processing of single vs double taps for faster 'tap' response)
|
||||
var event = $.Event('tap');
|
||||
event.cancelTouch = cancelAll;
|
||||
touch.el.trigger(event);
|
||||
if ( touch.el !== undefined ) touch.el.trigger(event);
|
||||
|
||||
// trigger double tap immediately
|
||||
if (touch.isDoubleTap) {
|
||||
touch.el.trigger('doubleTap');
|
||||
if ( touch.el !== undefined ) touch.el.trigger('doubleTap');
|
||||
touch = {};
|
||||
}
|
||||
|
||||
@ -146,7 +148,7 @@
|
||||
else {
|
||||
touchTimeout = setTimeout(function(){
|
||||
touchTimeout = null;
|
||||
touch.el.trigger('singleTap');
|
||||
if ( touch.el !== undefined ) touch.el.trigger('singleTap');
|
||||
touch = {};
|
||||
}, 250);
|
||||
}
|
||||
|
4
admin/custom/uikit/js/core/touch.min.js
vendored
4
admin/custom/uikit/js/core/touch.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(e){function t(e,t,n,o){return Math.abs(e-t)>=Math.abs(n-o)?e-t>0?"Left":"Right":n-o>0?"Up":"Down"}function n(){p=null,g.last&&(g.el.trigger("longTap"),g={})}function o(){p&&clearTimeout(p),p=null}function i(){a&&clearTimeout(a),l&&clearTimeout(l),u&&clearTimeout(u),p&&clearTimeout(p),a=l=u=p=null,g={}}function r(e){return e.pointerType==e.MSPOINTER_TYPE_TOUCH&&e.isPrimary}if(!e.fn.swipeLeft){var a,l,u,p,c,g={},s=750;e(function(){var y,w,v,f=0,M=0;"MSGesture"in window&&(c=new MSGesture,c.target=document.body),e(document).on("MSGestureEnd gestureend",function(e){var t=e.originalEvent.velocityX>1?"Right":e.originalEvent.velocityX<-1?"Left":e.originalEvent.velocityY>1?"Down":e.originalEvent.velocityY<-1?"Up":null;t&&(g.el.trigger("swipe"),g.el.trigger("swipe"+t))}).on("touchstart MSPointerDown pointerdown",function(t){("MSPointerDown"!=t.type||r(t.originalEvent))&&(v="MSPointerDown"==t.type||"pointerdown"==t.type?t:t.originalEvent.touches[0],y=Date.now(),w=y-(g.last||y),g.el=e("tagName"in v.target?v.target:v.target.parentNode),a&&clearTimeout(a),g.x1=v.pageX,g.y1=v.pageY,w>0&&250>=w&&(g.isDoubleTap=!0),g.last=y,p=setTimeout(n,s),!c||"MSPointerDown"!=t.type&&"pointerdown"!=t.type&&"touchstart"!=t.type||c.addPointer(t.originalEvent.pointerId))}).on("touchmove MSPointerMove pointermove",function(e){("MSPointerMove"!=e.type||r(e.originalEvent))&&(v="MSPointerMove"==e.type||"pointermove"==e.type?e:e.originalEvent.touches[0],o(),g.x2=v.pageX,g.y2=v.pageY,f+=Math.abs(g.x1-g.x2),M+=Math.abs(g.y1-g.y2))}).on("touchend MSPointerUp pointerup",function(n){("MSPointerUp"!=n.type||r(n.originalEvent))&&(o(),g.x2&&Math.abs(g.x1-g.x2)>30||g.y2&&Math.abs(g.y1-g.y2)>30?u=setTimeout(function(){g.el.trigger("swipe"),g.el.trigger("swipe"+t(g.x1,g.x2,g.y1,g.y2)),g={}},0):"last"in g&&(isNaN(f)||30>f&&30>M?l=setTimeout(function(){var t=e.Event("tap");t.cancelTouch=i,g.el.trigger(t),g.isDoubleTap?(g.el.trigger("doubleTap"),g={}):a=setTimeout(function(){a=null,g.el.trigger("singleTap"),g={}},250)},0):g={},f=M=0))}).on("touchcancel MSPointerCancel",i),e(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(t){e.fn[t]=function(n){return e(this).on(t,n)}})}}(jQuery);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(e){function t(e,t,n,o){return Math.abs(e-t)>=Math.abs(n-o)?e-t>0?"Left":"Right":n-o>0?"Up":"Down"}function n(){p=null,g.last&&(void 0!==g.el&&g.el.trigger("longTap"),g={})}function o(){p&&clearTimeout(p),p=null}function i(){a&&clearTimeout(a),l&&clearTimeout(l),u&&clearTimeout(u),p&&clearTimeout(p),a=l=u=p=null,g={}}function r(e){return e.pointerType==e.MSPOINTER_TYPE_TOUCH&&e.isPrimary}if(!e.fn.swipeLeft){var a,l,u,p,c,g={},s=750;e(function(){var v,y,w,f=0,d=0;"MSGesture"in window&&(c=new MSGesture,c.target=document.body),e(document).on("MSGestureEnd gestureend",function(e){var t=e.originalEvent.velocityX>1?"Right":e.originalEvent.velocityX<-1?"Left":e.originalEvent.velocityY>1?"Down":e.originalEvent.velocityY<-1?"Up":null;t&&void 0!==g.el&&(g.el.trigger("swipe"),g.el.trigger("swipe"+t))}).on("touchstart MSPointerDown pointerdown",function(t){("MSPointerDown"!=t.type||r(t.originalEvent))&&(w="MSPointerDown"==t.type||"pointerdown"==t.type?t:t.originalEvent.touches[0],v=Date.now(),y=v-(g.last||v),g.el=e("tagName"in w.target?w.target:w.target.parentNode),a&&clearTimeout(a),g.x1=w.pageX,g.y1=w.pageY,y>0&&250>=y&&(g.isDoubleTap=!0),g.last=v,p=setTimeout(n,s),!c||"MSPointerDown"!=t.type&&"pointerdown"!=t.type&&"touchstart"!=t.type||c.addPointer(t.originalEvent.pointerId))}).on("touchmove MSPointerMove pointermove",function(e){("MSPointerMove"!=e.type||r(e.originalEvent))&&(w="MSPointerMove"==e.type||"pointermove"==e.type?e:e.originalEvent.touches[0],o(),g.x2=w.pageX,g.y2=w.pageY,f+=Math.abs(g.x1-g.x2),d+=Math.abs(g.y1-g.y2))}).on("touchend MSPointerUp pointerup",function(n){("MSPointerUp"!=n.type||r(n.originalEvent))&&(o(),g.x2&&Math.abs(g.x1-g.x2)>30||g.y2&&Math.abs(g.y1-g.y2)>30?u=setTimeout(function(){void 0!==g.el&&(g.el.trigger("swipe"),g.el.trigger("swipe"+t(g.x1,g.x2,g.y1,g.y2))),g={}},0):"last"in g&&(isNaN(f)||30>f&&30>d?l=setTimeout(function(){var t=e.Event("tap");t.cancelTouch=i,void 0!==g.el&&g.el.trigger(t),g.isDoubleTap?(void 0!==g.el&&g.el.trigger("doubleTap"),g={}):a=setTimeout(function(){a=null,void 0!==g.el&&g.el.trigger("singleTap"),g={}},250)},0):g={},f=d=0))}).on("touchcancel MSPointerCancel",i),e(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(t){e.fn[t]=function(n){return e(this).on(t,n)}})}}(jQuery);
|
@ -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";
|
||||
@ -8,7 +8,8 @@
|
||||
UI.component('stackMargin', {
|
||||
|
||||
defaults: {
|
||||
'cls': 'uk-margin-small-top'
|
||||
cls: 'uk-margin-small-top',
|
||||
rowfirst: false
|
||||
},
|
||||
|
||||
boot: function() {
|
||||
@ -18,10 +19,10 @@
|
||||
|
||||
UI.$("[data-uk-margin]", context).each(function() {
|
||||
|
||||
var ele = UI.$(this), obj;
|
||||
var ele = UI.$(this);
|
||||
|
||||
if (!ele.data("stackMargin")) {
|
||||
obj = UI.stackMargin(ele, UI.Utils.options(ele.attr("data-uk-margin")));
|
||||
UI.stackMargin(ele, UI.Utils.options(ele.attr("data-uk-margin")));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -31,10 +32,6 @@
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.columns = this.element.children();
|
||||
|
||||
if (!this.columns.length) return;
|
||||
|
||||
UI.$win.on('resize orientationchange', (function() {
|
||||
|
||||
var fn = function() {
|
||||
@ -50,12 +47,10 @@
|
||||
})());
|
||||
|
||||
UI.$html.on("changed.uk.dom", function(e) {
|
||||
$this.columns = $this.element.children();
|
||||
$this.process();
|
||||
});
|
||||
|
||||
this.on("display.uk.check", function(e) {
|
||||
$this.columns = $this.element.children();
|
||||
if (this.element.is(":visible")) this.process();
|
||||
}.bind(this));
|
||||
|
||||
@ -64,17 +59,26 @@
|
||||
|
||||
process: function() {
|
||||
|
||||
var $this = this;
|
||||
var $this = this, columns = this.element.children();
|
||||
|
||||
UI.Utils.stackMargin(this.columns, this.options);
|
||||
UI.Utils.stackMargin(columns, this.options);
|
||||
|
||||
return this;
|
||||
},
|
||||
if (!this.options.rowfirst) {
|
||||
return this;
|
||||
}
|
||||
|
||||
// Mark first column elements
|
||||
var pos_cache = columns.removeClass(this.options.rowfirst).filter(':visible').first().position();
|
||||
|
||||
if (pos_cache) {
|
||||
columns.each(function() {
|
||||
UI.$(this)[UI.$(this).position().left == pos_cache.left ? 'addClass':'removeClass']($this.options.rowfirst);
|
||||
});
|
||||
}
|
||||
|
||||
revert: function() {
|
||||
this.columns.removeClass(this.options.cls);
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -107,7 +111,7 @@
|
||||
|
||||
var ele = UI.$(this), obj;
|
||||
|
||||
if (!ele.data("responsiveIframe")) {
|
||||
if (!ele.data("responsiveElement")) {
|
||||
obj = UI.responsiveElement(ele, {});
|
||||
}
|
||||
});
|
||||
@ -164,7 +168,7 @@
|
||||
firstvisible = elements.filter(":visible:first"),
|
||||
offset = firstvisible.length ? (firstvisible.position().top + firstvisible.outerHeight()) - 1 : false; // (-1): weird firefox bug when parent container is display:flex
|
||||
|
||||
if (offset === false) return;
|
||||
if (offset === false || elements.length == 1) return;
|
||||
|
||||
elements.each(function() {
|
||||
|
||||
@ -240,4 +244,54 @@
|
||||
}
|
||||
};
|
||||
|
||||
(function(cacheSvgs){
|
||||
|
||||
UI.Utils.inlineSvg = function(selector, root) {
|
||||
|
||||
var images = UI.$(selector || 'img[src$=".svg"]', root || document).each(function(){
|
||||
|
||||
var img = UI.$(this),
|
||||
src = img.attr('src');
|
||||
|
||||
if (!cacheSvgs[src]) {
|
||||
|
||||
var d = UI.$.Deferred();
|
||||
|
||||
UI.$.get(src, {nc: Math.random()}, function(data){
|
||||
d.resolve(UI.$(data).find('svg'));
|
||||
});
|
||||
|
||||
cacheSvgs[src] = d.promise();
|
||||
}
|
||||
|
||||
cacheSvgs[src].then(function(svg) {
|
||||
|
||||
var $svg = UI.$(svg).clone();
|
||||
|
||||
if (img.attr('id')) $svg.attr('id', img.attr('id'));
|
||||
if (img.attr('class')) $svg.attr('class', img.attr('class'));
|
||||
if (img.attr('style')) $svg.attr('style', img.attr('style'));
|
||||
|
||||
if (img.attr('width')) {
|
||||
$svg.attr('width', img.attr('width'));
|
||||
if (!img.attr('height')) $svg.removeAttr('height');
|
||||
}
|
||||
|
||||
if (img.attr('height')){
|
||||
$svg.attr('height', img.attr('height'));
|
||||
if (!img.attr('width')) $svg.removeAttr('width');
|
||||
}
|
||||
|
||||
img.replaceWith($svg);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// init code
|
||||
UI.ready(function(context) {
|
||||
UI.Utils.inlineSvg('[data-uk-svg]', context);
|
||||
});
|
||||
|
||||
})({});
|
||||
|
||||
})(UIkit);
|
||||
|
4
admin/custom/uikit/js/core/utility.min.js
vendored
4
admin/custom/uikit/js/core/utility.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var i=[];t.component("stackMargin",{defaults:{cls:"uk-margin-small-top"},boot:function(){t.ready(function(i){t.$("[data-uk-margin]",i).each(function(){var i,n=t.$(this);n.data("stackMargin")||(i=t.stackMargin(n,t.Utils.options(n.attr("data-uk-margin"))))})})},init:function(){var n=this;this.columns=this.element.children(),this.columns.length&&(t.$win.on("resize orientationchange",function(){var i=function(){n.process()};return t.$(function(){i(),t.$win.on("load",i)}),t.Utils.debounce(i,20)}()),t.$html.on("changed.uk.dom",function(){n.columns=n.element.children(),n.process()}),this.on("display.uk.check",function(){n.columns=n.element.children(),this.element.is(":visible")&&this.process()}.bind(this)),i.push(this))},process:function(){return t.Utils.stackMargin(this.columns,this.options),this},revert:function(){return this.columns.removeClass(this.options.cls),this}}),function(){var i=[],n=function(t){if(t.is(":visible")){var i=t.parent().width(),n=t.data("width"),s=i/n,e=Math.floor(s*t.data("height"));t.css({height:n>i?e:t.data("height")})}};t.component("responsiveElement",{defaults:{},boot:function(){t.ready(function(i){t.$("iframe.uk-responsive-width, [data-uk-responsive]",i).each(function(){var i,n=t.$(this);n.data("responsiveIframe")||(i=t.responsiveElement(n,{}))})})},init:function(){var t=this.element;t.attr("width")&&t.attr("height")&&(t.data({width:t.attr("width"),height:t.attr("height")}).on("display.uk.check",function(){n(t)}),n(t),i.push(t))}}),t.$win.on("resize load",t.Utils.debounce(function(){i.forEach(function(t){n(t)})},15))}(),t.Utils.stackMargin=function(i,n){n=t.$.extend({cls:"uk-margin-small-top"},n),n.cls=n.cls,i=t.$(i).removeClass(n.cls);var s=!1,e=i.filter(":visible:first"),o=e.length?e.position().top+e.outerHeight()-1:!1;o!==!1&&i.each(function(){var i=t.$(this);i.is(":visible")&&(s?i.addClass(n.cls):i.position().top>=o&&(s=i.addClass(n.cls)))})},t.Utils.matchHeights=function(i,n){i=t.$(i).css("min-height",""),n=t.$.extend({row:!0},n);var s=function(i){if(!(i.length<2)){var n=0;i.each(function(){n=Math.max(n,t.$(this).outerHeight())}).each(function(){var i=t.$(this),s=n-("border-box"==i.css("box-sizing")?0:i.outerHeight()-i.height());i.css("min-height",s+"px")})}};n.row?(i.first().width(),setTimeout(function(){var n=!1,e=[];i.each(function(){var i=t.$(this),o=i.offset().top;o!=n&&e.length&&(s(t.$(e)),e=[],o=i.offset().top),e.push(i),n=o}),e.length&&s(t.$(e))},0)):s(i)}}(UIkit);
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){"use strict";var i=[];t.component("stackMargin",{defaults:{cls:"uk-margin-small-top",rowfirst:!1},boot:function(){t.ready(function(i){t.$("[data-uk-margin]",i).each(function(){var i=t.$(this);i.data("stackMargin")||t.stackMargin(i,t.Utils.options(i.attr("data-uk-margin")))})})},init:function(){var n=this;t.$win.on("resize orientationchange",function(){var i=function(){n.process()};return t.$(function(){i(),t.$win.on("load",i)}),t.Utils.debounce(i,20)}()),t.$html.on("changed.uk.dom",function(){n.process()}),this.on("display.uk.check",function(){this.element.is(":visible")&&this.process()}.bind(this)),i.push(this)},process:function(){var i=this,n=this.element.children();if(t.Utils.stackMargin(n,this.options),!this.options.rowfirst)return this;var s=n.removeClass(this.options.rowfirst).filter(":visible").first().position();return s&&n.each(function(){t.$(this)[t.$(this).position().left==s.left?"addClass":"removeClass"](i.options.rowfirst)}),this}}),function(){var i=[],n=function(t){if(t.is(":visible")){var i=t.parent().width(),n=t.data("width"),s=i/n,e=Math.floor(s*t.data("height"));t.css({height:n>i?e:t.data("height")})}};t.component("responsiveElement",{defaults:{},boot:function(){t.ready(function(i){t.$("iframe.uk-responsive-width, [data-uk-responsive]",i).each(function(){var i,n=t.$(this);n.data("responsiveElement")||(i=t.responsiveElement(n,{}))})})},init:function(){var t=this.element;t.attr("width")&&t.attr("height")&&(t.data({width:t.attr("width"),height:t.attr("height")}).on("display.uk.check",function(){n(t)}),n(t),i.push(t))}}),t.$win.on("resize load",t.Utils.debounce(function(){i.forEach(function(t){n(t)})},15))}(),t.Utils.stackMargin=function(i,n){n=t.$.extend({cls:"uk-margin-small-top"},n),n.cls=n.cls,i=t.$(i).removeClass(n.cls);var s=!1,e=i.filter(":visible:first"),a=e.length?e.position().top+e.outerHeight()-1:!1;a!==!1&&1!=i.length&&i.each(function(){var i=t.$(this);i.is(":visible")&&(s?i.addClass(n.cls):i.position().top>=a&&(s=i.addClass(n.cls)))})},t.Utils.matchHeights=function(i,n){i=t.$(i).css("min-height",""),n=t.$.extend({row:!0},n);var s=function(i){if(!(i.length<2)){var n=0;i.each(function(){n=Math.max(n,t.$(this).outerHeight())}).each(function(){var i=t.$(this),s=n-("border-box"==i.css("box-sizing")?0:i.outerHeight()-i.height());i.css("min-height",s+"px")})}};n.row?(i.first().width(),setTimeout(function(){var n=!1,e=[];i.each(function(){var i=t.$(this),a=i.offset().top;a!=n&&e.length&&(s(t.$(e)),e=[],a=i.offset().top),e.push(i),n=a}),e.length&&s(t.$(e))},0)):s(i)},function(i){t.Utils.inlineSvg=function(n,s){t.$(n||'img[src$=".svg"]',s||document).each(function(){var n=t.$(this),s=n.attr("src");if(!i[s]){var e=t.$.Deferred();t.$.get(s,{nc:Math.random()},function(i){e.resolve(t.$(i).find("svg"))}),i[s]=e.promise()}i[s].then(function(i){var s=t.$(i).clone();n.attr("id")&&s.attr("id",n.attr("id")),n.attr("class")&&s.attr("class",n.attr("class")),n.attr("style")&&s.attr("style",n.attr("style")),n.attr("width")&&(s.attr("width",n.attr("width")),n.attr("height")||s.removeAttr("height")),n.attr("height")&&(s.attr("height",n.attr("height")),n.attr("width")||s.removeAttr("width")),n.replaceWith(s)})})},t.ready(function(i){t.Utils.inlineSvg("[data-uk-svg]",i)})}({})}(UIkit);
|
Reference in New Issue
Block a user