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(addon) {
|
||||
var component;
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.element.on('click.uikit.accordion', this.options.toggle, function(e) {
|
||||
this.element.on('click.uk.accordion', this.options.toggle, function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
@ -71,12 +71,14 @@
|
||||
var $this = this;
|
||||
|
||||
wrapper.data('toggle').toggleClass(this.options.clsactive);
|
||||
wrapper.data('content').toggleClass(this.options.clsactive);
|
||||
|
||||
var active = wrapper.data('toggle').hasClass(this.options.clsactive);
|
||||
|
||||
if (collapse) {
|
||||
this.toggle.not(wrapper.data('toggle')).removeClass(this.options.clsactive);
|
||||
this.content.not(wrapper.data('content')).parent().stop().css('overflow', 'hidden').animate({ height: 0 }, {easing: this.options.easing, duration: animated ? this.options.duration : 0}).attr('aria-expanded', 'false');
|
||||
this.content.not(wrapper.data('content')).removeClass(this.options.clsactive)
|
||||
.parent().stop().css('overflow', 'hidden').animate({ height: 0 }, {easing: this.options.easing, duration: animated ? this.options.duration : 0}).attr('aria-expanded', 'false');
|
||||
}
|
||||
|
||||
wrapper.stop().css('overflow', 'hidden');
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-accordion",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(i){var o=t.$(i),e="auto";if(o.is(":visible"))e=o.outerHeight();else{var a={position:o.css("position"),visibility:o.css("visibility"),display:o.css("display")};e=o.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),o.css(a)}return e}return t.component("accordion",{defaults:{showfirst:!0,collapse:!0,animate:!0,easing:"swing",duration:300,toggle:".uk-accordion-title",containers:".uk-accordion-content",clsactive:"uk-active"},boot:function(){t.ready(function(i){setTimeout(function(){t.$("[data-uk-accordion]",i).each(function(){var i=t.$(this);i.data("accordion")||t.accordion(i,t.Utils.options(i.attr("data-uk-accordion")))})},0)})},init:function(){var i=this;this.element.on("click.uikit.accordion",this.options.toggle,function(o){o.preventDefault(),i.toggleItem(t.$(this).data("wrapper"),i.options.animate,i.options.collapse)}),this.update(),this.options.showfirst&&this.toggleItem(this.toggle.eq(0).data("wrapper"),!1,!1)},toggleItem:function(o,e,a){var n=this;o.data("toggle").toggleClass(this.options.clsactive);var s=o.data("toggle").hasClass(this.options.clsactive);a&&(this.toggle.not(o.data("toggle")).removeClass(this.options.clsactive),this.content.not(o.data("content")).parent().stop().css("overflow","hidden").animate({height:0},{easing:this.options.easing,duration:e?this.options.duration:0}).attr("aria-expanded","false")),o.stop().css("overflow","hidden"),e?o.animate({height:s?i(o.data("content")):0},{easing:this.options.easing,duration:this.options.duration,complete:function(){s&&(o.css({overflow:"",height:"auto"}),t.Utils.checkDisplay(o.data("content"))),n.trigger("display.uk.check")}}):(o.height(s?"auto":0),s&&(o.css({overflow:""}),t.Utils.checkDisplay(o.data("content"))),this.trigger("display.uk.check")),o.attr("aria-expanded",s),this.element.trigger("toggle.uk.accordion",[s,o.data("toggle"),o.data("content")])},update:function(){var i,o,e,a=this;this.toggle=this.find(this.options.toggle),this.content=this.find(this.options.containers),this.content.each(function(n){i=t.$(this),i.parent().data("wrapper")?o=i.parent():(o=t.$(this).wrap('<div data-wrapper="true" style="overflow:hidden;height:0;position:relative;"></div>').parent(),o.attr("aria-expanded","false")),e=a.toggle.eq(n),o.data("toggle",e),o.data("content",i),e.data("wrapper",o),i.data("wrapper",o)}),this.element.trigger("update.uk.accordion",[this])}}),t.accordion});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-accordion",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(i){var o=t.$(i),e="auto";if(o.is(":visible"))e=o.outerHeight();else{var a={position:o.css("position"),visibility:o.css("visibility"),display:o.css("display")};e=o.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),o.css(a)}return e}return t.component("accordion",{defaults:{showfirst:!0,collapse:!0,animate:!0,easing:"swing",duration:300,toggle:".uk-accordion-title",containers:".uk-accordion-content",clsactive:"uk-active"},boot:function(){t.ready(function(i){setTimeout(function(){t.$("[data-uk-accordion]",i).each(function(){var i=t.$(this);i.data("accordion")||t.accordion(i,t.Utils.options(i.attr("data-uk-accordion")))})},0)})},init:function(){var i=this;this.element.on("click.uk.accordion",this.options.toggle,function(o){o.preventDefault(),i.toggleItem(t.$(this).data("wrapper"),i.options.animate,i.options.collapse)}),this.update(),this.options.showfirst&&this.toggleItem(this.toggle.eq(0).data("wrapper"),!1,!1)},toggleItem:function(o,e,a){var n=this;o.data("toggle").toggleClass(this.options.clsactive),o.data("content").toggleClass(this.options.clsactive);var s=o.data("toggle").hasClass(this.options.clsactive);a&&(this.toggle.not(o.data("toggle")).removeClass(this.options.clsactive),this.content.not(o.data("content")).removeClass(this.options.clsactive).parent().stop().css("overflow","hidden").animate({height:0},{easing:this.options.easing,duration:e?this.options.duration:0}).attr("aria-expanded","false")),o.stop().css("overflow","hidden"),e?o.animate({height:s?i(o.data("content")):0},{easing:this.options.easing,duration:this.options.duration,complete:function(){s&&(o.css({overflow:"",height:"auto"}),t.Utils.checkDisplay(o.data("content"))),n.trigger("display.uk.check")}}):(o.height(s?"auto":0),s&&(o.css({overflow:""}),t.Utils.checkDisplay(o.data("content"))),this.trigger("display.uk.check")),o.attr("aria-expanded",s),this.element.trigger("toggle.uk.accordion",[s,o.data("toggle"),o.data("content")])},update:function(){var i,o,e,a=this;this.toggle=this.find(this.options.toggle),this.content=this.find(this.options.containers),this.content.each(function(n){i=t.$(this),i.parent().data("wrapper")?o=i.parent():(o=t.$(this).wrap('<div data-wrapper="true" style="overflow:hidden;height:0;position:relative;"></div>').parent(),o.attr("aria-expanded","false")),e=a.toggle.eq(n),o.data("toggle",e),o.data("content",i),e.data("wrapper",o),i.data("wrapper",o)}),this.element.trigger("update.uk.accordion",[this])}}),t.accordion});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -50,7 +50,7 @@
|
||||
var ele = UI.$(this);
|
||||
|
||||
if (!ele.data("autocomplete")) {
|
||||
var obj = UI.autocomplete(ele, UI.Utils.options(ele.attr("data-uk-autocomplete")));
|
||||
UI.autocomplete(ele, UI.Utils.options(ele.attr("data-uk-autocomplete")));
|
||||
}
|
||||
});
|
||||
|
||||
@ -310,8 +310,6 @@
|
||||
|
||||
render: function(data) {
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.dropdown.empty();
|
||||
|
||||
this.selected = false;
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-autocomplete",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e;return t.component("autocomplete",{defaults:{minLength:3,param:"search",method:"post",delay:300,loadingClass:"uk-loading",flipDropdown:!1,skipClass:"uk-skip",hoverClass:"uk-active",source:null,renderer:null,template:'<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>'},visible:!1,value:null,selected:null,boot:function(){t.$html.on("focus.autocomplete.uikit","[data-uk-autocomplete]",function(){var e=t.$(this);if(!e.data("autocomplete")){t.autocomplete(e,t.Utils.options(e.attr("data-uk-autocomplete")))}}),t.$html.on("click.autocomplete.uikit",function(t){e&&t.target!=e.input[0]&&e.hide()})},init:function(){var e=this,i=!1,s=t.Utils.debounce(function(){return i?i=!1:(e.handle(),void 0)},this.options.delay);this.dropdown=this.find(".uk-dropdown"),this.template=this.find('script[type="text/autocomplete"]').html(),this.template=t.Utils.template(this.template||this.options.template),this.input=this.find("input:first").attr("autocomplete","off"),this.dropdown.length||(this.dropdown=t.$('<div class="uk-dropdown"></div>').appendTo(this.element)),this.options.flipDropdown&&this.dropdown.addClass("uk-dropdown-flip"),this.dropdown.attr("aria-expanded","false"),this.input.on({keydown:function(t){if(t&&t.which&&!t.shiftKey)switch(t.which){case 13:i=!0,e.selected&&(t.preventDefault(),e.select());break;case 38:t.preventDefault(),e.pick("prev",!0);break;case 40:t.preventDefault(),e.pick("next",!0);break;case 27:case 9:e.hide()}},keyup:s}),this.dropdown.on("click",".uk-autocomplete-results > *",function(){e.select()}),this.dropdown.on("mouseover",".uk-autocomplete-results > *",function(){e.pick(t.$(this))}),this.triggercomplete=s},handle:function(){var t=this,e=this.value;return this.value=this.input.val(),this.value.length<this.options.minLength?this.hide():(this.value!=e&&t.request(),this)},pick:function(e,i){var s=this,o=t.$(this.dropdown.find(".uk-autocomplete-results").children(":not(."+this.options.skipClass+")")),n=!1;if("string"==typeof e||e.hasClass(this.options.skipClass)){if("next"==e||"prev"==e){if(this.selected){var a=o.index(this.selected);n="next"==e?o.eq(a+1<o.length?a+1:0):o.eq(0>a-1?o.length-1:a-1)}else n=o["next"==e?"first":"last"]();n=t.$(n)}}else n=e;if(n&&n.length&&(this.selected=n,o.removeClass(this.options.hoverClass),this.selected.addClass(this.options.hoverClass),i)){var l=n.position().top,h=s.dropdown.scrollTop(),r=s.dropdown.height();(l>r||0>l)&&s.dropdown.scrollTop(h+l)}},select:function(){if(this.selected){var t=this.selected.data();this.trigger("selectitem.uk.autocomplete",[t,this]),t.value&&this.input.val(t.value).trigger("change"),this.hide()}},show:function(){return this.visible?void 0:(this.visible=!0,this.element.addClass("uk-open"),e&&e!==this&&e.hide(),e=this,this.dropdown.attr("aria-expanded","true"),this)},hide:function(){return this.visible?(this.visible=!1,this.element.removeClass("uk-open"),e===this&&(e=!1),this.dropdown.attr("aria-expanded","false"),this):void 0},request:function(){var e=this,i=function(t){t&&e.render(t),e.element.removeClass(e.options.loadingClass)};if(this.element.addClass(this.options.loadingClass),this.options.source){var s=this.options.source;switch(typeof this.options.source){case"function":this.options.source.apply(this,[i]);break;case"object":if(s.length){var o=[];s.forEach(function(t){t.value&&-1!=t.value.toLowerCase().indexOf(e.value.toLowerCase())&&o.push(t)}),i(o)}break;case"string":var n={};n[this.options.param]=this.value,t.$.ajax({url:this.options.source,data:n,type:this.options.method,dataType:"json"}).done(function(t){i(t||[])});break;default:i(null)}}else this.element.removeClass(e.options.loadingClass)},render:function(t){return this.dropdown.empty(),this.selected=!1,this.options.renderer?this.options.renderer.apply(this,[t]):t&&t.length&&(this.dropdown.append(this.template({items:t})),this.show(),this.trigger("show.uk.autocomplete")),this}}),t.autocomplete});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-autocomplete",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e;return t.component("autocomplete",{defaults:{minLength:3,param:"search",method:"post",delay:300,loadingClass:"uk-loading",flipDropdown:!1,skipClass:"uk-skip",hoverClass:"uk-active",source:null,renderer:null,template:'<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>'},visible:!1,value:null,selected:null,boot:function(){t.$html.on("focus.autocomplete.uikit","[data-uk-autocomplete]",function(){var e=t.$(this);e.data("autocomplete")||t.autocomplete(e,t.Utils.options(e.attr("data-uk-autocomplete")))}),t.$html.on("click.autocomplete.uikit",function(t){e&&t.target!=e.input[0]&&e.hide()})},init:function(){var e=this,i=!1,s=t.Utils.debounce(function(){return i?i=!1:(e.handle(),void 0)},this.options.delay);this.dropdown=this.find(".uk-dropdown"),this.template=this.find('script[type="text/autocomplete"]').html(),this.template=t.Utils.template(this.template||this.options.template),this.input=this.find("input:first").attr("autocomplete","off"),this.dropdown.length||(this.dropdown=t.$('<div class="uk-dropdown"></div>').appendTo(this.element)),this.options.flipDropdown&&this.dropdown.addClass("uk-dropdown-flip"),this.dropdown.attr("aria-expanded","false"),this.input.on({keydown:function(t){if(t&&t.which&&!t.shiftKey)switch(t.which){case 13:i=!0,e.selected&&(t.preventDefault(),e.select());break;case 38:t.preventDefault(),e.pick("prev",!0);break;case 40:t.preventDefault(),e.pick("next",!0);break;case 27:case 9:e.hide()}},keyup:s}),this.dropdown.on("click",".uk-autocomplete-results > *",function(){e.select()}),this.dropdown.on("mouseover",".uk-autocomplete-results > *",function(){e.pick(t.$(this))}),this.triggercomplete=s},handle:function(){var t=this,e=this.value;return this.value=this.input.val(),this.value.length<this.options.minLength?this.hide():(this.value!=e&&t.request(),this)},pick:function(e,i){var s=this,o=t.$(this.dropdown.find(".uk-autocomplete-results").children(":not(."+this.options.skipClass+")")),n=!1;if("string"==typeof e||e.hasClass(this.options.skipClass)){if("next"==e||"prev"==e){if(this.selected){var a=o.index(this.selected);n="next"==e?o.eq(a+1<o.length?a+1:0):o.eq(0>a-1?o.length-1:a-1)}else n=o["next"==e?"first":"last"]();n=t.$(n)}}else n=e;if(n&&n.length&&(this.selected=n,o.removeClass(this.options.hoverClass),this.selected.addClass(this.options.hoverClass),i)){var l=n.position().top,h=s.dropdown.scrollTop(),r=s.dropdown.height();(l>r||0>l)&&s.dropdown.scrollTop(h+l)}},select:function(){if(this.selected){var t=this.selected.data();this.trigger("selectitem.uk.autocomplete",[t,this]),t.value&&this.input.val(t.value).trigger("change"),this.hide()}},show:function(){return this.visible?void 0:(this.visible=!0,this.element.addClass("uk-open"),e&&e!==this&&e.hide(),e=this,this.dropdown.attr("aria-expanded","true"),this)},hide:function(){return this.visible?(this.visible=!1,this.element.removeClass("uk-open"),e===this&&(e=!1),this.dropdown.attr("aria-expanded","false"),this):void 0},request:function(){var e=this,i=function(t){t&&e.render(t),e.element.removeClass(e.options.loadingClass)};if(this.element.addClass(this.options.loadingClass),this.options.source){var s=this.options.source;switch(typeof this.options.source){case"function":this.options.source.apply(this,[i]);break;case"object":if(s.length){var o=[];s.forEach(function(t){t.value&&-1!=t.value.toLowerCase().indexOf(e.value.toLowerCase())&&o.push(t)}),i(o)}break;case"string":var n={};n[this.options.param]=this.value,t.$.ajax({url:this.options.source,data:n,type:this.options.method,dataType:"json"}).done(function(t){i(t||[])});break;default:i(null)}}else this.element.removeClass(e.options.loadingClass)},render:function(t){return this.dropdown.empty(),this.selected=!1,this.options.renderer?this.options.renderer.apply(this,[t]):t&&t.length&&(this.dropdown.append(this.template({items:t})),this.show(),this.trigger("show.uk.autocomplete")),this}}),t.autocomplete});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -30,22 +30,14 @@
|
||||
months : ['January','February','March','April','May','June','July','August','September','October','November','December'],
|
||||
weekdays : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
|
||||
},
|
||||
format: "DD.MM.YYYY",
|
||||
format: "YYYY-MM-DD",
|
||||
offsettop: 5,
|
||||
maxDate: false,
|
||||
minDate: false,
|
||||
pos: 'auto',
|
||||
template: function(data, opts) {
|
||||
|
||||
var content = '', maxDate, minDate, i;
|
||||
|
||||
if (opts.maxDate!==false){
|
||||
maxDate = isNaN(opts.maxDate) ? moment(opts.maxDate, opts.format) : moment().add(opts.maxDate, 'days');
|
||||
}
|
||||
|
||||
if (opts.minDate!==false){
|
||||
minDate = isNaN(opts.minDate) ? moment(opts.minDate, opts.format) : moment().add(opts.minDate-1, 'days');
|
||||
}
|
||||
var content = '', i;
|
||||
|
||||
content += '<div class="uk-datepicker-nav">';
|
||||
content += '<a href="" class="uk-datepicker-previous"></a>';
|
||||
@ -69,8 +61,8 @@
|
||||
|
||||
options = [];
|
||||
|
||||
minYear = minDate ? minDate.year() : currentyear - 50;
|
||||
maxYear = maxDate ? maxDate.year() : currentyear + 20;
|
||||
minYear = data.minDate ? data.minDate.year() : currentyear - 50;
|
||||
maxYear = data.maxDate ? data.maxDate.year() : currentyear + 20;
|
||||
|
||||
for (i=minYear;i<=maxYear;i++) {
|
||||
if (i == data.year) {
|
||||
@ -110,9 +102,7 @@
|
||||
|
||||
if(!day.inmonth) cls.push("uk-datepicker-table-muted");
|
||||
if(day.selected) cls.push("uk-active");
|
||||
|
||||
if (maxDate && day.day > maxDate) cls.push('uk-datepicker-date-disabled uk-datepicker-table-muted');
|
||||
if (minDate && minDate > day.day) cls.push('uk-datepicker-date-disabled uk-datepicker-table-muted');
|
||||
if(day.disabled) cls.push('uk-datepicker-date-disabled uk-datepicker-table-muted');
|
||||
|
||||
content += '<td><a href="" class="'+cls.join(" ")+'" data-date="'+day.day.format()+'">'+day.day.format("D")+'</a></td>';
|
||||
}
|
||||
@ -144,12 +134,12 @@
|
||||
|
||||
if (!ele.data("datepicker")) {
|
||||
e.preventDefault();
|
||||
var obj = UI.datepicker(ele, UI.Utils.options(ele.attr("data-uk-datepicker")));
|
||||
UI.datepicker(ele, UI.Utils.options(ele.attr("data-uk-datepicker")));
|
||||
ele.trigger("focus");
|
||||
}
|
||||
});
|
||||
|
||||
UI.$html.on("click.datepicker.uikit", function(e) {
|
||||
UI.$html.on("click focus", '*', function(e) {
|
||||
|
||||
var target = UI.$(e.target);
|
||||
|
||||
@ -194,11 +184,11 @@
|
||||
if (ele.hasClass('uk-datepicker-date-disabled')) return false;
|
||||
|
||||
if (ele.is('[data-date]')) {
|
||||
active.element.val(moment(ele.data("date")).format(active.options.format)).trigger("change");
|
||||
dropdown.hide();
|
||||
active = false;
|
||||
active.current = moment(ele.data("date"));
|
||||
active.element.val(active.current.format(active.options.format)).trigger("change");
|
||||
active.hide();
|
||||
} else {
|
||||
active.add(1 * (ele.hasClass("uk-datepicker-next") ? 1:-1), "months");
|
||||
active.add((ele.hasClass("uk-datepicker-next") ? 1:-1), "months");
|
||||
}
|
||||
});
|
||||
|
||||
@ -217,7 +207,7 @@
|
||||
var offset = this.element.offset(),
|
||||
css = {"left": offset.left, "right":""};
|
||||
|
||||
this.current = initdate ? moment(initdate, this.options.format):moment();
|
||||
this.current = isNaN(initdate) ? moment(initdate, this.options.format):moment();
|
||||
this.initdate = this.current.format("YYYY-MM-DD");
|
||||
|
||||
this.update();
|
||||
@ -274,10 +264,18 @@
|
||||
var opts = this.options,
|
||||
now = moment().format('YYYY-MM-DD'),
|
||||
days = [31, (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month],
|
||||
before = new Date(year, month, 1).getDay(),
|
||||
data = {"month":month, "year":year,"weekdays":[],"days":[]},
|
||||
before = new Date(year, month, 1, 12).getDay(),
|
||||
data = {"month":month, "year":year,"weekdays":[],"days":[], "maxDate": false, "minDate": false},
|
||||
row = [];
|
||||
|
||||
if (opts.maxDate!==false){
|
||||
data.maxDate = isNaN(opts.maxDate) ? moment(opts.maxDate, opts.format) : moment().add(opts.maxDate, 'days');
|
||||
}
|
||||
|
||||
if (opts.minDate!==false){
|
||||
data.minDate = isNaN(opts.minDate) ? moment(opts.minDate, opts.format) : moment().add(opts.minDate-1, 'days');
|
||||
}
|
||||
|
||||
data.weekdays = (function(){
|
||||
|
||||
for (var i=0, arr=[]; i < 7; i++) {
|
||||
@ -311,8 +309,8 @@
|
||||
|
||||
for (var i = 0, r = 0; i < cells; i++) {
|
||||
|
||||
day = new Date(year, month, 1 + (i - before));
|
||||
isDisabled = (opts.mindate && day < opts.mindate) || (opts.maxdate && day > opts.maxdate);
|
||||
day = new Date(year, month, 1 + (i - before), 12);
|
||||
isDisabled = (data.minDate && data.minDate > day) || (data.maxDate && day > data.maxDate);
|
||||
isInMonth = !(i < before || i >= (days + before));
|
||||
|
||||
day = moment(day);
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var obj = UI.formPassword(ele, UI.Utils.options(ele.attr("data-uk-form-password")));
|
||||
UI.formPassword(ele, UI.Utils.options(ele.attr("data-uk-form-password")));
|
||||
ele.trigger("click");
|
||||
}
|
||||
});
|
||||
@ -51,12 +51,13 @@
|
||||
if($this.input.length) {
|
||||
var type = $this.input.attr("type");
|
||||
$this.input.attr("type", type=="text" ? "password":"text");
|
||||
$this.element.text($this.options[type=="text" ? "lblShow":"lblHide"]);
|
||||
$this.element.html($this.options[type=="text" ? "lblShow":"lblHide"]);
|
||||
}
|
||||
});
|
||||
|
||||
this.input = this.element.next("input").length ? this.element.next("input") : this.element.prev("input");
|
||||
this.element.text(this.options[this.input.is("[type='password']") ? "lblShow":"lblHide"]);
|
||||
this.element.html(this.options[this.input.is("[type='password']") ? "lblShow":"lblHide"]);
|
||||
|
||||
|
||||
this.element.data("formPassword", this);
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-password",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";return t.component("formPassword",{defaults:{lblShow:"Show",lblHide:"Hide"},boot:function(){t.$html.on("click.formpassword.uikit","[data-uk-form-password]",function(i){var e=t.$(this);if(!e.data("formPassword")){i.preventDefault();{t.formPassword(e,t.Utils.options(e.attr("data-uk-form-password")))}e.trigger("click")}})},init:function(){var t=this;this.on("click",function(i){if(i.preventDefault(),t.input.length){var e=t.input.attr("type");t.input.attr("type","text"==e?"password":"text"),t.element.text(t.options["text"==e?"lblShow":"lblHide"])}}),this.input=this.element.next("input").length?this.element.next("input"):this.element.prev("input"),this.element.text(this.options[this.input.is("[type='password']")?"lblShow":"lblHide"]),this.element.data("formPassword",this)}}),t.formPassword});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-password",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";return t.component("formPassword",{defaults:{lblShow:"Show",lblHide:"Hide"},boot:function(){t.$html.on("click.formpassword.uikit","[data-uk-form-password]",function(i){var e=t.$(this);e.data("formPassword")||(i.preventDefault(),t.formPassword(e,t.Utils.options(e.attr("data-uk-form-password"))),e.trigger("click"))})},init:function(){var t=this;this.on("click",function(i){if(i.preventDefault(),t.input.length){var e=t.input.attr("type");t.input.attr("type","text"==e?"password":"text"),t.element.html(t.options["text"==e?"lblShow":"lblHide"])}}),this.input=this.element.next("input").length?this.element.next("input"):this.element.prev("input"),this.element.html(this.options[this.input.is("[type='password']")?"lblShow":"lblHide"]),this.element.data("formPassword",this)}}),t.formPassword});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -33,7 +33,7 @@
|
||||
var ele = UI.$(this);
|
||||
|
||||
if (!ele.data("formSelect")) {
|
||||
var obj = UI.formSelect(ele, UI.Utils.options(ele.attr("data-uk-form-select")));
|
||||
UI.formSelect(ele, UI.Utils.options(ele.attr("data-uk-form-select")));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-select",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("formSelect",{defaults:{target:">span:first",activeClass:"uk-active"},boot:function(){t.ready(function(e){t.$("[data-uk-form-select]",e).each(function(){var e=t.$(this);if(!e.data("formSelect")){t.formSelect(e,t.Utils.options(e.attr("data-uk-form-select")))}})})},init:function(){var t=this;this.target=this.find(this.options.target),this.select=this.find("select"),this.select.on("change",function(){var e=t.select[0],i=function(){try{t.target.text(e.options[e.selectedIndex].text)}catch(n){}return t.element[t.select.val()?"addClass":"removeClass"](t.options.activeClass),i};return i()}()),this.element.data("formSelect",this)}}),t.formSelect});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-form-select",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("formSelect",{defaults:{target:">span:first",activeClass:"uk-active"},boot:function(){t.ready(function(e){t.$("[data-uk-form-select]",e).each(function(){var e=t.$(this);e.data("formSelect")||t.formSelect(e,t.Utils.options(e.attr("data-uk-form-select")))})})},init:function(){var t=this;this.target=this.find(this.options.target),this.select=this.find("select"),this.select.on("change",function(){var e=t.select[0],i=function(){try{t.target.text(e.options[e.selectedIndex].text)}catch(n){}return t.element[t.select.val()?"addClass":"removeClass"](t.options.activeClass),i};return i()}()),this.element.data("formSelect",this)}}),t.formSelect});
|
168
admin/custom/uikit/js/components/grid-parallax.js
Normal file
168
admin/custom/uikit/js/components/grid-parallax.js
Normal file
@ -0,0 +1,168 @@
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
|
||||
if (window.UIkit) {
|
||||
component = addon(UIkit);
|
||||
}
|
||||
|
||||
if (typeof define == "function" && define.amd) {
|
||||
define("uikit-grid-parallax", ["uikit"], function(){
|
||||
return component || addon(UIkit);
|
||||
});
|
||||
}
|
||||
|
||||
})(function(UI){
|
||||
|
||||
var parallaxes = [], checkParallaxes = function() {
|
||||
|
||||
requestAnimationFrame(function(){
|
||||
for (var i=0; i < parallaxes.length; i++) {
|
||||
parallaxes[i].process();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
UI.component('gridparallax', {
|
||||
|
||||
defaults: {
|
||||
target : false,
|
||||
smooth : 150,
|
||||
translate : 150
|
||||
},
|
||||
|
||||
boot: function() {
|
||||
|
||||
// listen to scroll and resize
|
||||
UI.$doc.on("scrolling.uk.document", checkParallaxes);
|
||||
UI.$win.on("load resize orientationchange", UI.Utils.debounce(function(){
|
||||
checkParallaxes();
|
||||
}, 50));
|
||||
|
||||
// init code
|
||||
UI.ready(function(context) {
|
||||
|
||||
UI.$('[data-uk-grid-parallax]', context).each(function() {
|
||||
|
||||
var parallax = UI.$(this);
|
||||
|
||||
if (!parallax.data("gridparallax")) {
|
||||
UI.gridparallax(parallax, UI.Utils.options(parallax.attr("data-uk-grid-parallax")));
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
init: function() {
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.initItems().process();
|
||||
parallaxes.push(this);
|
||||
|
||||
UI.$win.on('load resize orientationchange', (function() {
|
||||
|
||||
var fn = function() {
|
||||
var columns = getcolumns($this.element);
|
||||
|
||||
$this.element.css('margin-bottom', '');
|
||||
|
||||
if (columns > 1) {
|
||||
$this.element.css('margin-bottom', $this.options.translate + parseInt($this.element.css('margin-bottom')));
|
||||
}
|
||||
};
|
||||
|
||||
UI.$(function() { fn(); });
|
||||
|
||||
return UI.Utils.debounce(fn, 50);
|
||||
})());
|
||||
},
|
||||
|
||||
initItems: function() {
|
||||
|
||||
var smooth = this.options.smooth;
|
||||
|
||||
this.items = (this.options.target ? this.element.find(this.options.target) : this.element.children()).each(function(){
|
||||
UI.$(this).css({
|
||||
transition: 'transform '+smooth+'ms linear',
|
||||
transform: ''
|
||||
});
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
process: function() {
|
||||
|
||||
var percent = percentageInViewport(this.element),
|
||||
columns = getcolumns(this.element),
|
||||
items = this.items,
|
||||
mods = [(columns-1)];
|
||||
|
||||
if (columns == 1 || !percent) {
|
||||
items.css('transform', '');
|
||||
return;
|
||||
}
|
||||
|
||||
while(mods.length < columns) {
|
||||
if(!(mods[mods.length-1] - 2)) break;
|
||||
mods.push(mods[mods.length-1] - 2);
|
||||
}
|
||||
|
||||
var translate = this.options.translate, percenttranslate = percent * translate;
|
||||
|
||||
items.each(function(idx, ele, translate){
|
||||
translate = mods.indexOf((idx+1) % columns) != -1 ? percenttranslate : percenttranslate / 8;
|
||||
UI.$(this).css('transform', 'translate3d(0,'+(translate)+'px, 0)');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
function getcolumns(element) {
|
||||
|
||||
var children = element.children(),
|
||||
first = children.filter(':visible:first'),
|
||||
top = first[0].offsetTop + first.outerHeight();
|
||||
|
||||
for (var column=0;column<children.length;column++) {
|
||||
if (children[column].offsetTop >= top) break;
|
||||
}
|
||||
|
||||
return column || 1;
|
||||
}
|
||||
|
||||
function percentageInViewport(element) {
|
||||
|
||||
var top = element.offset().top,
|
||||
height = element.outerHeight(),
|
||||
scrolltop = UIkit.$win.scrollTop(),
|
||||
wh = window.innerHeight,
|
||||
distance, percentage, percent;
|
||||
|
||||
if (top > (scrolltop + wh)) {
|
||||
percent = 0;
|
||||
} else if ((top + height) < scrolltop) {
|
||||
percent = 1;
|
||||
} else {
|
||||
|
||||
if ((top + height) < wh) {
|
||||
percent = (scrolltop < wh ? scrolltop : scrolltop - wh) / (top+height);
|
||||
} else {
|
||||
|
||||
distance = (scrolltop + wh) - top;
|
||||
percentage = Math.round(distance / ((wh + height) / 100));
|
||||
percent = percentage/100;
|
||||
}
|
||||
|
||||
if (top < wh) {
|
||||
percent = percent * scrolltop / ((top + height) - wh);
|
||||
}
|
||||
}
|
||||
|
||||
return percent > 1 ? 1:percent;
|
||||
}
|
||||
});
|
2
admin/custom/uikit/js/components/grid-parallax.min.js
vendored
Normal file
2
admin/custom/uikit/js/components/grid-parallax.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var n;window.UIkit&&(n=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-grid-parallax",["uikit"],function(){return n||t(UIkit)})}(function(t){function n(t){for(var n=t.children(),i=n.filter(":visible:first"),e=i[0].offsetTop+i.outerHeight(),o=0;o<n.length&&!(n[o].offsetTop>=e);o++);return o||1}function i(t){var n,i,e,o=t.offset().top,r=t.outerHeight(),s=UIkit.$win.scrollTop(),a=window.innerHeight;return o>s+a?e=0:s>o+r?e=1:(a>o+r?e=(a>s?s:s-a)/(o+r):(n=s+a-o,i=Math.round(n/((a+r)/100)),e=i/100),a>o&&(e=e*s/(o+r-a))),e>1?1:e}var e=[],o=function(){requestAnimationFrame(function(){for(var t=0;t<e.length;t++)e[t].process()})};t.component("gridparallax",{defaults:{target:!1,smooth:150,translate:150},boot:function(){t.$doc.on("scrolling.uk.document",o),t.$win.on("load resize orientationchange",t.Utils.debounce(function(){o()},50)),t.ready(function(n){t.$("[data-uk-grid-parallax]",n).each(function(){var n=t.$(this);n.data("gridparallax")||t.gridparallax(n,t.Utils.options(n.attr("data-uk-grid-parallax")))})})},init:function(){var i=this;this.initItems().process(),e.push(this),t.$win.on("load resize orientationchange",function(){var e=function(){var t=n(i.element);i.element.css("margin-bottom",""),t>1&&i.element.css("margin-bottom",i.options.translate+parseInt(i.element.css("margin-bottom")))};return t.$(function(){e()}),t.Utils.debounce(e,50)}())},initItems:function(){var n=this.options.smooth;return this.items=(this.options.target?this.element.find(this.options.target):this.element.children()).each(function(){t.$(this).css({transition:"transform "+n+"ms linear",transform:""})}),this},process:function(){var e=i(this.element),o=n(this.element),r=this.items,s=[o-1];if(1==o||!e)return r.css("transform",""),void 0;for(;s.length<o&&s[s.length-1]-2;)s.push(s[s.length-1]-2);var a=this.options.translate,l=e*a;r.each(function(n,i,e){e=-1!=s.indexOf((n+1)%o)?l:l/8,t.$(this).css("transform","translate3d(0,"+e+"px, 0)")})}})});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -38,7 +38,7 @@
|
||||
var ele = UI.$(this);
|
||||
|
||||
if(!ele.data("grid")) {
|
||||
var plugin = UI.grid(ele, UI.Utils.options(ele.attr('data-uk-grid')));
|
||||
UI.grid(ele, UI.Utils.options(ele.attr('data-uk-grid')));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -131,14 +131,13 @@
|
||||
|
||||
elements = elements || this.element.children(':visible');
|
||||
|
||||
var $this = this,
|
||||
children = elements,
|
||||
var children = elements,
|
||||
maxwidth = this.element.width() + (2*this.gutterh) + 2,
|
||||
left = 0,
|
||||
top = 0,
|
||||
positions = [],
|
||||
|
||||
item, width, height, pos, aX, aY, i, z, max, size;
|
||||
item, width, height, pos, i, z, max, size;
|
||||
|
||||
this.trigger('beforeupdate.uk.grid', [children]);
|
||||
|
||||
@ -229,6 +228,10 @@
|
||||
|
||||
filter = filter || [];
|
||||
|
||||
if (typeof(filter) === 'number') {
|
||||
filter = filter.toString();
|
||||
}
|
||||
|
||||
if (typeof(filter) === 'string') {
|
||||
filter = filter.split(/,/).map(function(item){ return item.trim(); });
|
||||
}
|
||||
|
4
admin/custom/uikit/js/components/grid.min.js
vendored
4
admin/custom/uikit/js/components/grid.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(addon) {
|
||||
|
||||
var component;
|
||||
@ -42,10 +42,10 @@
|
||||
|
||||
UI.$('textarea[data-uk-htmleditor]', context).each(function() {
|
||||
|
||||
var editor = UI.$(this), obj;
|
||||
var editor = UI.$(this);
|
||||
|
||||
if (!editor.data('htmleditor')) {
|
||||
obj = UI.htmleditor(editor, UI.Utils.options(editor.attr('data-uk-htmleditor')));
|
||||
UI.htmleditor(editor, UI.Utils.options(editor.attr('data-uk-htmleditor')));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -58,8 +58,8 @@
|
||||
this.CodeMirror = this.options.CodeMirror || CodeMirror;
|
||||
this.buttons = {};
|
||||
|
||||
tpl = tpl.replace(/\{:lblPreview\}/g, this.options.lblPreview);
|
||||
tpl = tpl.replace(/\{:lblCodeview\}/g, this.options.lblCodeview);
|
||||
tpl = tpl.replace(/\{:lblPreview}/g, this.options.lblPreview);
|
||||
tpl = tpl.replace(/\{:lblCodeview}/g, this.options.lblCodeview);
|
||||
|
||||
this.htmleditor = UI.$(tpl);
|
||||
this.content = this.htmleditor.find('.uk-htmleditor-content');
|
||||
@ -91,7 +91,7 @@
|
||||
|
||||
// append custom stylesheet
|
||||
if (typeof(this.options.iframe) === 'string') {
|
||||
this.preview.container.parent().append('<link rel="stylesheet" href="'+this.options.iframe+'">');
|
||||
this.preview.container.parent().append('<link rel="stylesheet" href="'+this.options.iframe+'">');
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -107,13 +107,13 @@
|
||||
if ($this.htmleditor.attr('data-mode') == 'tab') return;
|
||||
|
||||
// calc position
|
||||
var codeHeight = codeContent.height() - codeScroll.height(),
|
||||
previewHeight = previewContainer[0].scrollHeight - ($this.iframe ? $this.iframe.height() : previewContainer.height()),
|
||||
ratio = previewHeight / codeHeight,
|
||||
previewPostition = codeScroll.scrollTop() * ratio;
|
||||
var codeHeight = codeContent.height() - codeScroll.height(),
|
||||
previewHeight = previewContainer[0].scrollHeight - ($this.iframe ? $this.iframe.height() : previewContainer.height()),
|
||||
ratio = previewHeight / codeHeight,
|
||||
previewPosition = codeScroll.scrollTop() * ratio;
|
||||
|
||||
// apply new scroll
|
||||
previewContainer.scrollTop(previewPostition);
|
||||
previewContainer.scrollTop(previewPosition);
|
||||
|
||||
}, 10));
|
||||
|
||||
@ -161,7 +161,7 @@
|
||||
this.debouncedRedraw = UI.Utils.debounce(function () { $this.redraw(); }, 5);
|
||||
|
||||
this.on('init.uk.component', function() {
|
||||
$this.redraw();
|
||||
$this.debouncedRedraw();
|
||||
});
|
||||
|
||||
this.element.attr('data-uk-check-display', 1).on('display.uk.check', function(e) {
|
||||
@ -181,7 +181,7 @@
|
||||
|
||||
replaceInPreview: function(regexp, callback) {
|
||||
|
||||
var editor = this.editor, results = [], value = editor.getValue(), offset = -1;
|
||||
var editor = this.editor, results = [], value = editor.getValue(), offset = -1, index = 0;
|
||||
|
||||
this.currentvalue = this.currentvalue.replace(regexp, function() {
|
||||
|
||||
@ -206,12 +206,14 @@
|
||||
}
|
||||
};
|
||||
|
||||
var result = callback(match);
|
||||
var result = callback(match, index);
|
||||
|
||||
if (!result) {
|
||||
return arguments[0];
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
results.push(match);
|
||||
return result;
|
||||
});
|
||||
@ -455,7 +457,7 @@
|
||||
cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length });
|
||||
cm.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
editor.on('action.listUl', function() {
|
||||
listfn();
|
||||
@ -585,7 +587,7 @@
|
||||
UI.$.extend(editor, {
|
||||
|
||||
enableMarkdown: function() {
|
||||
enableMarkdown()
|
||||
enableMarkdown();
|
||||
this.render();
|
||||
},
|
||||
disableMarkdown: function() {
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -67,7 +67,7 @@
|
||||
|
||||
init: function() {
|
||||
|
||||
var $this = this, siblings = [];
|
||||
var siblings = [];
|
||||
|
||||
this.index = 0;
|
||||
this.siblings = [];
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
siblings.push({
|
||||
'source': ele.attr('href'),
|
||||
'title' : ele.attr('title'),
|
||||
'title' : ele.attr('data-title') || ele.attr('title'),
|
||||
'type' : ele.attr("data-lightbox-type") || 'auto',
|
||||
'link' : ele
|
||||
});
|
||||
@ -353,7 +353,7 @@
|
||||
|
||||
if(!cache[id]) {
|
||||
|
||||
var img = new Image();
|
||||
var img = new Image(), lowres = false;
|
||||
|
||||
img.onerror = function(){
|
||||
cache[id] = {width:640, height:320};
|
||||
@ -361,11 +361,22 @@
|
||||
};
|
||||
|
||||
img.onload = function(){
|
||||
cache[id] = {width:img.width, height:img.height};
|
||||
resolve(id, img.width, img.height);
|
||||
//youtube default 404 thumb, fall back to lowres
|
||||
if (img.width == 120 && img.height == 90) {
|
||||
if (!lowres) {
|
||||
lowres = true;
|
||||
img.src = '//img.youtube.com/vi/' + id + '/0.jpg';
|
||||
} else {
|
||||
cache[id] = {width: 640, height: 320};
|
||||
resolve(id, cache[id].width, cache[id].height);
|
||||
}
|
||||
} else {
|
||||
cache[id] = {width: img.width, height: img.height};
|
||||
resolve(id, img.width, img.height);
|
||||
}
|
||||
};
|
||||
|
||||
img.src = '//img.youtube.com/vi/'+id+'/0.jpg';
|
||||
img.src = '//img.youtube.com/vi/'+id+'/maxresdefault.jpg';
|
||||
|
||||
} else {
|
||||
resolve(id, cache[id].width, cache[id].height);
|
||||
|
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 */
|
||||
/*
|
||||
* Based on Nestable jQuery Plugin - Copyright (c) 2012 David Bushell - http://dbushell.com/
|
||||
*/
|
||||
@ -24,7 +24,7 @@
|
||||
html = UI.$html,
|
||||
touchedlists = [],
|
||||
$win = UI.$win,
|
||||
draggingElement, dragSource;
|
||||
draggingElement;
|
||||
|
||||
var eStart = hasTouch ? 'touchstart' : 'mousedown',
|
||||
eMove = hasTouch ? 'touchmove' : 'mousemove',
|
||||
@ -40,6 +40,8 @@
|
||||
listItemClass : 'uk-nestable-item',
|
||||
dragClass : 'uk-nestable-dragged',
|
||||
movingClass : 'uk-nestable-moving',
|
||||
noChildrenClass : 'uk-nestable-nochildren',
|
||||
emptyClass : 'uk-nestable-empty',
|
||||
handleClass : '',
|
||||
collapsedClass : 'uk-collapsed',
|
||||
placeholderClass: 'uk-nestable-placeholder',
|
||||
@ -47,7 +49,7 @@
|
||||
group : false,
|
||||
maxDepth : 10,
|
||||
threshold : 20,
|
||||
idlethreshold : 10
|
||||
idlethreshold : 10,
|
||||
},
|
||||
|
||||
boot: function() {
|
||||
@ -408,7 +410,7 @@
|
||||
|
||||
dragStop: function(e) {
|
||||
|
||||
var el = this.placeEl,
|
||||
var el = UI.$(this.placeEl),
|
||||
root = this.placeEl.parents(this.options._listBaseClass+':first');
|
||||
|
||||
this.placeEl.removeClass(this.options.placeholderClass);
|
||||
@ -416,11 +418,11 @@
|
||||
|
||||
if (this.element[0] !== root[0]) {
|
||||
|
||||
root.trigger('change.uk.nestable',[el, "added", root, root.data('nestable')]);
|
||||
this.element.trigger('change.uk.nestable', [el, "removed", this.element, this]);
|
||||
root.trigger('change.uk.nestable',[root.data('nestable'), el, 'added']);
|
||||
this.element.trigger('change.uk.nestable', [this, el, 'removed']);
|
||||
|
||||
} else {
|
||||
this.element.trigger('change.uk.nestable',[el, "moved", this.element, this]);
|
||||
this.element.trigger('change.uk.nestable',[this, el, "moved"]);
|
||||
}
|
||||
|
||||
this.trigger('stop.uk.nestable', [this, el]);
|
||||
@ -490,8 +492,8 @@
|
||||
mouse.distAxX = 0;
|
||||
prev = this.placeEl.prev('li');
|
||||
|
||||
// increase horizontal level if previous sibling exists and is not collapsed
|
||||
if (mouse.distX > 0 && prev.length && !prev.hasClass(opt.collapsedClass)) {
|
||||
// increase horizontal level if previous sibling exists, is not collapsed, and does not have a 'no children' class
|
||||
if (mouse.distX > 0 && prev.length && !prev.hasClass(opt.collapsedClass) && !prev.hasClass(opt.noChildrenClass)) {
|
||||
|
||||
// cannot increase level when item above is collapsed
|
||||
list = prev.find(opt._listClass).last();
|
||||
@ -514,15 +516,27 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// decrease horizontal level
|
||||
if (mouse.distX < 0) {
|
||||
// we can't decrease a level if an item preceeds the current one
|
||||
next = this.placeEl.next('li');
|
||||
|
||||
// we cannot decrease the level if an item precedes the current one
|
||||
next = this.placeEl.next(opt._listItemClass);
|
||||
if (!next.length) {
|
||||
parent = this.placeEl.parent();
|
||||
this.placeEl.closest(opt._listItemClass).after(this.placeEl);
|
||||
if (!parent.children().length) {
|
||||
this.unsetParent(parent.parent());
|
||||
|
||||
// get parent ul of the list item
|
||||
var parentUl = this.placeEl.closest([opt._listBaseClass, opt._listClass].join(','));
|
||||
// try to get the li surrounding the ul
|
||||
var surroundingLi = parentUl.closest(opt._listItemClass);
|
||||
|
||||
// if the ul is inside of a li (meaning it is nested)
|
||||
if (surroundingLi.length) {
|
||||
// we can decrease the horizontal level
|
||||
surroundingLi.after(this.placeEl);
|
||||
// if the previous parent ul is now empty
|
||||
if (!parentUl.children().length) {
|
||||
this.unsetParent(surroundingLi);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -531,7 +545,7 @@
|
||||
var isEmpty = false;
|
||||
|
||||
// find list item under cursor
|
||||
var pointX = this.dragEl.offset().left - (window.pageXOffset || document.scrollLeft || 0),
|
||||
var pointX = e.pageX - (window.pageXOffset || document.scrollLeft || 0),
|
||||
pointY = e.pageY - (window.pageYOffset || document.documentElement.scrollTop);
|
||||
this.pointEl = UI.$(document.elementFromPoint(pointX, pointY));
|
||||
|
||||
@ -562,7 +576,7 @@
|
||||
// find parent list of item under cursor
|
||||
var pointElRoot = this.element,
|
||||
tmpRoot = this.pointEl.closest(this.options._listBaseClass),
|
||||
isNewRoot = pointElRoot[0] !== this.pointEl.closest(this.options._listBaseClass)[0];
|
||||
isNewRoot = pointElRoot[0] != tmpRoot[0];
|
||||
|
||||
/**
|
||||
* move vertical
|
||||
@ -614,8 +628,8 @@
|
||||
|
||||
list = list ? UI.$(list) : this.element;
|
||||
|
||||
if (!list.children().length) {
|
||||
list.html('');
|
||||
if (this.options.emptyClass) {
|
||||
list[!list.children().length ? 'addClass':'removeClass'](this.options.emptyClass);
|
||||
}
|
||||
}
|
||||
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -45,8 +45,6 @@
|
||||
|
||||
var Message = function(options){
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.options = UI.$.extend({}, Message.defaults, options);
|
||||
|
||||
this.uuid = UI.Utils.uid("notifymsg");
|
||||
|
@ -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){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-notify",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e={},i={},s=function(e){return"string"==t.$.type(e)&&(e={message:e}),arguments[1]&&(e=t.$.extend(e,"string"==t.$.type(arguments[1])?{status:arguments[1]}:arguments[1])),new n(e).show()},o=function(t,e){var s;if(t)for(s in i)t===i[s].group&&i[s].close(e);else for(s in i)i[s].close(e)},n=function(s){this.options=t.$.extend({},n.defaults,s),this.uuid=t.Utils.uid("notifymsg"),this.element=t.$(['<div class="uk-notify-message">','<a class="uk-close"></a>',"<div></div>","</div>"].join("")).data("notifyMessage",this),this.content(this.options.message),this.options.status&&(this.element.addClass("uk-notify-message-"+this.options.status),this.currentstatus=this.options.status),this.group=this.options.group,i[this.uuid]=this,e[this.options.pos]||(e[this.options.pos]=t.$('<div class="uk-notify uk-notify-'+this.options.pos+'"></div>').appendTo("body").on("click",".uk-notify-message",function(){var e=t.$(this).data("notifyMessage");e.element.trigger("manualclose.uk.notify",[e]),e.close()}))};return t.$.extend(n.prototype,{uuid:!1,element:!1,timout:!1,currentstatus:"",group:!1,show:function(){if(!this.element.is(":visible")){var t=this;e[this.options.pos].show().prepend(this.element);var i=parseInt(this.element.css("margin-bottom"),10);return this.element.css({opacity:0,"margin-top":-1*this.element.outerHeight(),"margin-bottom":0}).animate({opacity:1,"margin-top":0,"margin-bottom":i},function(){if(t.options.timeout){var e=function(){t.close()};t.timeout=setTimeout(e,t.options.timeout),t.element.hover(function(){clearTimeout(t.timeout)},function(){t.timeout=setTimeout(e,t.options.timeout)})}}),this}},close:function(t){var s=this,o=function(){s.element.remove(),e[s.options.pos].children().length||e[s.options.pos].hide(),s.options.onClose.apply(s,[]),s.element.trigger("close.uk.notify",[s]),delete i[s.uuid]};this.timeout&&clearTimeout(this.timeout),t?o():this.element.animate({opacity:0,"margin-top":-1*this.element.outerHeight(),"margin-bottom":0},function(){o()})},content:function(t){var e=this.element.find(">div");return t?(e.html(t),this):e.html()},status:function(t){return t?(this.element.removeClass("uk-notify-message-"+this.currentstatus).addClass("uk-notify-message-"+t),this.currentstatus=t,this):this.currentstatus}}),n.defaults={message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:function(){}},t.notify=s,t.notify.message=n,t.notify.closeAll=o,s});
|
@ -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 simplePagination - Copyright (c) 2012 Flavius Matis - http://flaviusmatis.github.com/simplePagination.js/ (MIT)
|
||||
*/
|
||||
@ -26,9 +26,9 @@
|
||||
items : 1,
|
||||
itemsOnPage : 1,
|
||||
pages : 0,
|
||||
displayedPages : 3,
|
||||
edges : 3,
|
||||
currentPage : 1,
|
||||
displayedPages : 7,
|
||||
edges : 1,
|
||||
currentPage : 0,
|
||||
lblPrev : false,
|
||||
lblNext : false,
|
||||
onSelectPage : function() {}
|
||||
@ -43,7 +43,7 @@
|
||||
var ele = UI.$(this);
|
||||
|
||||
if (!ele.data("pagination")) {
|
||||
var obj = UI.pagination(ele, UI.Utils.options(ele.attr("data-uk-pagination")));
|
||||
UI.pagination(ele, UI.Utils.options(ele.attr("data-uk-pagination")));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -54,7 +54,7 @@
|
||||
var $this = this;
|
||||
|
||||
this.pages = this.options.pages ? this.options.pages : Math.ceil(this.options.items / this.options.itemsOnPage) ? Math.ceil(this.options.items / this.options.itemsOnPage) : 1;
|
||||
this.currentPage = this.options.currentPage - 1;
|
||||
this.currentPage = this.options.currentPage;
|
||||
this.halfDisplayed = this.options.displayedPages / 2;
|
||||
|
||||
this.on("click", "a[data-page]", function(e){
|
||||
@ -93,7 +93,7 @@
|
||||
this.element.empty();
|
||||
|
||||
// Generate Prev link
|
||||
if (o.lblPrev) this._append(o.currentPage - 1, {text: o.lblPrev});
|
||||
if (o.lblPrev) this._append(this.currentPage - 1, {text: o.lblPrev});
|
||||
|
||||
// Generate start edges
|
||||
if (interval.start > 0 && o.edges > 0) {
|
||||
@ -127,18 +127,17 @@
|
||||
}
|
||||
|
||||
// Generate Next link (unless option is set for at front)
|
||||
if (o.lblNext) this._append(o.currentPage + 1, {text: o.lblNext});
|
||||
if (o.lblNext) this._append(this.currentPage + 1, {text: o.lblNext});
|
||||
},
|
||||
|
||||
_append: function(pageIndex, opts) {
|
||||
|
||||
var $this = this, item, link, options;
|
||||
var item, options;
|
||||
|
||||
pageIndex = pageIndex < 0 ? 0 : (pageIndex < this.pages ? pageIndex : this.pages - 1);
|
||||
options = UI.$.extend({ text: pageIndex + 1 }, opts);
|
||||
|
||||
item = (pageIndex == this.currentPage) ? '<li class="uk-active"><span>' + (options.text) + '</span></li>'
|
||||
: '<li><a href="#page-'+(pageIndex+1)+'" data-page="'+pageIndex+'">'+options.text+'</a></li>';
|
||||
item = (pageIndex == this.currentPage) ? '<li class="uk-active"><span>' + (options.text) + '</span></li>' : '<li><a href="#page-'+(pageIndex+1)+'" data-page="'+pageIndex+'">'+options.text+'</a></li>';
|
||||
|
||||
this.element.append(item);
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-pagination",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("pagination",{defaults:{items:1,itemsOnPage:1,pages:0,displayedPages:3,edges:3,currentPage:1,lblPrev:!1,lblNext:!1,onSelectPage:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-pagination]",e).each(function(){var e=t.$(this);if(!e.data("pagination")){t.pagination(e,t.Utils.options(e.attr("data-uk-pagination")))}})})},init:function(){var e=this;this.pages=this.options.pages?this.options.pages:Math.ceil(this.options.items/this.options.itemsOnPage)?Math.ceil(this.options.items/this.options.itemsOnPage):1,this.currentPage=this.options.currentPage-1,this.halfDisplayed=this.options.displayedPages/2,this.on("click","a[data-page]",function(i){i.preventDefault(),e.selectPage(t.$(this).data("page"))}),this._render()},_getInterval:function(){return{start:Math.ceil(this.currentPage>this.halfDisplayed?Math.max(Math.min(this.currentPage-this.halfDisplayed,this.pages-this.options.displayedPages),0):0),end:Math.ceil(this.currentPage>this.halfDisplayed?Math.min(this.currentPage+this.halfDisplayed,this.pages):Math.min(this.options.displayedPages,this.pages))}},render:function(t){this.pages=t?t:this.pages,this._render()},selectPage:function(t,e){this.currentPage=t,this.render(e),this.options.onSelectPage.apply(this,[t]),this.trigger("select.uk.pagination",[t,this])},_render:function(){var t,e=this.options,i=this._getInterval();if(this.element.empty(),e.lblPrev&&this._append(e.currentPage-1,{text:e.lblPrev}),i.start>0&&e.edges>0){var s=Math.min(e.edges,i.start);for(t=0;s>t;t++)this._append(t);e.edges<i.start&&i.start-e.edges!=1?this.element.append("<li><span>...</span></li>"):i.start-e.edges==1&&this._append(e.edges)}for(t=i.start;t<i.end;t++)this._append(t);if(i.end<this.pages&&e.edges>0){this.pages-e.edges>i.end&&this.pages-e.edges-i.end!=1?this.element.append("<li><span>...</span></li>"):this.pages-e.edges-i.end==1&&this._append(i.end++);var a=Math.max(this.pages-e.edges,i.end);for(t=a;t<this.pages;t++)this._append(t)}e.lblNext&&this._append(e.currentPage+1,{text:e.lblNext})},_append:function(e,i){var s,a;e=0>e?0:e<this.pages?e:this.pages-1,a=t.$.extend({text:e+1},i),s=e==this.currentPage?'<li class="uk-active"><span>'+a.text+"</span></li>":'<li><a href="#page-'+(e+1)+'" data-page="'+e+'">'+a.text+"</a></li>",this.element.append(s)}}),t.pagination});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-pagination",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("pagination",{defaults:{items:1,itemsOnPage:1,pages:0,displayedPages:7,edges:1,currentPage:0,lblPrev:!1,lblNext:!1,onSelectPage:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-pagination]",e).each(function(){var e=t.$(this);e.data("pagination")||t.pagination(e,t.Utils.options(e.attr("data-uk-pagination")))})})},init:function(){var e=this;this.pages=this.options.pages?this.options.pages:Math.ceil(this.options.items/this.options.itemsOnPage)?Math.ceil(this.options.items/this.options.itemsOnPage):1,this.currentPage=this.options.currentPage,this.halfDisplayed=this.options.displayedPages/2,this.on("click","a[data-page]",function(i){i.preventDefault(),e.selectPage(t.$(this).data("page"))}),this._render()},_getInterval:function(){return{start:Math.ceil(this.currentPage>this.halfDisplayed?Math.max(Math.min(this.currentPage-this.halfDisplayed,this.pages-this.options.displayedPages),0):0),end:Math.ceil(this.currentPage>this.halfDisplayed?Math.min(this.currentPage+this.halfDisplayed,this.pages):Math.min(this.options.displayedPages,this.pages))}},render:function(t){this.pages=t?t:this.pages,this._render()},selectPage:function(t,e){this.currentPage=t,this.render(e),this.options.onSelectPage.apply(this,[t]),this.trigger("select.uk.pagination",[t,this])},_render:function(){var t,e=this.options,i=this._getInterval();if(this.element.empty(),e.lblPrev&&this._append(this.currentPage-1,{text:e.lblPrev}),i.start>0&&e.edges>0){var s=Math.min(e.edges,i.start);for(t=0;s>t;t++)this._append(t);e.edges<i.start&&i.start-e.edges!=1?this.element.append("<li><span>...</span></li>"):i.start-e.edges==1&&this._append(e.edges)}for(t=i.start;t<i.end;t++)this._append(t);if(i.end<this.pages&&e.edges>0){this.pages-e.edges>i.end&&this.pages-e.edges-i.end!=1?this.element.append("<li><span>...</span></li>"):this.pages-e.edges-i.end==1&&this._append(i.end++);var a=Math.max(this.pages-e.edges,i.end);for(t=a;t<this.pages;t++)this._append(t)}e.lblNext&&this._append(this.currentPage+1,{text:e.lblNext})},_append:function(e,i){var s,a;e=0>e?0:e<this.pages?e:this.pages-1,a=t.$.extend({text:e+1},i),s=e==this.currentPage?'<li class="uk-active"><span>'+a.text+"</span></li>":'<li><a href="#page-'+(e+1)+'" data-page="'+e+'">'+a.text+"</a></li>",this.element.append(s)}}),t.pagination});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -25,11 +25,11 @@
|
||||
|
||||
scrolltop = UI.$win.scrollTop();
|
||||
|
||||
window.requestAnimationFrame.apply(window, [function(){
|
||||
window.requestAnimationFrame(function(){
|
||||
for (var i=0; i < parallaxes.length; i++) {
|
||||
parallaxes[i].process();
|
||||
}
|
||||
}]);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
var parallax = UI.$(this);
|
||||
|
||||
if (!parallax.data("parallax")) {
|
||||
var obj = UI.parallax(parallax, UI.Utils.options(parallax.attr("data-uk-parallax")));
|
||||
UI.parallax(parallax, UI.Utils.options(parallax.attr("data-uk-parallax")));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -185,7 +185,8 @@
|
||||
|
||||
update: function(percent) {
|
||||
|
||||
var css = {'transform':''},
|
||||
var $this = this,
|
||||
css = {'transform':''},
|
||||
compercent = percent * (1 - (this.velocity - (this.velocity * percent))),
|
||||
opts, val;
|
||||
|
||||
@ -236,6 +237,12 @@
|
||||
|
||||
// bg image
|
||||
case "bg":
|
||||
|
||||
// don't move if image height is too small
|
||||
// if ($this.element.data('bgsize') && ($this.element.data('bgsize').h + val - window.innerHeight) < 0) {
|
||||
// break;
|
||||
// }
|
||||
|
||||
css['background-position'] = '50% '+val+'px';
|
||||
break;
|
||||
case "bgp":
|
||||
@ -283,29 +290,40 @@
|
||||
|
||||
function initBgImageParallax(obj, prop, opts) {
|
||||
|
||||
var img = new Image(), url, loaded, element, size, check, ratio, width, height;
|
||||
var img = new Image(), url, element, size, check, ratio, width, height;
|
||||
|
||||
element = obj.element.css({'background-size': 'cover', 'background-repeat': 'no-repeat'});
|
||||
url = element.css('background-image').replace(/^url\(/g, '').replace(/\)$/g, '').replace(/("|')/g, '');
|
||||
check = function() {
|
||||
|
||||
var w = element.width(), h = element.height(), extra = (prop=='bg') ? opts.diff : (opts.diff/100) * h;
|
||||
var w = element.innerWidth(), h = element.innerHeight(), extra = (prop=='bg') ? opts.diff : (opts.diff/100) * h;
|
||||
|
||||
h += extra;
|
||||
w += Math.ceil(extra * ratio);
|
||||
|
||||
if (w-extra < size.w && h < size.h) {
|
||||
return obj.element.css({'background-size': 'auto'});
|
||||
}
|
||||
|
||||
// if element height < parent height (gap underneath)
|
||||
if ((w / ratio) < h) {
|
||||
|
||||
width = Math.ceil(h * ratio);
|
||||
height = h;
|
||||
|
||||
if (h > window.innerHeight) {
|
||||
width = width * 1.2;
|
||||
height = height * 1.2;
|
||||
}
|
||||
|
||||
// element width < parent width (gap to right)
|
||||
} else {
|
||||
|
||||
width = w;
|
||||
height = Math.ceil(w / ratio);
|
||||
}
|
||||
|
||||
obj.element.css({'background-size': (width+'px '+height+'px')});
|
||||
element.css({'background-size': (width+'px '+height+'px')}).data('bgsize', {w:width,h:height});
|
||||
};
|
||||
|
||||
img.onerror = function(){
|
||||
@ -313,7 +331,7 @@
|
||||
};
|
||||
|
||||
img.onload = function(){
|
||||
size = {w:img.width, height:img.height};
|
||||
size = {w:img.width, h:img.height};
|
||||
ratio = img.width / img.height;
|
||||
|
||||
UI.$win.on("load resize orientationchange", UI.Utils.debounce(function(){
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
renderer: function(data) {
|
||||
|
||||
var $this = this, opts = this.options;
|
||||
var opts = this.options;
|
||||
|
||||
this.dropdown.append(this.template({"items":data.results || [], "msgResultsHeader":opts.msgResultsHeader, "msgMoreResults": opts.msgMoreResults, "msgNoResults": opts.msgNoResults}));
|
||||
this.show();
|
||||
@ -59,7 +59,7 @@
|
||||
var ele =UI.$(this);
|
||||
|
||||
if (!ele.data("search")) {
|
||||
var obj = UI.search(ele, UI.Utils.options(ele.attr("data-uk-search")));
|
||||
UI.search(ele, UI.Utils.options(ele.attr("data-uk-search")));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(e){var s;window.UIkit&&(s=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-search",["uikit"],function(){return s||e(UIkit)})}(function(e){"use strict";e.component("search",{defaults:{msgResultsHeader:"Search Results",msgMoreResults:"More Results",msgNoResults:"No results found",template:'<ul class="uk-nav uk-nav-search uk-autocomplete-results"> {{#msgResultsHeader}}<li class="uk-nav-header uk-skip">{{msgResultsHeader}}</li>{{/msgResultsHeader}} {{#items && items.length}} {{~items}} <li data-url="{{!$item.url}}"> <a href="{{!$item.url}}"> {{{$item.title}}} {{#$item.text}}<div>{{{$item.text}}}</div>{{/$item.text}} </a> </li> {{/items}} {{#msgMoreResults}} <li class="uk-nav-divider uk-skip"></li> <li class="uk-search-moreresults" data-moreresults="true"><a href="#" onclick="jQuery(this).closest(\'form\').submit();">{{msgMoreResults}}</a></li> {{/msgMoreResults}} {{/end}} {{^items.length}} {{#msgNoResults}}<li class="uk-skip"><a>{{msgNoResults}}</a></li>{{/msgNoResults}} {{/end}} </ul>',renderer:function(e){var s=this.options;this.dropdown.append(this.template({items:e.results||[],msgResultsHeader:s.msgResultsHeader,msgMoreResults:s.msgMoreResults,msgNoResults:s.msgNoResults})),this.show()}},boot:function(){e.$html.on("focus.search.uikit","[data-uk-search]",function(){var s=e.$(this);if(!s.data("search")){e.search(s,e.Utils.options(s.attr("data-uk-search")))}})},init:function(){var s=this;this.autocomplete=e.autocomplete(this.element,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-search"),this.autocomplete.input.on("keyup",function(){s.element[s.autocomplete.input.val()?"addClass":"removeClass"]("uk-active")}).closest("form").on("reset",function(){s.value="",s.element.removeClass("uk-active")}),this.on("selectitem.uk.autocomplete",function(e,t){t.url?location.href=t.url:t.moreresults&&s.autocomplete.input.closest("form").submit()}),this.element.data("search",this)}})});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(e){var s;window.UIkit&&(s=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-search",["uikit"],function(){return s||e(UIkit)})}(function(e){"use strict";e.component("search",{defaults:{msgResultsHeader:"Search Results",msgMoreResults:"More Results",msgNoResults:"No results found",template:'<ul class="uk-nav uk-nav-search uk-autocomplete-results"> {{#msgResultsHeader}}<li class="uk-nav-header uk-skip">{{msgResultsHeader}}</li>{{/msgResultsHeader}} {{#items && items.length}} {{~items}} <li data-url="{{!$item.url}}"> <a href="{{!$item.url}}"> {{{$item.title}}} {{#$item.text}}<div>{{{$item.text}}}</div>{{/$item.text}} </a> </li> {{/items}} {{#msgMoreResults}} <li class="uk-nav-divider uk-skip"></li> <li class="uk-search-moreresults" data-moreresults="true"><a href="#" onclick="jQuery(this).closest(\'form\').submit();">{{msgMoreResults}}</a></li> {{/msgMoreResults}} {{/end}} {{^items.length}} {{#msgNoResults}}<li class="uk-skip"><a>{{msgNoResults}}</a></li>{{/msgNoResults}} {{/end}} </ul>',renderer:function(e){var s=this.options;this.dropdown.append(this.template({items:e.results||[],msgResultsHeader:s.msgResultsHeader,msgMoreResults:s.msgMoreResults,msgNoResults:s.msgNoResults})),this.show()}},boot:function(){e.$html.on("focus.search.uikit","[data-uk-search]",function(){var s=e.$(this);s.data("search")||e.search(s,e.Utils.options(s.attr("data-uk-search")))})},init:function(){var s=this;this.autocomplete=e.autocomplete(this.element,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-search"),this.autocomplete.input.on("keyup",function(){s.element[s.autocomplete.input.val()?"addClass":"removeClass"]("uk-active")}).closest("form").on("reset",function(){s.value="",s.element.removeClass("uk-active")}),this.on("selectitem.uk.autocomplete",function(e,t){t.url?location.href=t.url:t.moreresults&&s.autocomplete.input.closest("form").submit()}),this.element.data("search",this)}})});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -22,10 +22,13 @@
|
||||
UI.component('slider', {
|
||||
|
||||
defaults: {
|
||||
center : false,
|
||||
threshold : 10,
|
||||
infinite : true,
|
||||
activecls : 'uk-active'
|
||||
center : false,
|
||||
threshold : 10,
|
||||
infinite : true,
|
||||
autoplay : false,
|
||||
autoplayInterval : 7000,
|
||||
pauseOnHover : true,
|
||||
activecls : 'uk-active'
|
||||
},
|
||||
|
||||
boot: function() {
|
||||
@ -35,11 +38,11 @@
|
||||
|
||||
setTimeout(function(){
|
||||
|
||||
UI.$("[data-uk-slider]", context).each(function(){
|
||||
UI.$('[data-uk-slider]', context).each(function(){
|
||||
|
||||
var ele = UI.$(this);
|
||||
|
||||
if (!ele.data("slider")) {
|
||||
if (!ele.data('slider')) {
|
||||
UI.slider(ele, UI.Utils.options(ele.attr('data-uk-slider')));
|
||||
}
|
||||
});
|
||||
@ -55,11 +58,11 @@
|
||||
this.container = this.element.find('.uk-slider');
|
||||
this.focus = 0;
|
||||
|
||||
UI.$win.on("resize load", UI.Utils.debounce(function() {
|
||||
UI.$win.on('resize load', UI.Utils.debounce(function() {
|
||||
$this.resize(true);
|
||||
}, 100));
|
||||
|
||||
this.on("click.uikit.slider", '[data-uk-slider-item]', function(e) {
|
||||
this.on('click.uk.slider', '[data-uk-slider-item]', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
@ -67,65 +70,77 @@
|
||||
|
||||
if ($this.focus == item) return;
|
||||
|
||||
// stop autoplay
|
||||
$this.stop();
|
||||
|
||||
switch(item) {
|
||||
case 'next':
|
||||
case 'previous':
|
||||
$this[item=='next' ? 'next':'previous']();
|
||||
break;
|
||||
default:
|
||||
$this.updateFocus(parseInt(slide, 10));
|
||||
$this.updateFocus(parseInt(item, 10));
|
||||
}
|
||||
});
|
||||
|
||||
this.container.on('touchstart mousedown', function(evt) {
|
||||
this.container.on({
|
||||
|
||||
if (evt.originalEvent && evt.originalEvent.touches) {
|
||||
evt = evt.originalEvent.touches[0];
|
||||
}
|
||||
'touchstart mousedown': function(evt) {
|
||||
|
||||
// ignore right click button
|
||||
if (evt.button && evt.button==2 || !$this.active) {
|
||||
return;
|
||||
}
|
||||
|
||||
anchor = UI.$(evt.target).is('a') ? UI.$(evt.target) : UI.$(evt.target).parents('a:first');
|
||||
dragged = false;
|
||||
|
||||
if (anchor.length) {
|
||||
|
||||
anchor.one('click', function(e){
|
||||
if (dragged) e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
delayIdle = function(e) {
|
||||
|
||||
dragged = true;
|
||||
dragging = $this;
|
||||
store = {
|
||||
touchx : parseInt(e.pageX, 10),
|
||||
dir : 1,
|
||||
focus : $this.focus,
|
||||
base : $this.options.center ? 'center':'area'
|
||||
};
|
||||
|
||||
if (e.originalEvent && e.originalEvent.touches) {
|
||||
e = e.originalEvent.touches[0];
|
||||
if (evt.originalEvent && evt.originalEvent.touches) {
|
||||
evt = evt.originalEvent.touches[0];
|
||||
}
|
||||
|
||||
dragging.element.data({
|
||||
'pointer-start': {x: parseInt(e.pageX, 10), y: parseInt(e.pageY, 10)},
|
||||
'pointer-pos-start': $this.pos
|
||||
});
|
||||
// ignore right click button
|
||||
if (evt.button && evt.button==2 || !$this.active) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this.container.addClass('uk-drag');
|
||||
// stop autoplay
|
||||
$this.stop();
|
||||
|
||||
delayIdle = false;
|
||||
};
|
||||
anchor = UI.$(evt.target).is('a') ? UI.$(evt.target) : UI.$(evt.target).parents('a:first');
|
||||
dragged = false;
|
||||
|
||||
delayIdle.x = parseInt(evt.pageX, 10);
|
||||
delayIdle.threshold = $this.options.threshold;
|
||||
if (anchor.length) {
|
||||
|
||||
anchor.one('click', function(e){
|
||||
if (dragged) e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
delayIdle = function(e) {
|
||||
|
||||
dragged = true;
|
||||
dragging = $this;
|
||||
store = {
|
||||
touchx : parseInt(e.pageX, 10),
|
||||
dir : 1,
|
||||
focus : $this.focus,
|
||||
base : $this.options.center ? 'center':'area'
|
||||
};
|
||||
|
||||
if (e.originalEvent && e.originalEvent.touches) {
|
||||
e = e.originalEvent.touches[0];
|
||||
}
|
||||
|
||||
dragging.element.data({
|
||||
'pointer-start': {x: parseInt(e.pageX, 10), y: parseInt(e.pageY, 10)},
|
||||
'pointer-pos-start': $this.pos
|
||||
});
|
||||
|
||||
$this.container.addClass('uk-drag');
|
||||
|
||||
delayIdle = false;
|
||||
};
|
||||
|
||||
delayIdle.x = parseInt(evt.pageX, 10);
|
||||
delayIdle.threshold = $this.options.threshold;
|
||||
|
||||
},
|
||||
|
||||
mouseenter: function() { if ($this.options.pauseOnHover) $this.hovering = true; },
|
||||
mouseleave: function() { $this.hovering = false; }
|
||||
});
|
||||
|
||||
this.resize(true);
|
||||
@ -138,6 +153,12 @@
|
||||
|
||||
// prevent dragging links + images
|
||||
this.element.find('a,img').attr('draggable', 'false');
|
||||
|
||||
// Set autoplay
|
||||
if (this.options.autoplay) {
|
||||
this.start();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
resize: function(focus) {
|
||||
@ -164,7 +185,7 @@
|
||||
|
||||
this.container.css({'min-width': pos, 'min-height': maxheight});
|
||||
|
||||
if (this.options.infinite && pos <= (2*this.vp) && !this.itemsResized) {
|
||||
if (this.options.infinite && (pos <= (2*this.vp) || this.items.length < 5) && !this.itemsResized) {
|
||||
|
||||
// fill with cloned items
|
||||
this.container.children().each(function(idx){
|
||||
@ -188,7 +209,7 @@
|
||||
'transform': ''
|
||||
});
|
||||
|
||||
this.updateFocus(0);
|
||||
if (focus) this.updateFocus(this.focus);
|
||||
},
|
||||
|
||||
updatePos: function(pos) {
|
||||
@ -208,7 +229,7 @@
|
||||
|
||||
dir = dir || (idx > this.focus ? 1:-1);
|
||||
|
||||
var $this = this, item = this.items.eq(idx), area, i;
|
||||
var item = this.items.eq(idx), area, i;
|
||||
|
||||
if (this.options.infinite) {
|
||||
this.infinite(idx, dir);
|
||||
@ -250,18 +271,36 @@
|
||||
|
||||
area += this.items.eq(i).data('width');
|
||||
|
||||
if (area >= this.vp) {
|
||||
if (area == this.vp) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (area > this.vp) {
|
||||
idx = (i < this.items.length-1) ? i+1 : i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.updatePos(this.items.eq(idx).data('left')*-1);
|
||||
if (area > this.vp) {
|
||||
this.updatePos((this.container.width() - this.vp) * -1);
|
||||
} else {
|
||||
this.updatePos(this.items.eq(idx).data('left')*-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// mark elements
|
||||
var left = this.items.eq(idx).data('left');
|
||||
|
||||
this.items.removeClass('uk-slide-before uk-slide-after').each(function(i){
|
||||
if (i!==idx) {
|
||||
UI.$(this).addClass(UI.$(this).data('left') < left ? 'uk-slide-before':'uk-slide-after');
|
||||
}
|
||||
});
|
||||
|
||||
this.focus = idx;
|
||||
|
||||
this.trigger('focusitem.uk.slider', [idx,this.items.eq(idx),this]);
|
||||
@ -281,9 +320,25 @@
|
||||
this.updateFocus(focus, -1);
|
||||
},
|
||||
|
||||
start: function() {
|
||||
|
||||
this.stop();
|
||||
|
||||
var $this = this;
|
||||
|
||||
this.interval = setInterval(function() {
|
||||
if (!$this.hovering) $this.next();
|
||||
}, this.options.autoplayInterval);
|
||||
|
||||
},
|
||||
|
||||
stop: function() {
|
||||
if (this.interval) clearInterval(this.interval);
|
||||
},
|
||||
|
||||
infinite: function(baseidx, direction) {
|
||||
|
||||
var $this = this, item = this.items.eq(baseidx), i, z = baseidx, move = [], lastvisible, area = 0;
|
||||
var $this = this, item = this.items.eq(baseidx), i, z = baseidx, move = [], area = 0;
|
||||
|
||||
if (direction == 1) {
|
||||
|
||||
@ -356,7 +411,7 @@
|
||||
});
|
||||
|
||||
// handle dragging
|
||||
UI.$doc.on('mousemove.uikit.slider touchmove.uikit.slider', function(e) {
|
||||
UI.$doc.on('mousemove.uk.slider touchmove.uk.slider', function(e) {
|
||||
|
||||
if (e.originalEvent && e.originalEvent.touches) {
|
||||
e = e.originalEvent.touches[0];
|
||||
@ -434,13 +489,16 @@
|
||||
store.diff = diff;
|
||||
});
|
||||
|
||||
UI.$doc.on('mouseup.uikit.slider touchend.uikit.slider', function(e) {
|
||||
UI.$doc.on('mouseup.uk.slider touchend.uk.slider', function(e) {
|
||||
|
||||
if (dragging) {
|
||||
|
||||
dragging.container.removeClass('uk-drag');
|
||||
|
||||
var item = dragging.items.eq(store.focus), itm, focus = false, i, z;
|
||||
// TODO is this needed?
|
||||
dragging.items.eq(store.focus);
|
||||
|
||||
var itm, focus = false, i, z;
|
||||
|
||||
if (store.dir == 1) {
|
||||
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -45,7 +45,7 @@
|
||||
var ele = UI.$(this);
|
||||
|
||||
if(!ele.data("slideset")) {
|
||||
var plugin = UI.slideset(ele, UI.Utils.options(ele.attr("data-uk-slideset")));
|
||||
UI.slideset(ele, UI.Utils.options(ele.attr("data-uk-slideset")));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -75,7 +75,7 @@
|
||||
$this.list.addClass('uk-grid-width-'+bp+'-1-'+$this.options[bp]);
|
||||
});
|
||||
|
||||
this.on("click.uikit.slideset", '[data-uk-slideset-item]', function(e) {
|
||||
this.on("click.uk.slideset", '[data-uk-slideset-item]', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
|
||||
});
|
||||
|
||||
this.controls.on('click.uikit.slideset', '[data-uk-filter]', function(e) {
|
||||
this.controls.on('click.uk.slideset', '[data-uk-filter]', function(e) {
|
||||
|
||||
var ele = UI.$(this);
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
|
||||
updateSets: function(animate, force) {
|
||||
|
||||
var $this = this, visible = this.visible, i;
|
||||
var visible = this.visible, i;
|
||||
|
||||
this.visible = this.getVisibleOnCurrenBreakpoint();
|
||||
|
||||
@ -296,8 +296,7 @@
|
||||
|
||||
_getAnimation: function() {
|
||||
|
||||
var $this = this,
|
||||
animation = Animations[this.options.animation] || Animations.none;
|
||||
var animation = Animations[this.options.animation] || Animations.none;
|
||||
|
||||
if (!UI.support.animation) {
|
||||
animation = Animations.none;
|
||||
@ -397,7 +396,7 @@
|
||||
|
||||
function coreAnimation(cls, current, next, dir) {
|
||||
|
||||
var d = UI.$.Deferred(),
|
||||
var d = UI.$.Deferred(),
|
||||
delay = (this.options.delay === false) ? Math.floor(this.options.duration/2) : this.options.delay,
|
||||
$this = this, clsIn, clsOut, release, i;
|
||||
|
||||
@ -433,13 +432,21 @@
|
||||
next.eq(dir == 1 ? i:(next.length - i)-1).css('animation-delay', (i*delay)+'ms');
|
||||
}
|
||||
|
||||
next.addClass(clsIn)[dir==1 ? 'last':'first']().one(UI.support.animation.end, function() {
|
||||
|
||||
var finish = function() {
|
||||
next.removeClass(''+clsIn+'').css({opacity:'', display:'', 'animation-delay':'', 'animation':''});
|
||||
d.resolve();
|
||||
$this.element.css('min-height', '');
|
||||
finish = false;
|
||||
};
|
||||
|
||||
next.addClass(clsIn)[dir==1 ? 'last':'first']().one(UI.support.animation.end, function(){
|
||||
if(finish) finish();
|
||||
}).end().css('display', '');
|
||||
|
||||
// make sure everything resolves really
|
||||
setTimeout(function() {
|
||||
if(finish) finish();
|
||||
}, next.length * delay * 2);
|
||||
};
|
||||
|
||||
if (next.length) {
|
||||
@ -457,7 +464,11 @@
|
||||
(function (index, ele){
|
||||
|
||||
setTimeout(function(){
|
||||
ele.css('display', 'none').css('display', '').css('opacity', 0).addClass(clsOut+' uk-animation-reverse');
|
||||
|
||||
ele.css('display', 'none').css('display', '').css('opacity', 0).on(UI.support.animation.end, function(){
|
||||
ele.removeClass(clsOut);
|
||||
}).addClass(clsOut+' uk-animation-reverse');
|
||||
|
||||
}.bind(this), i * delay);
|
||||
|
||||
})(i, current.eq(dir == 1 ? i:(current.length - i)-1));
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -132,8 +132,6 @@
|
||||
|
||||
for (var i = 0; i < this.options.slices; i++) {
|
||||
|
||||
var width = (i == this.options.slices-1) ? (ghostWidth - (sliceWidth*i)) : sliceWidth;
|
||||
|
||||
bar = UI.$('<div class="uk-cover-background"></div>').css({
|
||||
'position' : 'absolute',
|
||||
'top' : 0,
|
||||
@ -361,7 +359,7 @@
|
||||
if (!animations[this.fxIndex]) this.fxIndex = 0;
|
||||
|
||||
return Animations[animations[this.fxIndex]].apply(this, arguments);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -40,7 +40,7 @@
|
||||
'uk-animation-top-center',
|
||||
'', // middle-center
|
||||
'uk-animation-bottom-right'
|
||||
],
|
||||
]
|
||||
},
|
||||
|
||||
current : false,
|
||||
@ -57,7 +57,7 @@
|
||||
var slideshow = UI.$(this);
|
||||
|
||||
if (!slideshow.data("slideshow")) {
|
||||
var obj = UI.slideshow(slideshow, UI.Utils.options(slideshow.attr("data-uk-slideshow")));
|
||||
UI.slideshow(slideshow, UI.Utils.options(slideshow.attr("data-uk-slideshow")));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -105,7 +105,14 @@
|
||||
|
||||
var cover = UI.$('<div class="uk-cover-background uk-position-cover"></div>').css({'background-image':'url('+ media.attr('src') + ')'});
|
||||
|
||||
media.css({'width': '100%','height': 'auto'});
|
||||
if (media.attr('width') && media.attr('height')) {
|
||||
placeholder = UI.$('<canvas></canvas>').attr({width:media.attr('width'), height:media.attr('height')});
|
||||
media.replaceWith(placeholder);
|
||||
media = placeholder;
|
||||
placeholder = undefined;
|
||||
}
|
||||
|
||||
media.css({width: '100%',height: 'auto', opacity:0});
|
||||
slide.prepend(cover).data('cover', cover);
|
||||
break;
|
||||
|
||||
@ -179,7 +186,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
this.on("click.uikit.slideshow", '[data-uk-slideshow-item]', function(e) {
|
||||
this.on("click.uk.slideshow", '[data-uk-slideshow-item]', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
@ -257,7 +264,7 @@
|
||||
|
||||
if (this.container.hasClass('uk-slideshow-fullscreen')) return;
|
||||
|
||||
var $this = this, height = this.options.height;
|
||||
var height = this.options.height;
|
||||
|
||||
if (this.options.height === 'auto') {
|
||||
|
||||
@ -281,7 +288,7 @@
|
||||
var $this = this,
|
||||
current = this.slides.eq(this.current),
|
||||
next = this.slides.eq(index),
|
||||
dir = direction ? direction : this.current < index ? -1 : 1,
|
||||
dir = direction ? direction : this.current < index ? 1 : -1,
|
||||
currentmedia = current.data('media'),
|
||||
animation = Animations[this.options.animation] ? this.options.animation : 'fade',
|
||||
nextmedia = next.data('media'),
|
||||
@ -305,7 +312,7 @@
|
||||
|
||||
UI.Utils.checkDisplay(next, '[class*="uk-animation-"]:not(.uk-cover-background.uk-position-cover)');
|
||||
|
||||
$this.trigger('show.uk.slideshow', [next]);
|
||||
$this.trigger('show.uk.slideshow', [next, current, $this]);
|
||||
};
|
||||
|
||||
$this.applyKenBurns(next);
|
||||
@ -318,6 +325,8 @@
|
||||
current = UI.$(current);
|
||||
next = UI.$(next);
|
||||
|
||||
$this.trigger('beforeshow.uk.slideshow', [next, current, $this]);
|
||||
|
||||
Animations[animation].apply(this, [current, next, dir]).then(finalize);
|
||||
|
||||
$this.triggers.removeClass('uk-active');
|
||||
@ -345,11 +354,11 @@
|
||||
},
|
||||
|
||||
next: function() {
|
||||
this.show(this.slides[this.current + 1] ? (this.current + 1) : 0);
|
||||
this.show(this.slides[this.current + 1] ? (this.current + 1) : 0, 1);
|
||||
},
|
||||
|
||||
previous: function() {
|
||||
this.show(this.slides[this.current - 1] ? (this.current - 1) : (this.slides.length - 1));
|
||||
this.show(this.slides[this.current - 1] ? (this.current - 1) : (this.slides.length - 1), -1);
|
||||
},
|
||||
|
||||
start: function() {
|
||||
@ -435,14 +444,14 @@
|
||||
|
||||
next.css('opacity', 1).one(UI.support.animation.end, function() {
|
||||
|
||||
current.removeClass(dir === 1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
|
||||
next.css('opacity', '').removeClass(dir === 1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
|
||||
current.removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
|
||||
next.css('opacity', '').removeClass(dir == -1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
|
||||
d.resolve();
|
||||
|
||||
}.bind(this));
|
||||
|
||||
current.addClass(dir == 1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
|
||||
next.addClass(dir == 1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
|
||||
current.addClass(dir == -1 ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out');
|
||||
next.addClass(dir == -1 ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in');
|
||||
next.width(); // force redraw
|
||||
|
||||
return d.promise();
|
||||
@ -457,14 +466,14 @@
|
||||
|
||||
next.css('opacity', 1).one(UI.support.animation.end, function() {
|
||||
|
||||
current.removeClass(dir === 1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
|
||||
next.css('opacity', '').removeClass(dir === 1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
|
||||
current.removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
|
||||
next.css('opacity', '').removeClass(dir === -1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
|
||||
d.resolve();
|
||||
|
||||
}.bind(this));
|
||||
|
||||
current.addClass(dir == 1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
|
||||
next.addClass(dir == 1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
|
||||
current.addClass(dir == -1 ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out');
|
||||
next.addClass(dir == -1 ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in');
|
||||
next.width(); // force redraw
|
||||
|
||||
return d.promise();
|
||||
@ -502,6 +511,14 @@
|
||||
|
||||
next.css('opacity', 1);
|
||||
|
||||
// for plain text content slides - looks smoother
|
||||
if (!(next.data('cover') || next.data('placeholder'))) {
|
||||
|
||||
next.css('opacity', 1).one(UI.support.animation.end, function() {
|
||||
next.removeClass('uk-slideshow-fade-in');
|
||||
}).addClass('uk-slideshow-fade-in');
|
||||
}
|
||||
|
||||
current.one(UI.support.animation.end, function() {
|
||||
|
||||
current.removeClass('uk-slideshow-fade-out');
|
||||
|
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 */
|
||||
/*
|
||||
* Based on nativesortable - Copyright (c) Brian Grinstead - https://github.com/bgrins/nativesortable
|
||||
*/
|
||||
@ -21,7 +21,7 @@
|
||||
"use strict";
|
||||
|
||||
var supportsTouch = ('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch),
|
||||
draggingPlaceholder, currentlyDraggingElement, currentlyDraggingTarget, dragging, moving, clickedlink, delayIdle, touchedlists, moved;
|
||||
draggingPlaceholder, currentlyDraggingElement, currentlyDraggingTarget, dragging, moving, clickedlink, delayIdle, touchedlists, moved, overElement;
|
||||
|
||||
function closestSortable(ele) {
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
dragMovingClass : 'uk-sortable-moving',
|
||||
baseClass : 'uk-sortable',
|
||||
noDragClass : 'uk-sortable-nodrag',
|
||||
emptyClass : 'uk-sortable-empty',
|
||||
dragCustomClass : '',
|
||||
handleClass : false,
|
||||
group : false,
|
||||
@ -70,7 +71,7 @@
|
||||
var ele = UI.$(this);
|
||||
|
||||
if(!ele.data("sortable")) {
|
||||
var plugin = UI.sortable(ele, UI.Utils.options(ele.attr("data-uk-sortable")));
|
||||
UI.sortable(ele, UI.Utils.options(ele.attr("data-uk-sortable")));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -105,10 +106,15 @@
|
||||
draggingPlaceholder.css({'left': left, 'top': top });
|
||||
|
||||
// adjust document scrolling
|
||||
|
||||
if (top + (draggingPlaceholder.height()/3) > document.body.offsetHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (top < UI.$win.scrollTop()) {
|
||||
UI.$win.scrollTop(UI.$win.scrollTop() - Math.ceil(draggingPlaceholder.height()/2));
|
||||
} else if ( (top + draggingPlaceholder.height()) > (window.innerHeight + UI.$win.scrollTop()) ) {
|
||||
UI.$win.scrollTop(UI.$win.scrollTop() + Math.ceil(draggingPlaceholder.height()/2));
|
||||
UI.$win.scrollTop(UI.$win.scrollTop() - Math.ceil(draggingPlaceholder.height()/3));
|
||||
} else if ( (top + (draggingPlaceholder.height()/3)) > (window.innerHeight + UI.$win.scrollTop()) ) {
|
||||
UI.$win.scrollTop(UI.$win.scrollTop() + Math.ceil(draggingPlaceholder.height()/3));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -125,7 +131,7 @@
|
||||
}
|
||||
|
||||
// inside or outside of sortable?
|
||||
var sortable = closestSortable(e.target),
|
||||
var sortable = closestSortable(currentlyDraggingElement),
|
||||
component = draggingPlaceholder.$sortable,
|
||||
ev = { type: e.type };
|
||||
|
||||
@ -139,27 +145,27 @@
|
||||
init: function() {
|
||||
|
||||
var $this = this,
|
||||
element = this.element[0],
|
||||
children;
|
||||
element = this.element[0];
|
||||
|
||||
touchedlists = [];
|
||||
|
||||
// make sure :empty selector works on empty lists
|
||||
if (this.element.children().length === 0) {
|
||||
this.element.html('');
|
||||
}
|
||||
this.checkEmptyList();
|
||||
|
||||
this.element.data('sortable-group', this.options.group ? this.options.group : UI.Utils.uid('sortable-group'));
|
||||
|
||||
var handleDragStart = delegate(function(e) {
|
||||
|
||||
if (e.data && e.data.sortable) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $target = UI.$(e.target),
|
||||
$link = $target.is('a[href]') ? $target:$target.parents('a[href]');
|
||||
|
||||
|
||||
if ($target.is(':input')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if (!supportsTouch && $link.length) {
|
||||
@ -171,22 +177,13 @@
|
||||
});
|
||||
}
|
||||
|
||||
e.data = e.data || {};
|
||||
|
||||
e.data.sortable = element;
|
||||
|
||||
return $this.dragStart(e, this);
|
||||
});
|
||||
|
||||
var handleDragOver = delegate(function(e) {
|
||||
|
||||
if (!currentlyDraggingElement) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var handleDragEnter = delegate(UI.Utils.debounce(function(e) {
|
||||
return $this.dragEnter(e, this);
|
||||
}), 40);
|
||||
@ -269,6 +266,8 @@
|
||||
if (supportsTouch && document.elementFromPoint) {
|
||||
target = document.elementFromPoint(e.pageX - document.body.scrollLeft, e.pageY - document.body.scrollTop);
|
||||
}
|
||||
|
||||
overElement = UI.$(target);
|
||||
}
|
||||
|
||||
if (UI.$(target).hasClass($this.options.childClass)) {
|
||||
@ -296,8 +295,7 @@
|
||||
dragging = false;
|
||||
|
||||
var $this = this,
|
||||
target = UI.$(e.target),
|
||||
children = $this.element.children();
|
||||
target = UI.$(e.target);
|
||||
|
||||
if (!supportsTouch && e.button==2) {
|
||||
return;
|
||||
@ -313,7 +311,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (target.is('.'+$this.options.noDragClass) || target.closest('.'+$this.options._noDragClass).length) {
|
||||
if (target.is('.'+$this.options.noDragClass) || target.closest('.'+$this.options.noDragClass).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -355,7 +353,12 @@
|
||||
|
||||
draggingPlaceholder.$current = $current;
|
||||
draggingPlaceholder.$sortable = $this;
|
||||
$current.data('sortable-group', $this.options.group);
|
||||
|
||||
$current.data({
|
||||
'start-list': $current.parent(),
|
||||
'start-index': $current.index(),
|
||||
'sortable-group': $this.options.group
|
||||
});
|
||||
|
||||
$this.addDragHandlers();
|
||||
|
||||
@ -369,8 +372,10 @@
|
||||
},
|
||||
|
||||
dragMove: function(e, elem) {
|
||||
var overEl = UI.$(document.elementFromPoint(e.pageX - document.body.scrollLeft, e.pageY - (window.pageYOffset || document.documentElement.scrollTop))),
|
||||
overRoot = overEl.closest('.'+this.options.baseClass),
|
||||
|
||||
overElement = UI.$(document.elementFromPoint(e.pageX - (document.body.scrollLeft || document.scrollLeft || 0), e.pageY - (document.body.scrollTop || document.documentElement.scrollTop || 0)));
|
||||
|
||||
var overRoot = overElement.closest('.'+this.options.baseClass),
|
||||
groupOver = overRoot.data("sortable-group"),
|
||||
$current = UI.$(currentlyDraggingElement),
|
||||
currentRoot = $current.parent(),
|
||||
@ -378,6 +383,7 @@
|
||||
overChild;
|
||||
|
||||
if (overRoot[0] !== currentRoot[0] && groupCurrent !== undefined && groupOver === groupCurrent) {
|
||||
|
||||
overRoot.data('sortable').addDragHandlers();
|
||||
|
||||
touchedlists.push(overRoot);
|
||||
@ -385,19 +391,23 @@
|
||||
|
||||
// swap root
|
||||
if (overRoot.children().length > 0) {
|
||||
overChild = overEl.closest('.'+this.options.childClass);
|
||||
overChild.before($current);
|
||||
} else { // empty list
|
||||
overEl.append($current);
|
||||
}
|
||||
overChild = overElement.closest('.'+this.options.childClass);
|
||||
|
||||
// list empty? remove inner whitespace to make sure :empty selector works
|
||||
if (currentRoot.children().length === 0) {
|
||||
currentRoot.html('');
|
||||
if (overChild.length) {
|
||||
overChild.before($current);
|
||||
} else {
|
||||
overRoot.append($current);
|
||||
}
|
||||
|
||||
} else { // empty list
|
||||
overElement.append($current);
|
||||
}
|
||||
|
||||
UIkit.$doc.trigger('mouseover');
|
||||
}
|
||||
|
||||
this.checkEmptyList();
|
||||
this.checkEmptyList(currentRoot);
|
||||
},
|
||||
|
||||
dragEnter: function(e, elem) {
|
||||
@ -406,15 +416,27 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
// Prevent dragenter on a child from allowing a dragleave on the container
|
||||
var previousCounter = this.dragenterData(elem);
|
||||
|
||||
this.dragenterData(elem, previousCounter + 1);
|
||||
|
||||
// Prevent dragenter on a child from allowing a dragleave on the container
|
||||
if (previousCounter === 0) {
|
||||
|
||||
UI.$(elem).addClass(this.options.overClass);
|
||||
var currentlist = UI.$(elem).parent(),
|
||||
startlist = UI.$(currentlyDraggingElement).data("start-list");
|
||||
|
||||
if (currentlist[0] !== startlist[0]) {
|
||||
|
||||
var groupOver = currentlist.data('sortable-group'),
|
||||
groupCurrent = UI.$(currentlyDraggingElement).data("sortable-group");
|
||||
|
||||
if ((groupOver || groupCurrent) && (groupOver != groupCurrent)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
UI.$(elem).addClass(this.options.overClass);
|
||||
this.moveElementNextTo(currentlyDraggingElement, elem);
|
||||
}
|
||||
|
||||
@ -483,17 +505,20 @@
|
||||
var $current = UI.$(currentlyDraggingElement),
|
||||
oldRoot = draggingPlaceholder.data("origin"),
|
||||
newRoot = $current.closest('.'+this.options.baseClass),
|
||||
triggers = [];
|
||||
triggers = [],
|
||||
el = UI.$(currentlyDraggingElement);
|
||||
|
||||
// events depending on move inside lists or across lists
|
||||
if (oldRoot[0] === newRoot[0] && draggingPlaceholder.data('index') != $current.index() ) {
|
||||
triggers.push({el: this, mode: 'moved'});
|
||||
triggers.push({sortable: this, mode: 'moved'});
|
||||
} else if (oldRoot[0] != newRoot[0]) {
|
||||
triggers.push({el: newRoot, mode: 'added'}, {el: oldRoot, mode: 'removed'});
|
||||
triggers.push({sortable: UI.$(newRoot).data('sortable'), mode: 'added'}, {sortable: UI.$(oldRoot).data('sortable'), mode: 'removed'});
|
||||
}
|
||||
|
||||
triggers.forEach(function (trigger, i) {
|
||||
trigger.el.trigger('change.uk.sortable', [trigger.el, currentlyDraggingElement, trigger.mode]);
|
||||
if (trigger.sortable) {
|
||||
trigger.sortable.element.trigger('change.uk.sortable', [trigger.sortable, el, trigger.mode]);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -587,6 +612,15 @@
|
||||
});
|
||||
|
||||
return data;
|
||||
},
|
||||
|
||||
checkEmptyList: function(list) {
|
||||
|
||||
list = list ? UI.$(list) : this.element;
|
||||
|
||||
if (this.options.emptyClass) {
|
||||
list[!list.children().length ? 'addClass':'removeClass'](this.options.emptyClass);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
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(addon) {
|
||||
|
||||
var component;
|
||||
@ -19,7 +19,8 @@
|
||||
|
||||
var $win = UI.$win,
|
||||
$doc = UI.$doc,
|
||||
sticked = [];
|
||||
sticked = [],
|
||||
direction = 1;
|
||||
|
||||
UI.component('sticky', {
|
||||
|
||||
@ -29,7 +30,9 @@
|
||||
animation : '',
|
||||
clsinit : 'uk-sticky-init',
|
||||
clsactive : 'uk-active',
|
||||
clsinactive : '',
|
||||
getWidthFrom : '',
|
||||
showup : false,
|
||||
boundary : false,
|
||||
media : false,
|
||||
target : false,
|
||||
@ -39,14 +42,19 @@
|
||||
boot: function() {
|
||||
|
||||
// should be more efficient than using $win.scroll(checkscrollposition):
|
||||
UI.$doc.on('scrolling.uk.document', function() { checkscrollposition(); });
|
||||
UI.$doc.on('scrolling.uk.document', function(e, data) {
|
||||
if (!data || !data.dir) return;
|
||||
direction = data.dir.y;
|
||||
checkscrollposition();
|
||||
});
|
||||
|
||||
UI.$win.on('resize orientationchange', UI.Utils.debounce(function() {
|
||||
|
||||
if (!sticked.length) return;
|
||||
|
||||
for (var i = 0; i < sticked.length; i++) {
|
||||
sticked[i].reset(true);
|
||||
sticked[i].self.computeWrapper();
|
||||
//sticked[i].self.computeWrapper();
|
||||
}
|
||||
|
||||
checkscrollposition();
|
||||
@ -73,17 +81,17 @@
|
||||
|
||||
init: function() {
|
||||
|
||||
var wrapper = UI.$('<div class="uk-sticky-placeholder"></div>'), boundary = this.options.boundary, boundtoparent;
|
||||
|
||||
this.wrapper = this.element.css('margin', 0).wrap(wrapper).parent();
|
||||
var boundary = this.options.boundary, boundtoparent;
|
||||
|
||||
this.wrapper = this.element.wrap('<div class="uk-sticky-placeholder"></div>').parent();
|
||||
this.computeWrapper();
|
||||
this.element.css('margin', 0);
|
||||
|
||||
if (boundary) {
|
||||
|
||||
if (boundary === true) {
|
||||
if (boundary === true || boundary[0] === '!') {
|
||||
|
||||
boundary = this.wrapper.parent();
|
||||
boundary = boundary === true ? this.wrapper.parent() : this.wrapper.closest(boundary.substr(1));
|
||||
boundtoparent = true;
|
||||
|
||||
} else if (typeof boundary === "string") {
|
||||
@ -98,21 +106,51 @@
|
||||
currentTop : null,
|
||||
wrapper : this.wrapper,
|
||||
init : false,
|
||||
getWidthFrom : this.options.getWidthFrom || this.wrapper,
|
||||
getWidthFrom : UI.$(this.options.getWidthFrom || this.wrapper),
|
||||
boundary : boundary,
|
||||
boundtoparent : boundtoparent,
|
||||
reset : function(force) {
|
||||
top : 0,
|
||||
calcTop : function() {
|
||||
|
||||
var top = this.options.top;
|
||||
|
||||
// dynamic top parameter
|
||||
if (this.options.top && typeof(this.options.top) == 'string') {
|
||||
|
||||
// e.g. 50vh
|
||||
if (this.options.top.match(/^(-|)(\d+)vh$/)) {
|
||||
top = window.innerHeight * parseInt(this.options.top, 10)/100;
|
||||
// e.g. #elementId, or .class-1,class-2,.class-3 (first found is used)
|
||||
} else {
|
||||
|
||||
var topElement = UI.$(this.options.top).first();
|
||||
|
||||
if (topElement.length && topElement.is(':visible')) {
|
||||
top = -1 * ((topElement.offset().top + topElement.outerHeight()) - this.wrapper.offset().top);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.top = top;
|
||||
},
|
||||
|
||||
reset: function(force) {
|
||||
|
||||
this.calcTop();
|
||||
|
||||
var finalize = function() {
|
||||
this.element.css({"position":"", "top":"", "width":"", "left":"", "margin":"0"});
|
||||
this.element.removeClass([this.options.animation, 'uk-animation-reverse', this.options.clsactive].join(' '));
|
||||
this.element.addClass(this.options.clsinactive);
|
||||
this.element.trigger('inactive.uk.sticky');
|
||||
|
||||
this.currentTop = null;
|
||||
this.animate = false;
|
||||
}.bind(this);
|
||||
|
||||
|
||||
if (!force && this.options.animation && UI.support.animation) {
|
||||
if (!force && this.options.animation && UI.support.animation && !UI.Utils.isInView(this.wrapper)) {
|
||||
|
||||
this.animate = true;
|
||||
|
||||
@ -153,12 +191,28 @@
|
||||
dwh = documentHeight - window.innerHeight,
|
||||
extra = (scrollTop > dwh) ? dwh - scrollTop : 0,
|
||||
elementTop = this.wrapper.offset().top,
|
||||
etse = elementTop - this.options.top - extra;
|
||||
etse = elementTop - this.top - extra,
|
||||
active = (scrollTop >= etse);
|
||||
|
||||
return (scrollTop >= etse);
|
||||
if (active && this.options.showup) {
|
||||
|
||||
// set inactiv if scrolling down
|
||||
if (direction == 1) {
|
||||
active = false;
|
||||
}
|
||||
|
||||
// set inactive when wrapper is still in view
|
||||
if (direction == -1 && !this.element.hasClass(this.options.clsactive) && UI.Utils.isInView(this.wrapper)) {
|
||||
active = false;
|
||||
}
|
||||
}
|
||||
|
||||
return active;
|
||||
}
|
||||
};
|
||||
|
||||
this.sticky.calcTop();
|
||||
|
||||
sticked.push(this.sticky);
|
||||
},
|
||||
|
||||
@ -179,14 +233,20 @@
|
||||
computeWrapper: function() {
|
||||
|
||||
this.wrapper.css({
|
||||
'height' : this.element.css('position') != 'absolute' ? this.element.outerHeight() : '',
|
||||
'float' : this.element.css("float") != "none" ? this.element.css("float") : '',
|
||||
'margin' : this.element.css("margin")
|
||||
'height' : ['absolute','fixed'].indexOf(this.element.css('position')) == -1 ? this.element.outerHeight() : '',
|
||||
'float' : this.element.css('float') != 'none' ? this.element.css('float') : '',
|
||||
'margin' : this.element.css('margin')
|
||||
});
|
||||
|
||||
if (this.element.css('position') == 'fixed') {
|
||||
this.element.css({
|
||||
width: this.sticky.getWidthFrom.length ? this.sticky.getWidthFrom.width() : this.element.width()
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function checkscrollposition() {
|
||||
function checkscrollposition(direction) {
|
||||
|
||||
var stickies = arguments.length ? arguments : sticked;
|
||||
|
||||
@ -215,17 +275,17 @@
|
||||
|
||||
} else {
|
||||
|
||||
if (sticky.options.top < 0) {
|
||||
if (sticky.top < 0) {
|
||||
newTop = 0;
|
||||
} else {
|
||||
stickyHeight = sticky.element.outerHeight();
|
||||
newTop = documentHeight - stickyHeight - sticky.options.top - sticky.options.bottom - scrollTop - extra;
|
||||
newTop = newTop < 0 ? newTop + sticky.options.top : sticky.options.top;
|
||||
newTop = documentHeight - stickyHeight - sticky.top - sticky.options.bottom - scrollTop - extra;
|
||||
newTop = newTop < 0 ? newTop + sticky.top : sticky.top;
|
||||
}
|
||||
|
||||
if (sticky.boundary && sticky.boundary.length) {
|
||||
|
||||
var bTop = sticky.boundary.position().top;
|
||||
var bTop = sticky.boundary.offset().top;
|
||||
|
||||
if (sticky.boundtoparent) {
|
||||
containerBottom = documentHeight - (bTop + sticky.boundary.outerHeight()) + parseInt(sticky.boundary.css('padding-bottom'));
|
||||
@ -233,17 +293,16 @@
|
||||
containerBottom = documentHeight - bTop - parseInt(sticky.boundary.css('margin-top'));
|
||||
}
|
||||
|
||||
newTop = (scrollTop + stickyHeight) > (documentHeight - containerBottom - (sticky.options.top < 0 ? 0 : sticky.options.top)) ? (documentHeight - containerBottom) - (scrollTop + stickyHeight) : newTop;
|
||||
newTop = (scrollTop + stickyHeight) > (documentHeight - containerBottom - (sticky.top < 0 ? 0 : sticky.top)) ? (documentHeight - containerBottom) - (scrollTop + stickyHeight) : newTop;
|
||||
}
|
||||
|
||||
|
||||
if (sticky.currentTop != newTop) {
|
||||
|
||||
sticky.element.css({
|
||||
"position" : "fixed",
|
||||
"top" : newTop,
|
||||
"width" : (typeof sticky.getWidthFrom !== 'undefined') ? UI.$(sticky.getWidthFrom).width() : sticky.element.width(),
|
||||
"left" : sticky.wrapper.offset().left
|
||||
position : "fixed",
|
||||
top : newTop,
|
||||
width : sticky.getWidthFrom.length ? sticky.getWidthFrom.width() : sticky.element.width()
|
||||
});
|
||||
|
||||
if (!sticky.init) {
|
||||
@ -279,10 +338,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
sticky.element.addClass(sticky.options.clsactive);
|
||||
sticky.element.addClass(sticky.options.clsactive).removeClass(sticky.options.clsinactive);
|
||||
sticky.element.trigger('active.uk.sticky');
|
||||
sticky.element.css('margin', '');
|
||||
|
||||
if (sticky.options.animation && sticky.init) {
|
||||
if (sticky.options.animation && sticky.init && !UI.Utils.isInView(sticky.wrapper)) {
|
||||
sticky.element.addClass(sticky.options.animation);
|
||||
}
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-sticky",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(){var i=arguments.length?arguments:o;if(i.length&&!(e.scrollTop()<0))for(var s,a,r,p,h=e.scrollTop(),c=n.height(),l=e.height(),u=c-l,d=h>u?u-h:0,m=0;m<i.length;m++)if(p=i[m],p.element.is(":visible")&&!p.animate){if(p.check()){if(p.options.top<0?s=0:(r=p.element.outerHeight(),s=c-r-p.options.top-p.options.bottom-h-d,s=0>s?s+p.options.top:p.options.top),p.boundary&&p.boundary.length){var f=p.boundary.position().top;a=p.boundtoparent?c-(f+p.boundary.outerHeight())+parseInt(p.boundary.css("padding-bottom")):c-f-parseInt(p.boundary.css("margin-top")),s=h+r>c-a-(p.options.top<0?0:p.options.top)?c-a-(h+r):s}if(p.currentTop!=s){if(p.element.css({position:"fixed",top:s,width:"undefined"!=typeof p.getWidthFrom?t.$(p.getWidthFrom).width():p.element.width(),left:p.wrapper.offset().left}),!p.init&&(p.element.addClass(p.options.clsinit),location.hash&&h>0&&p.options.target)){var g=t.$(location.hash);g.length&&setTimeout(function(t,i){return function(){i.element.width();var e=t.offset(),n=e.top+t.outerHeight(),o=i.element.offset(),s=i.element.outerHeight(),a=o.top+s;o.top<n&&e.top<a&&(h=e.top-s-i.options.target,window.scrollTo(0,h))}}(g,p),0)}p.element.addClass(p.options.clsactive),p.element.css("margin",""),p.options.animation&&p.init&&p.element.addClass(p.options.animation),p.currentTop=s}}else null!==p.currentTop&&p.reset();p.init=!0}}var e=t.$win,n=t.$doc,o=[];return t.component("sticky",{defaults:{top:0,bottom:0,animation:"",clsinit:"uk-sticky-init",clsactive:"uk-active",getWidthFrom:"",boundary:!1,media:!1,target:!1,disabled:!1},boot:function(){t.$doc.on("scrolling.uk.document",function(){i()}),t.$win.on("resize orientationchange",t.Utils.debounce(function(){if(o.length){for(var t=0;t<o.length;t++)o[t].reset(!0),o[t].self.computeWrapper();i()}},100)),t.ready(function(e){setTimeout(function(){t.$("[data-uk-sticky]",e).each(function(){var i=t.$(this);i.data("sticky")||t.sticky(i,t.Utils.options(i.attr("data-uk-sticky")))}),i()},0)})},init:function(){var i,s=t.$('<div class="uk-sticky-placeholder"></div>'),a=this.options.boundary;this.wrapper=this.element.css("margin",0).wrap(s).parent(),this.computeWrapper(),a&&(a===!0?(a=this.wrapper.parent(),i=!0):"string"==typeof a&&(a=t.$(a))),this.sticky={self:this,options:this.options,element:this.element,currentTop:null,wrapper:this.wrapper,init:!1,getWidthFrom:this.options.getWidthFrom||this.wrapper,boundary:a,boundtoparent:i,reset:function(i){var e=function(){this.element.css({position:"",top:"",width:"",left:"",margin:"0"}),this.element.removeClass([this.options.animation,"uk-animation-reverse",this.options.clsactive].join(" ")),this.currentTop=null,this.animate=!1}.bind(this);!i&&this.options.animation&&t.support.animation?(this.animate=!0,this.element.removeClass(this.options.animation).one(t.support.animation.end,function(){e()}).width(),this.element.addClass(this.options.animation+" uk-animation-reverse")):e()},check:function(){if(this.options.disabled)return!1;if(this.options.media)switch(typeof this.options.media){case"number":if(window.innerWidth<this.options.media)return!1;break;case"string":if(window.matchMedia&&!window.matchMedia(this.options.media).matches)return!1}var t=e.scrollTop(),i=n.height(),o=i-window.innerHeight,s=t>o?o-t:0,a=this.wrapper.offset().top,r=a-this.options.top-s;return t>=r}},o.push(this.sticky)},update:function(){i(this.sticky)},enable:function(){this.options.disabled=!1,this.update()},disable:function(t){this.options.disabled=!0,this.sticky.reset(t)},computeWrapper:function(){this.wrapper.css({height:"absolute"!=this.element.css("position")?this.element.outerHeight():"","float":"none"!=this.element.css("float")?this.element.css("float"):"",margin:this.element.css("margin")})}}),t.sticky});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-sticky",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(){var i=arguments.length?arguments:n;if(i.length&&!(e.scrollTop()<0))for(var o,a,r,h,p=e.scrollTop(),c=s.height(),l=e.height(),d=c-l,u=p>d?d-p:0,m=0;m<i.length;m++)if(h=i[m],h.element.is(":visible")&&!h.animate){if(h.check()){if(h.top<0?o=0:(r=h.element.outerHeight(),o=c-r-h.top-h.options.bottom-p-u,o=0>o?o+h.top:h.top),h.boundary&&h.boundary.length){var f=h.boundary.offset().top;a=h.boundtoparent?c-(f+h.boundary.outerHeight())+parseInt(h.boundary.css("padding-bottom")):c-f-parseInt(h.boundary.css("margin-top")),o=p+r>c-a-(h.top<0?0:h.top)?c-a-(p+r):o}if(h.currentTop!=o){if(h.element.css({position:"fixed",top:o,width:h.getWidthFrom.length?h.getWidthFrom.width():h.element.width()}),!h.init&&(h.element.addClass(h.options.clsinit),location.hash&&p>0&&h.options.target)){var g=t.$(location.hash);g.length&&setTimeout(function(t,i){return function(){i.element.width();var e=t.offset(),s=e.top+t.outerHeight(),n=i.element.offset(),o=i.element.outerHeight(),a=n.top+o;n.top<s&&e.top<a&&(p=e.top-o-i.options.target,window.scrollTo(0,p))}}(g,h),0)}h.element.addClass(h.options.clsactive).removeClass(h.options.clsinactive),h.element.trigger("active.uk.sticky"),h.element.css("margin",""),h.options.animation&&h.init&&!t.Utils.isInView(h.wrapper)&&h.element.addClass(h.options.animation),h.currentTop=o}}else null!==h.currentTop&&h.reset();h.init=!0}}var e=t.$win,s=t.$doc,n=[],o=1;return t.component("sticky",{defaults:{top:0,bottom:0,animation:"",clsinit:"uk-sticky-init",clsactive:"uk-active",clsinactive:"",getWidthFrom:"",showup:!1,boundary:!1,media:!1,target:!1,disabled:!1},boot:function(){t.$doc.on("scrolling.uk.document",function(t,e){e&&e.dir&&(o=e.dir.y,i())}),t.$win.on("resize orientationchange",t.Utils.debounce(function(){if(n.length){for(var t=0;t<n.length;t++)n[t].reset(!0);i()}},100)),t.ready(function(e){setTimeout(function(){t.$("[data-uk-sticky]",e).each(function(){var i=t.$(this);i.data("sticky")||t.sticky(i,t.Utils.options(i.attr("data-uk-sticky")))}),i()},0)})},init:function(){var i,a=this.options.boundary;this.wrapper=this.element.wrap('<div class="uk-sticky-placeholder"></div>').parent(),this.computeWrapper(),this.element.css("margin",0),a&&(a===!0||"!"===a[0]?(a=a===!0?this.wrapper.parent():this.wrapper.closest(a.substr(1)),i=!0):"string"==typeof a&&(a=t.$(a))),this.sticky={self:this,options:this.options,element:this.element,currentTop:null,wrapper:this.wrapper,init:!1,getWidthFrom:t.$(this.options.getWidthFrom||this.wrapper),boundary:a,boundtoparent:i,top:0,calcTop:function(){var i=this.options.top;if(this.options.top&&"string"==typeof this.options.top)if(this.options.top.match(/^(-|)(\d+)vh$/))i=window.innerHeight*parseInt(this.options.top,10)/100;else{var e=t.$(this.options.top).first();e.length&&e.is(":visible")&&(i=-1*(e.offset().top+e.outerHeight()-this.wrapper.offset().top))}this.top=i},reset:function(i){this.calcTop();var e=function(){this.element.css({position:"",top:"",width:"",left:"",margin:"0"}),this.element.removeClass([this.options.animation,"uk-animation-reverse",this.options.clsactive].join(" ")),this.element.addClass(this.options.clsinactive),this.element.trigger("inactive.uk.sticky"),this.currentTop=null,this.animate=!1}.bind(this);!i&&this.options.animation&&t.support.animation&&!t.Utils.isInView(this.wrapper)?(this.animate=!0,this.element.removeClass(this.options.animation).one(t.support.animation.end,function(){e()}).width(),this.element.addClass(this.options.animation+" uk-animation-reverse")):e()},check:function(){if(this.options.disabled)return!1;if(this.options.media)switch(typeof this.options.media){case"number":if(window.innerWidth<this.options.media)return!1;break;case"string":if(window.matchMedia&&!window.matchMedia(this.options.media).matches)return!1}var i=e.scrollTop(),n=s.height(),a=n-window.innerHeight,r=i>a?a-i:0,h=this.wrapper.offset().top,p=h-this.top-r,c=i>=p;return c&&this.options.showup&&(1==o&&(c=!1),-1==o&&!this.element.hasClass(this.options.clsactive)&&t.Utils.isInView(this.wrapper)&&(c=!1)),c}},this.sticky.calcTop(),n.push(this.sticky)},update:function(){i(this.sticky)},enable:function(){this.options.disabled=!1,this.update()},disable:function(t){this.options.disabled=!0,this.sticky.reset(t)},computeWrapper:function(){this.wrapper.css({height:-1==["absolute","fixed"].indexOf(this.element.css("position"))?this.element.outerHeight():"","float":"none"!=this.element.css("float")?this.element.css("float"):"",margin:this.element.css("margin")}),"fixed"==this.element.css("position")&&this.element.css({width:this.sticky.getWidthFrom.length?this.sticky.getWidthFrom.width():this.element.width()})}}),t.sticky});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
if (typeof define == "function" && define.amd) {
|
||||
define("uikit-search", ["uikit"], function(){
|
||||
define("uikit-timepicker", ["uikit"], function(){
|
||||
return component || addon(UIkit);
|
||||
});
|
||||
}
|
||||
@ -79,9 +79,9 @@
|
||||
$this.autocomplete.value = Math.random();
|
||||
$this.autocomplete.triggercomplete();
|
||||
|
||||
}).on('blur', function() {
|
||||
}).on('blur', UI.Utils.debounce(function() {
|
||||
$this.checkTime();
|
||||
});
|
||||
}, 100));
|
||||
|
||||
this.element.data("timepicker", this);
|
||||
},
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-search",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";function e(t,e){t=t||0,e=e||24;var i,o,a={"12h":[],"24h":[]};for(i=t,o="";e>i;i++)o=""+i,10>i&&(o="0"+o),a["24h"].push({value:o+":00"}),a["24h"].push({value:o+":30"}),0===i&&(o=12,a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>0&&13>i&&12!==i&&(a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>=12&&(o-=12,0===o&&(o=12),10>o&&(o="0"+String(o)),a["12h"].push({value:o+":00 PM"}),a["12h"].push({value:o+":30 PM"}));return a}t.component("timepicker",{defaults:{format:"24h",delay:0,start:0,end:24},boot:function(){t.$html.on("focus.timepicker.uikit","[data-uk-timepicker]",function(){var e=t.$(this);if(!e.data("timepicker")){var i=t.timepicker(e,t.Utils.options(e.attr("data-uk-timepicker")));setTimeout(function(){i.autocomplete.input.focus()},40)}})},init:function(){var i,o=this,a=e(this.options.start,this.options.end);this.options.minLength=0,this.options.template='<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>',this.options.source=function(t){t(a[o.options.format]||a["12h"])},this.element.is("input")?(this.element.wrap('<div class="uk-autocomplete"></div>'),i=this.element.parent()):i=this.element.addClass("uk-autocomplete"),this.autocomplete=t.autocomplete(i,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-small uk-dropdown-scrollable"),this.autocomplete.on("show.uk.autocomplete",function(){var t=o.autocomplete.dropdown.find('[data-value="'+o.autocomplete.input.val()+'"]');setTimeout(function(){o.autocomplete.pick(t,!0)},10)}),this.autocomplete.input.on("focus",function(){o.autocomplete.value=Math.random(),o.autocomplete.triggercomplete()}).on("blur",function(){o.checkTime()}),this.element.data("timepicker",this)},checkTime:function(){var t,e,i,o,a="AM",u=this.autocomplete.input.val();"12h"==this.options.format?(t=u.split(" "),e=t[0].split(":"),a=t[1]):e=u.split(":"),i=parseInt(e[0],10),o=parseInt(e[1],10),isNaN(i)&&(i=0),isNaN(o)&&(o=0),"12h"==this.options.format?(i>12?i=12:0>i&&(i=12),"am"===a||"a"===a?a="AM":("pm"===a||"p"===a)&&(a="PM"),"AM"!==a&&"PM"!==a&&(a="AM")):i>=24?i=23:0>i&&(i=0),0>o?o=0:o>=60&&(o=0),this.autocomplete.input.val(this.formatTime(i,o,a)).trigger("change")},formatTime:function(t,e,i){return t=10>t?"0"+t:t,e=10>e?"0"+e:e,t+":"+e+("12h"==this.options.format?" "+i:"")}})});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-timepicker",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";function e(t,e){t=t||0,e=e||24;var i,o,a={"12h":[],"24h":[]};for(i=t,o="";e>i;i++)o=""+i,10>i&&(o="0"+o),a["24h"].push({value:o+":00"}),a["24h"].push({value:o+":30"}),0===i&&(o=12,a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>0&&13>i&&12!==i&&(a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>=12&&(o-=12,0===o&&(o=12),10>o&&(o="0"+String(o)),a["12h"].push({value:o+":00 PM"}),a["12h"].push({value:o+":30 PM"}));return a}t.component("timepicker",{defaults:{format:"24h",delay:0,start:0,end:24},boot:function(){t.$html.on("focus.timepicker.uikit","[data-uk-timepicker]",function(){var e=t.$(this);if(!e.data("timepicker")){var i=t.timepicker(e,t.Utils.options(e.attr("data-uk-timepicker")));setTimeout(function(){i.autocomplete.input.focus()},40)}})},init:function(){var i,o=this,a=e(this.options.start,this.options.end);this.options.minLength=0,this.options.template='<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>',this.options.source=function(t){t(a[o.options.format]||a["12h"])},this.element.is("input")?(this.element.wrap('<div class="uk-autocomplete"></div>'),i=this.element.parent()):i=this.element.addClass("uk-autocomplete"),this.autocomplete=t.autocomplete(i,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-small uk-dropdown-scrollable"),this.autocomplete.on("show.uk.autocomplete",function(){var t=o.autocomplete.dropdown.find('[data-value="'+o.autocomplete.input.val()+'"]');setTimeout(function(){o.autocomplete.pick(t,!0)},10)}),this.autocomplete.input.on("focus",function(){o.autocomplete.value=Math.random(),o.autocomplete.triggercomplete()}).on("blur",t.Utils.debounce(function(){o.checkTime()},100)),this.element.data("timepicker",this)},checkTime:function(){var t,e,i,o,a="AM",u=this.autocomplete.input.val();"12h"==this.options.format?(t=u.split(" "),e=t[0].split(":"),a=t[1]):e=u.split(":"),i=parseInt(e[0],10),o=parseInt(e[1],10),isNaN(i)&&(i=0),isNaN(o)&&(o=0),"12h"==this.options.format?(i>12?i=12:0>i&&(i=12),"am"===a||"a"===a?a="AM":("pm"===a||"p"===a)&&(a="PM"),"AM"!==a&&"PM"!==a&&(a="AM")):i>=24?i=23:0>i&&(i=0),0>o?o=0:o>=60&&(o=0),this.autocomplete.input.val(this.formatTime(i,o,a)).trigger("change")},formatTime:function(t,e,i){return t=10>t?"0"+t:t,e=10>e?"0"+e:e,t+":"+e+("12h"==this.options.format?" "+i:"")}})});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
var component;
|
||||
|
||||
@ -28,11 +28,10 @@
|
||||
"delay": 0, // in miliseconds
|
||||
"cls": "",
|
||||
"activeClass": "uk-active",
|
||||
"src": function(ele, title) {
|
||||
"src": function(ele) {
|
||||
var title = ele.attr('title');
|
||||
|
||||
title = ele.attr('title');
|
||||
|
||||
if (title) {
|
||||
if (title !== undefined) {
|
||||
ele.data('cached-title', title).removeAttr('title');
|
||||
}
|
||||
|
||||
@ -49,7 +48,7 @@
|
||||
var ele = UI.$(this);
|
||||
|
||||
if (!ele.data("tooltip")) {
|
||||
var obj = UI.tooltip(ele, UI.Utils.options(ele.attr("data-uk-tooltip")));
|
||||
UI.tooltip(ele, UI.Utils.options(ele.attr("data-uk-tooltip")));
|
||||
ele.trigger("mouseenter");
|
||||
}
|
||||
});
|
||||
@ -77,7 +76,8 @@
|
||||
|
||||
if (tooltipdelay) clearTimeout(tooltipdelay);
|
||||
if (checkdelay) clearTimeout(checkdelay);
|
||||
if (!this.tip.length) return;
|
||||
|
||||
if (typeof(this.tip) === 'string' ? !this.tip.length:true) return;
|
||||
|
||||
$tooltip.stop().css({"top": -2000, "visibility": "hidden"}).removeClass(this.options.activeClass).show();
|
||||
$tooltip.html('<div class="uk-tooltip-inner">' + this.tip + '</div>');
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-tooltip",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";var i,o,e;return t.component("tooltip",{defaults:{offset:5,pos:"top",animation:!1,delay:0,cls:"",activeClass:"uk-active",src:function(t,i){return i=t.attr("title"),i&&t.data("cached-title",i).removeAttr("title"),t.data("cached-title")}},tip:"",boot:function(){t.$html.on("mouseenter.tooltip.uikit focus.tooltip.uikit","[data-uk-tooltip]",function(){var i=t.$(this);if(!i.data("tooltip")){{t.tooltip(i,t.Utils.options(i.attr("data-uk-tooltip")))}i.trigger("mouseenter")}})},init:function(){var o=this;i||(i=t.$('<div class="uk-tooltip"></div>').appendTo("body")),this.on({focus:function(){o.show()},blur:function(){o.hide()},mouseenter:function(){o.show()},mouseleave:function(){o.hide()}})},show:function(){if(this.tip="function"==typeof this.options.src?this.options.src(this.element):this.options.src,o&&clearTimeout(o),e&&clearTimeout(e),this.tip.length){i.stop().css({top:-2e3,visibility:"hidden"}).removeClass(this.options.activeClass).show(),i.html('<div class="uk-tooltip-inner">'+this.tip+"</div>");var s=this,n=t.$.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),l=i[0].offsetWidth,f=i[0].offsetHeight,p="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,a="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,h=a.split("-"),c={display:"none",visibility:"visible",top:n.top+n.height+f,left:n.left};if("fixed"==t.$html.css("position")||"fixed"==t.$body.css("position")){var r=t.$("body").offset(),d=t.$("html").offset(),u={top:d.top+r.top,left:d.left+r.left};n.left-=u.left,n.top-=u.top}"left"!=h[0]&&"right"!=h[0]||"right"!=t.langdirection||(h[0]="left"==h[0]?"right":"left");var m={bottom:{top:n.top+n.height+p,left:n.left+n.width/2-l/2},top:{top:n.top-f-p,left:n.left+n.width/2-l/2},left:{top:n.top+n.height/2-f/2,left:n.left-l-p},right:{top:n.top+n.height/2-f/2,left:n.left+n.width+p}};t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l);var v=this.checkBoundary(c.left,c.top,l,f);if(v){switch(v){case"x":a=2==h.length?h[0]+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left";break;case"y":a=2==h.length?(c.top<0?"bottom":"top")+"-"+h[1]:c.top<0?"bottom":"top";break;case"xy":a=2==h.length?(c.top<0?"bottom":"top")+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left"}h=a.split("-"),t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l)}c.left-=t.$body.position().left,o=setTimeout(function(){i.css(c).attr("class",["uk-tooltip","uk-tooltip-"+a,s.options.cls].join(" ")),s.options.animation?i.css({opacity:0,display:"block"}).addClass(s.options.activeClass).animate({opacity:1},parseInt(s.options.animation,10)||400):i.show().addClass(s.options.activeClass),o=!1,e=setInterval(function(){s.element.is(":visible")||s.hide()},150)},parseInt(this.options.delay,10)||0)}},hide:function(){if(!this.element.is("input")||this.element[0]!==document.activeElement)if(o&&clearTimeout(o),e&&clearTimeout(e),i.stop(),this.options.animation){var t=this;i.fadeOut(parseInt(this.options.animation,10)||400,function(){i.removeClass(t.options.activeClass)})}else i.hide().removeClass(this.options.activeClass)},content:function(){return this.tip},checkBoundary:function(i,o,e,s){var n="";return(0>i||i-t.$win.scrollLeft()+e>window.innerWidth)&&(n+="x"),(0>o||o-t.$win.scrollTop()+s>window.innerHeight)&&(n+="y"),n}}),t.tooltip});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-tooltip",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";var i,o,e;return t.component("tooltip",{defaults:{offset:5,pos:"top",animation:!1,delay:0,cls:"",activeClass:"uk-active",src:function(t){var i=t.attr("title");return void 0!==i&&t.data("cached-title",i).removeAttr("title"),t.data("cached-title")}},tip:"",boot:function(){t.$html.on("mouseenter.tooltip.uikit focus.tooltip.uikit","[data-uk-tooltip]",function(){var i=t.$(this);i.data("tooltip")||(t.tooltip(i,t.Utils.options(i.attr("data-uk-tooltip"))),i.trigger("mouseenter"))})},init:function(){var o=this;i||(i=t.$('<div class="uk-tooltip"></div>').appendTo("body")),this.on({focus:function(){o.show()},blur:function(){o.hide()},mouseenter:function(){o.show()},mouseleave:function(){o.hide()}})},show:function(){if(this.tip="function"==typeof this.options.src?this.options.src(this.element):this.options.src,o&&clearTimeout(o),e&&clearTimeout(e),"string"==typeof this.tip?this.tip.length:0){i.stop().css({top:-2e3,visibility:"hidden"}).removeClass(this.options.activeClass).show(),i.html('<div class="uk-tooltip-inner">'+this.tip+"</div>");var s=this,n=t.$.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),l=i[0].offsetWidth,f=i[0].offsetHeight,p="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,a="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,h=a.split("-"),c={display:"none",visibility:"visible",top:n.top+n.height+f,left:n.left};if("fixed"==t.$html.css("position")||"fixed"==t.$body.css("position")){var r=t.$("body").offset(),d=t.$("html").offset(),u={top:d.top+r.top,left:d.left+r.left};n.left-=u.left,n.top-=u.top}"left"!=h[0]&&"right"!=h[0]||"right"!=t.langdirection||(h[0]="left"==h[0]?"right":"left");var m={bottom:{top:n.top+n.height+p,left:n.left+n.width/2-l/2},top:{top:n.top-f-p,left:n.left+n.width/2-l/2},left:{top:n.top+n.height/2-f/2,left:n.left-l-p},right:{top:n.top+n.height/2-f/2,left:n.left+n.width+p}};t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l);var v=this.checkBoundary(c.left,c.top,l,f);if(v){switch(v){case"x":a=2==h.length?h[0]+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left";break;case"y":a=2==h.length?(c.top<0?"bottom":"top")+"-"+h[1]:c.top<0?"bottom":"top";break;case"xy":a=2==h.length?(c.top<0?"bottom":"top")+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left"}h=a.split("-"),t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l)}c.left-=t.$body.position().left,o=setTimeout(function(){i.css(c).attr("class",["uk-tooltip","uk-tooltip-"+a,s.options.cls].join(" ")),s.options.animation?i.css({opacity:0,display:"block"}).addClass(s.options.activeClass).animate({opacity:1},parseInt(s.options.animation,10)||400):i.show().addClass(s.options.activeClass),o=!1,e=setInterval(function(){s.element.is(":visible")||s.hide()},150)},parseInt(this.options.delay,10)||0)}},hide:function(){if(!this.element.is("input")||this.element[0]!==document.activeElement)if(o&&clearTimeout(o),e&&clearTimeout(e),i.stop(),this.options.animation){var t=this;i.fadeOut(parseInt(this.options.animation,10)||400,function(){i.removeClass(t.options.activeClass)})}else i.hide().removeClass(this.options.activeClass)},content:function(){return this.tip},checkBoundary:function(i,o,e,s){var n="";return(0>i||i-t.$win.scrollLeft()+e>window.innerWidth)&&(n+="x"),(0>o||o-t.$win.scrollTop()+s>window.innerHeight)&&(n+="y"),n}}),t.tooltip});
|
@ -1,4 +1,4 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
(function(addon) {
|
||||
|
||||
var component;
|
||||
@ -188,6 +188,10 @@
|
||||
|
||||
xhr.open(settings.method, settings.action, true);
|
||||
|
||||
if (settings.type=="json") {
|
||||
xhr.setRequestHeader("Accept", "application/json");
|
||||
}
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
|
||||
settings.readystatechange(xhr);
|
||||
|
@ -1,2 +1,2 @@
|
||||
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,l=0;r=t[l];l++)o.append(n.param,r);for(var i in n.params)o.append(i,n.params[i]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var l,i=0;l=o[i];i++)if(!n(a.allow,l.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(l,a),void 0;var f=a.complete;if(a.single){var d=o.length,s=0,p=!0;a.beforeAll(o),a.complete=function(e,t){s+=1,f(e,t),a.filelimit&&s>=a.filelimit&&(p=!1),p&&d>s?r([o[s]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){f(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.dataTransfer&&n.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.dataTransfer.files]),t(n.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),e.support.ajaxupload&&e.$.event.props.push("dataTransfer"),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});
|
||||
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
||||
!function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json"),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var s=a.complete;if(a.single){var d=o.length,f=0,p=!0;a.beforeAll(o),a.complete=function(e,t){f+=1,s(e,t),a.filelimit&&f>=a.filelimit&&(p=!1),p&&d>f?r([o[f]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){s(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.dataTransfer&&n.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.dataTransfer.files]),t(n.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),e.support.ajaxupload&&e.$.event.props.push("dataTransfer"),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});
|
@ -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);
|
File diff suppressed because it is too large
Load Diff
6
admin/custom/uikit/js/uikit.min.js
vendored
6
admin/custom/uikit/js/uikit.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user