fomantic-ui 2.9.1-beta.15 → 2.9.1-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +14 -12
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +15 -12
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +21 -21
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +7 -7
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +8 -8
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +28 -24
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +4 -4
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +26 -24
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +15 -15
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +30 -28
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +6 -6
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +9 -9
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +8 -8
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +4 -4
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +12 -12
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +5 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +9 -9
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +10 -15
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +18 -13
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +4 -4
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +10 -9
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +11 -11
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +28 -25
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +4 -4
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +5 -5
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +50 -50
- package/dist/semantic.js +312 -295
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +14 -11
- package/src/definitions/behaviors/form.js +14 -14
- package/src/definitions/behaviors/state.js +3 -3
- package/src/definitions/behaviors/visibility.js +4 -4
- package/src/definitions/globals/site.js +9 -14
- package/src/definitions/modules/accordion.js +13 -11
- package/src/definitions/modules/calendar.js +20 -20
- package/src/definitions/modules/checkbox.js +6 -6
- package/src/definitions/modules/dimmer.js +7 -7
- package/src/definitions/modules/dropdown.js +27 -23
- package/src/definitions/modules/embed.js +3 -3
- package/src/definitions/modules/flyout.js +25 -23
- package/src/definitions/modules/modal.js +29 -27
- package/src/definitions/modules/nag.js +5 -5
- package/src/definitions/modules/popup.js +8 -8
- package/src/definitions/modules/progress.js +7 -7
- package/src/definitions/modules/rating.js +3 -3
- package/src/definitions/modules/search.js +11 -11
- package/src/definitions/modules/shape.js +4 -4
- package/src/definitions/modules/sidebar.js +8 -8
- package/src/definitions/modules/slider.js +17 -12
- package/src/definitions/modules/sticky.js +9 -8
- package/src/definitions/modules/tab.js +10 -10
- package/src/definitions/modules/toast.js +27 -24
- package/src/definitions/modules/transition.js +3 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.17+3767ba8
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(z,I,V,W){"use strict";z.isFunction=z.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},I=void 0!==I&&I.Math==Math?I:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),z.fn.sidebar=function(k){var w,e=z(this),A=z(I),F=z(V),E=z("body"),O=z("html"),P=z("head"),M=e.selector||"",B=(new Date).getTime(),H=[],R=k,L="string"==typeof R,j=[].slice.call(arguments,1),D=I.requestAnimationFrame||I.mozRequestAnimationFrame||I.webkitRequestAnimationFrame||I.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,r,e,s,a,l=z.isPlainObject(k)?z.extend(!0,{},z.fn.sidebar.settings,k):z.extend({},z.fn.sidebar.settings),i=l.selector,c=l.className,n=l.namespace,t=l.regExp,d=l.error,u="."+n,f="module-"+n,h=z(this),b=[I,V].indexOf(l.context)<0?F.find(l.context):E,g=b[0]===E[0],m=h.children(i.sidebar),p=(b.children(i.fixed),b.children(i.pusher)),v=this,y=h.data(f),x="",S="",C=!1,T={initialize:function(){T.debug("Initializing sidebar",k),T.create.id(),a=T.get.transitionEvent(),l.delaySetup?D(T.setup.layout):T.setup.layout(),D(function(){T.setup.cache()}),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),y=T,h.data(f,T)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),r="."+e,T.verbose("Creating unique id for element",e)}},destroy:function(){T.verbose("Destroying previous module for",h),h.off(u).removeData(f),T.is.ios()&&T.remove.ios(),b.off(r),A.off(r),F.off(r)},event:{clickaway:function(e){var i;l.closable&&(i=0<p.find(e.target).length||p.is(e.target),e=b.is(e.target),i&&(T.verbose("User clicked on dimmed page"),T.hide()),e&&(T.verbose("User clicked on dimmable context (scaled out page)"),T.hide()))},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===z(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){T.verbose("Adding clickaway events to context",b),b.on("click"+r,T.event.clickaway).on("touchend"+r,T.event.clickaway)},scrollLock:function(){l.scrollLock&&(T.debug("Disabling page scroll"),(C=T.has.scrollbar())&&(T.save.bodyMargin(),T.set.bodyMargin()),b.addClass(c.locked)),T.verbose("Adding events to contain sidebar scroll"),F.on("touchmove"+r,T.event.touch),h.on("scroll"+u,T.event.containScroll)}},unbind:{clickaway:function(){T.verbose("Removing clickaway events from context",b),b.off(r)},scrollLock:function(){T.verbose("Removing scroll lock from page"),C&&T.restore.bodyMargin(),b.removeClass(c.locked),F.off(r),h.off("scroll"+u)}},add:{inlineCSS:function(){var e=T.cache.width||h.outerWidth(),i=T.cache.height||h.outerHeight(),n=T.is.rtl(),t=T.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(T.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="<style>","left"===t||"right"===t?(T.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { -webkit-transform: translate3d("+i[t]+"px, 0, 0); transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!=t||(n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+i[t]+"px, 0); transform: translate3d(0, "+i[t]+"px, 0); }"),T.is.ie()&&("left"===t||"right"===t?(T.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { -webkit-transform: translate3d("+i[t]+"px, 0, 0); transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!=t||(n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { -webkit-transform: translate3d(0, "+i[t]+"px, 0); transform: translate3d(0, "+i[t]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=z(n+="</style>").appendTo(P),T.debug("Adding sizing css to head",o)}},refresh:function(){T.verbose("Refreshing selector cache"),b=[I,V].indexOf(l.context)<0?F.find(l.context):E,T.refreshSidebars(),p=b.children(i.pusher),b.children(i.fixed),T.clear.cache()},refreshSidebars:function(){T.verbose("Refreshing other sidebars"),m=b.children(i.sidebar)},repaint:function(){T.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){T.cache={width:h.outerWidth(),height:h.outerHeight()}},layout:function(){0===b.children(i.pusher).length&&(T.debug("Adding wrapper element for sidebar"),T.error(d.pusher),p=z('<div class="pusher" />'),b.children().not(i.omitted).not(m).wrapAll(p),T.refresh()),0!==h.nextAll(i.pusher).length&&h.nextAll(i.pusher)[0]===p[0]||(T.debug("Moved sidebar to correct parent element"),T.error(d.movedSidebar,v),h.detach().prependTo(b),T.refresh()),T.clear.cache(),T.set.pushable(),T.set.direction()}},attachEvents:function(e,i){var n=z(e);i=z.isFunction(T[i])?T[i]:T.toggle,0<n.length?(T.debug("Attaching sidebar events to element",e,i),n.on("click"+u,i)):T.error(d.notFound,e)},can:{leftBodyScrollbar:function(){return T.cache.leftBodyScrollbar===W&&(T.cache.leftBodyScrollbar=T.is.rtl()&&(T.is.iframe&&!T.is.firefox()||T.is.safari()||T.is.edge()||T.is.ie())),T.cache.leftBodyScrollbar}},save:{bodyMargin:function(){x=b.css((g?"margin-":"padding-")+(T.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(x.replace(/[^\d.]/g,"")),i=g?I.innerWidth-V.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;S=e+i}},show:function(e){if(e=z.isFunction(e)?e:function(){},T.is.hidden())if(!1===l.onShow.call(v))T.verbose("Show callback returned false cancelling show");else{if(l.overlay&&(T.error(d.overlay),l.transition="overlay"),T.refresh(),T.othersActive())if(T.debug("Other sidebars currently visible"),l.exclusive){if("overlay"!=l.transition)return void T.hideOthers(T.show);T.hideOthers()}else l.transition="overlay";T.set.dimmerStyles(),T.pushPage(function(){e.call(v),l.onVisible.call(v)}),l.onChange.call(v)}else T.debug("Sidebar is already visible")},hide:function(e){e=z.isFunction(e)?e:function(){},(T.is.visible()||T.is.animating())&&!1!==l.onHide.call(v)&&(T.debug("Hiding sidebar",e),T.refreshSidebars(),T.pullPage(function(){e.call(v),l.onHidden.call(v)}),l.onChange.call(v))},othersAnimating:function(){return 0<m.not(h).filter("."+c.animating).length},othersVisible:function(){return 0<m.not(h).filter("."+c.visible).length},othersActive:function(){return T.othersVisible()||T.othersAnimating()},hideOthers:function(e){var i=m.not(h).filter("."+c.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){++t==n&&e()})},toggle:function(){T.verbose("Determining toggled direction"),T.is.hidden()?T.show():T.hide()},pushPage:function(i){var e,n,t=T.get.transition(),o="overlay"===t||T.othersActive()?h:p;i=z.isFunction(i)?i:function(){},l.returnScroll&&(s=(g?A:b).scrollTop()),"scale down"===l.transition&&T.scrollToTop(),T.bind.scrollLock(),T.set.transition(t),T.repaint(),t=function(){T.bind.clickaway(),T.add.inlineCSS(),T.set.animating(),T.set.visible()},e=function(){T.set.dimmed()},n=function(e){e.target==o[0]&&(o.off(a+r,n),T.remove.animating(),i.call(v))},o.off(a+r),o.on(a+r,n),D(t),l.dimPage&&!T.othersVisible()&&D(e)},pullPage:function(i){var e,n,t=T.get.transition(),o="overlay"==t||T.othersActive()?h:p;i=z.isFunction(i)?i:function(){},T.verbose("Removing context push state",T.get.direction()),T.unbind.clickaway(),T.unbind.scrollLock(),e=function(){T.set.transition(t),T.set.animating(),l.dimPage&&!T.othersVisible()&&T.set.closing(),T.remove.visible()},n=function(e){e.target==o[0]&&(o.off(a+r,n),T.remove.animating(),T.remove.closing(),T.remove.transition(),T.remove.inlineCSS(),"scale down"!==t&&!l.returnScroll||T.scrollBack(),l.dimPage&&!T.othersVisible()&&p.removeClass(c.dimmed),i.call(v))},o.off(a+r),o.on(a+r,n),D(e)},scrollToTop:function(){T.verbose("Scrolling to top of page to avoid animation issues"),h.scrollTop(0),(g?A:b)[0].scrollTo(0,0)},scrollBack:function(){T.verbose("Scrolling back to original page position"),(g?A:b)[0].scrollTo(0,s)},clear:{cache:function(){T.verbose("Clearing cached dimensions"),T.cache={}}},set:{bodyMargin:function(){var n=T.can.leftBodyScrollbar()?"left":"right";b.css((g?"margin-":"padding-")+n,S+"px"),b.find(i.bodyFixed.replace("right",n)).each(function(){var e=z(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+S+"px)")})},dimmerStyles:function(){l.blurring?p.addClass(c.blurring):p.removeClass(c.blurring)},ios:function(){O.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){p.addClass(c.dimmed)},active:function(){h.addClass(c.active)},animating:function(){h.addClass(c.animating)},closing:function(){p.addClass(c.closing)},transition:function(e){e=e||T.get.transition(),h.addClass(e)},direction:function(e){e=e||T.get.direction(),h.addClass(c[e])},visible:function(){h.addClass(c.visible)},overlay:function(){h.addClass(c.overlay)}},remove:{inlineCSS:function(){T.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){O.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){h.removeClass(c.active)},animating:function(){h.removeClass(c.animating)},closing:function(){p.removeClass(c.closing)},transition:function(e){e=e||T.get.transition(),h.removeClass(e)},direction:function(e){e=e||T.get.direction(),h.removeClass(c[e])},visible:function(){h.removeClass(c.visible)},overlay:function(){h.removeClass(c.overlay)}},restore:{bodyMargin:function(){var n=T.can.leftBodyScrollbar()?"left":"right";b.css((g?"margin-":"padding-")+n,x),b.find(i.bodyFixed.replace("right",n)).each(function(){var e=z(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return h.hasClass(c.top)?c.top:h.hasClass(c.right)?c.right:h.hasClass(c.bottom)?c.bottom:c.left},transition:function(){var e=T.get.direction(),e=T.is.mobile()?"auto"==l.mobileTransition?l.defaultTransition.mobile[e]:l.mobileTransition:"auto"==l.transition?l.defaultTransition.computer[e]:l.transition;return T.verbose("Determined transition",e),e},transitionEvent:function(){var e,i=V.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(i.style[e]!==W)return n[e]}},has:{scrollbar:function(){return g||"hidden"!==b.css("overflow-y")}},is:{safari:function(){return T.cache.isSafari===W&&(T.cache.isSafari=/constructor/i.test(I.HTMLElement)||!!I.ApplePaySession),T.cache.isSafari},edge:function(){return T.cache.isEdge===W&&(T.cache.isEdge=!!I.setImmediate&&!T.is.ie()),T.cache.isEdge},firefox:function(){return T.cache.isFirefox===W&&(T.cache.isFirefox=!!I.InstallTrigger),T.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,i;return T.cache.isIE===W&&(e=!I.ActiveXObject&&"ActiveXObject"in I,i="ActiveXObject"in I,T.cache.isIE=e||i),T.cache.isIE},ios:function(){var e=navigator.userAgent,i=e.match(t.ios),n=e.match(t.mobileChrome);return!(!i||n)&&(T.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(t.mobile)?(T.verbose("Browser was found to be mobile",e),!0):(T.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!T.is.visible()},visible:function(){return h.hasClass(c.visible)},open:function(){return T.is.visible()},closed:function(){return T.is.hidden()},vertical:function(){return h.hasClass(c.top)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return T.cache.isRTL===W&&(T.cache.isRTL="rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===E.attr("dir")||"rtl"===E.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),T.cache.isRTL}},setting:function(e,i){if(T.debug("Changing setting",e,i),z.isPlainObject(e))z.extend(!0,l,e);else{if(i===W)return l[e];z.isPlainObject(l[e])?z.extend(!0,l[e],i):l[e]=i}},internal:function(e,i){if(z.isPlainObject(e))z.extend(!0,T,e);else{if(i===W)return T[e];T[e]=i}},debug:function(){!l.silent&&l.debug&&(l.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,l.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),T.verbose.apply(console,arguments)))},error:function(){l.silent||(T.error=Function.prototype.bind.call(console.error,console,l.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var i,n;l.performance&&(n=(i=(new Date).getTime())-(B||i),B=i,H.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=l.name+":",n=0;B=!1,clearTimeout(T.performance.timer),z.each(H,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",M&&(e+=" '"+M+"'"),(console.group!==W||console.table!==W)&&0<H.length&&(console.groupCollapsed(e),console.table?console.table(H):z.each(H,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),H=[]}},invoke:function(t,e,i){var o,r,n,s=y;return e=e||j,i=i||v,"string"==typeof t&&s!==W&&(t=t.split(/[\. ]/),o=t.length-1,z.each(t,function(e,i){var n=e!=o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(z.isPlainObject(s[n])&&e!=o)s=s[n];else{if(s[n]!==W)return r=s[n],!1;{if(!z.isPlainObject(s[i])||e==o)return s[i]!==W?r=s[i]:T.error(d.method,t),!1;s=s[i]}}})),z.isFunction(r)?n=r.apply(i,e):r!==W&&(n=r),Array.isArray(w)?w.push(n):w!==W?w=[w,n]:n!==W&&(w=n),r}};L?(y===W&&T.initialize(),T.invoke(R)):(y!==W&&T.invoke("destroy"),T.initialize())}),w!==W?w:this},z.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
11
|
+
!function(z,I,V,W){"use strict";function q(e){return"function"==typeof e&&"number"!=typeof e.nodeType}I=void 0!==I&&I.Math==Math?I:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),z.fn.sidebar=function(k){var w,e=z(this),A=z(I),E=z(V),F=z("body"),O=z("html"),P=z("head"),M=e.selector||"",B=(new Date).getTime(),H=[],R=k,L="string"==typeof R,j=[].slice.call(arguments,1),D=I.requestAnimationFrame||I.mozRequestAnimationFrame||I.webkitRequestAnimationFrame||I.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,r,e,s,a,l=z.isPlainObject(k)?z.extend(!0,{},z.fn.sidebar.settings,k):z.extend({},z.fn.sidebar.settings),i=l.selector,c=l.className,n=l.namespace,t=l.regExp,d=l.error,u="."+n,f="module-"+n,h=z(this),b=[I,V].indexOf(l.context)<0?E.find(l.context):F,g=b[0]===F[0],m=h.children(i.sidebar),p=(b.children(i.fixed),b.children(i.pusher)),v=this,y=h.data(f),x="",S="",C=!1,T={initialize:function(){T.debug("Initializing sidebar",k),T.create.id(),a=T.get.transitionEvent(),l.delaySetup?D(T.setup.layout):T.setup.layout(),D(function(){T.setup.cache()}),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),y=T,h.data(f,T)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),r="."+e,T.verbose("Creating unique id for element",e)}},destroy:function(){T.verbose("Destroying previous module for",h),h.off(u).removeData(f),T.is.ios()&&T.remove.ios(),b.off(r),A.off(r),E.off(r)},event:{clickaway:function(e){var i;l.closable&&(i=0<p.find(e.target).length||p.is(e.target),e=b.is(e.target),i&&(T.verbose("User clicked on dimmed page"),T.hide()),e&&(T.verbose("User clicked on dimmable context (scaled out page)"),T.hide()))},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===z(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){T.verbose("Adding clickaway events to context",b),b.on("click"+r,T.event.clickaway).on("touchend"+r,T.event.clickaway)},scrollLock:function(){l.scrollLock&&(T.debug("Disabling page scroll"),(C=T.has.scrollbar())&&(T.save.bodyMargin(),T.set.bodyMargin()),b.addClass(c.locked)),T.verbose("Adding events to contain sidebar scroll"),E.on("touchmove"+r,T.event.touch),h.on("scroll"+u,T.event.containScroll)}},unbind:{clickaway:function(){T.verbose("Removing clickaway events from context",b),b.off(r)},scrollLock:function(){T.verbose("Removing scroll lock from page"),C&&T.restore.bodyMargin(),b.removeClass(c.locked),E.off(r),h.off("scroll"+u)}},add:{inlineCSS:function(){var e=T.cache.width||h.outerWidth(),i=T.cache.height||h.outerHeight(),n=T.is.rtl(),t=T.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(T.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="<style>","left"===t||"right"===t?(T.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { -webkit-transform: translate3d("+i[t]+"px, 0, 0); transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!=t||(n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+i[t]+"px, 0); transform: translate3d(0, "+i[t]+"px, 0); }"),T.is.ie()&&("left"===t||"right"===t?(T.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { -webkit-transform: translate3d("+i[t]+"px, 0, 0); transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!=t||(n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { -webkit-transform: translate3d(0, "+i[t]+"px, 0); transform: translate3d(0, "+i[t]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=z(n+="</style>").appendTo(P),T.debug("Adding sizing css to head",o)}},refresh:function(){T.verbose("Refreshing selector cache"),b=[I,V].indexOf(l.context)<0?E.find(l.context):F,T.refreshSidebars(),p=b.children(i.pusher),b.children(i.fixed),T.clear.cache()},refreshSidebars:function(){T.verbose("Refreshing other sidebars"),m=b.children(i.sidebar)},repaint:function(){T.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){T.cache={width:h.outerWidth(),height:h.outerHeight()}},layout:function(){0===b.children(i.pusher).length&&(T.debug("Adding wrapper element for sidebar"),T.error(d.pusher),p=z('<div class="pusher" />'),b.children().not(i.omitted).not(m).wrapAll(p),T.refresh()),0!==h.nextAll(i.pusher).length&&h.nextAll(i.pusher)[0]===p[0]||(T.debug("Moved sidebar to correct parent element"),T.error(d.movedSidebar,v),h.detach().prependTo(b),T.refresh()),T.clear.cache(),T.set.pushable(),T.set.direction()}},attachEvents:function(e,i){var n=z(e);i=q(T[i])?T[i]:T.toggle,0<n.length?(T.debug("Attaching sidebar events to element",e,i),n.on("click"+u,i)):T.error(d.notFound,e)},can:{leftBodyScrollbar:function(){return T.cache.leftBodyScrollbar===W&&(T.cache.leftBodyScrollbar=T.is.rtl()&&(T.is.iframe&&!T.is.firefox()||T.is.safari()||T.is.edge()||T.is.ie())),T.cache.leftBodyScrollbar}},save:{bodyMargin:function(){x=b.css((g?"margin-":"padding-")+(T.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(x.replace(/[^\d.]/g,"")),i=g?I.innerWidth-V.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;S=e+i}},show:function(e){if(e=q(e)?e:function(){},T.is.hidden())if(!1===l.onShow.call(v))T.verbose("Show callback returned false cancelling show");else{if(l.overlay&&(T.error(d.overlay),l.transition="overlay"),T.refresh(),T.othersActive())if(T.debug("Other sidebars currently visible"),l.exclusive){if("overlay"!=l.transition)return void T.hideOthers(T.show);T.hideOthers()}else l.transition="overlay";T.set.dimmerStyles(),T.pushPage(function(){e.call(v),l.onVisible.call(v)}),l.onChange.call(v)}else T.debug("Sidebar is already visible")},hide:function(e){e=q(e)?e:function(){},(T.is.visible()||T.is.animating())&&!1!==l.onHide.call(v)&&(T.debug("Hiding sidebar",e),T.refreshSidebars(),T.pullPage(function(){e.call(v),l.onHidden.call(v)}),l.onChange.call(v))},othersAnimating:function(){return 0<m.not(h).filter("."+c.animating).length},othersVisible:function(){return 0<m.not(h).filter("."+c.visible).length},othersActive:function(){return T.othersVisible()||T.othersAnimating()},hideOthers:function(e){var i=m.not(h).filter("."+c.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){++t==n&&e()})},toggle:function(){T.verbose("Determining toggled direction"),T.is.hidden()?T.show():T.hide()},pushPage:function(i){var e,n,t=T.get.transition(),o="overlay"===t||T.othersActive()?h:p;i=q(i)?i:function(){},l.returnScroll&&(s=(g?A:b).scrollTop()),"scale down"===l.transition&&T.scrollToTop(),T.bind.scrollLock(),T.set.transition(t),T.repaint(),t=function(){T.bind.clickaway(),T.add.inlineCSS(),T.set.animating(),T.set.visible()},e=function(){T.set.dimmed()},n=function(e){e.target==o[0]&&(o.off(a+r,n),T.remove.animating(),i.call(v))},o.off(a+r),o.on(a+r,n),D(t),l.dimPage&&!T.othersVisible()&&D(e)},pullPage:function(i){var e,n,t=T.get.transition(),o="overlay"==t||T.othersActive()?h:p;i=q(i)?i:function(){},T.verbose("Removing context push state",T.get.direction()),T.unbind.clickaway(),T.unbind.scrollLock(),e=function(){T.set.transition(t),T.set.animating(),l.dimPage&&!T.othersVisible()&&T.set.closing(),T.remove.visible()},n=function(e){e.target==o[0]&&(o.off(a+r,n),T.remove.animating(),T.remove.closing(),T.remove.transition(),T.remove.inlineCSS(),"scale down"!==t&&!l.returnScroll||T.scrollBack(),l.dimPage&&!T.othersVisible()&&p.removeClass(c.dimmed),i.call(v))},o.off(a+r),o.on(a+r,n),D(e)},scrollToTop:function(){T.verbose("Scrolling to top of page to avoid animation issues"),h.scrollTop(0),(g?A:b)[0].scrollTo(0,0)},scrollBack:function(){T.verbose("Scrolling back to original page position"),(g?A:b)[0].scrollTo(0,s)},clear:{cache:function(){T.verbose("Clearing cached dimensions"),T.cache={}}},set:{bodyMargin:function(){var n=T.can.leftBodyScrollbar()?"left":"right";b.css((g?"margin-":"padding-")+n,S+"px"),b.find(i.bodyFixed.replace("right",n)).each(function(){var e=z(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+S+"px)")})},dimmerStyles:function(){l.blurring?p.addClass(c.blurring):p.removeClass(c.blurring)},ios:function(){O.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){p.addClass(c.dimmed)},active:function(){h.addClass(c.active)},animating:function(){h.addClass(c.animating)},closing:function(){p.addClass(c.closing)},transition:function(e){e=e||T.get.transition(),h.addClass(e)},direction:function(e){e=e||T.get.direction(),h.addClass(c[e])},visible:function(){h.addClass(c.visible)},overlay:function(){h.addClass(c.overlay)}},remove:{inlineCSS:function(){T.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){O.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){h.removeClass(c.active)},animating:function(){h.removeClass(c.animating)},closing:function(){p.removeClass(c.closing)},transition:function(e){e=e||T.get.transition(),h.removeClass(e)},direction:function(e){e=e||T.get.direction(),h.removeClass(c[e])},visible:function(){h.removeClass(c.visible)},overlay:function(){h.removeClass(c.overlay)}},restore:{bodyMargin:function(){var n=T.can.leftBodyScrollbar()?"left":"right";b.css((g?"margin-":"padding-")+n,x),b.find(i.bodyFixed.replace("right",n)).each(function(){var e=z(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return h.hasClass(c.top)?c.top:h.hasClass(c.right)?c.right:h.hasClass(c.bottom)?c.bottom:c.left},transition:function(){var e=T.get.direction(),e=T.is.mobile()?"auto"==l.mobileTransition?l.defaultTransition.mobile[e]:l.mobileTransition:"auto"==l.transition?l.defaultTransition.computer[e]:l.transition;return T.verbose("Determined transition",e),e},transitionEvent:function(){var e,i=V.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(i.style[e]!==W)return n[e]}},has:{scrollbar:function(){return g||"hidden"!==b.css("overflow-y")}},is:{safari:function(){return T.cache.isSafari===W&&(T.cache.isSafari=/constructor/i.test(I.HTMLElement)||!!I.ApplePaySession),T.cache.isSafari},edge:function(){return T.cache.isEdge===W&&(T.cache.isEdge=!!I.setImmediate&&!T.is.ie()),T.cache.isEdge},firefox:function(){return T.cache.isFirefox===W&&(T.cache.isFirefox=!!I.InstallTrigger),T.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,i;return T.cache.isIE===W&&(e=!I.ActiveXObject&&"ActiveXObject"in I,i="ActiveXObject"in I,T.cache.isIE=e||i),T.cache.isIE},ios:function(){var e=navigator.userAgent,i=e.match(t.ios),n=e.match(t.mobileChrome);return!(!i||n)&&(T.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(t.mobile)?(T.verbose("Browser was found to be mobile",e),!0):(T.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!T.is.visible()},visible:function(){return h.hasClass(c.visible)},open:function(){return T.is.visible()},closed:function(){return T.is.hidden()},vertical:function(){return h.hasClass(c.top)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return T.cache.isRTL===W&&(T.cache.isRTL="rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===F.attr("dir")||"rtl"===F.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),T.cache.isRTL}},setting:function(e,i){if(T.debug("Changing setting",e,i),z.isPlainObject(e))z.extend(!0,l,e);else{if(i===W)return l[e];z.isPlainObject(l[e])?z.extend(!0,l[e],i):l[e]=i}},internal:function(e,i){if(z.isPlainObject(e))z.extend(!0,T,e);else{if(i===W)return T[e];T[e]=i}},debug:function(){!l.silent&&l.debug&&(l.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,l.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),T.verbose.apply(console,arguments)))},error:function(){l.silent||(T.error=Function.prototype.bind.call(console.error,console,l.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var i,n;l.performance&&(n=(i=(new Date).getTime())-(B||i),B=i,H.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=l.name+":",n=0;B=!1,clearTimeout(T.performance.timer),z.each(H,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",M&&(e+=" '"+M+"'"),(console.group!==W||console.table!==W)&&0<H.length&&(console.groupCollapsed(e),console.table?console.table(H):z.each(H,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),H=[]}},invoke:function(t,e,i){var o,r,n,s=y;return e=e||j,i=i||v,"string"==typeof t&&s!==W&&(t=t.split(/[\. ]/),o=t.length-1,z.each(t,function(e,i){var n=e!=o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(z.isPlainObject(s[n])&&e!=o)s=s[n];else{if(s[n]!==W)return r=s[n],!1;{if(!z.isPlainObject(s[i])||e==o)return s[i]!==W?r=s[i]:T.error(d.method,t),!1;s=s[i]}}})),q(r)?n=r.apply(i,e):r!==W&&(n=r),Array.isArray(w)?w.push(n):w!==W?w=[w,n]:n!==W&&(w=n),r}};L?(y===W&&T.initialize(),T.invoke(R)):(y!==W&&T.invoke("destroy"),T.initialize())}),w!==W?w:this},z.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
package/dist/components/site.css
CHANGED
package/dist/components/site.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.17+3767ba8 - Site
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -10,9 +10,9 @@
|
|
10
10
|
|
11
11
|
;(function ($, window, document, undefined) {
|
12
12
|
|
13
|
-
|
13
|
+
function isFunction(obj) {
|
14
14
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
15
|
-
}
|
15
|
+
}
|
16
16
|
|
17
17
|
$.site = $.fn.site = function(parameters) {
|
18
18
|
var
|
@@ -388,7 +388,7 @@ $.site = $.fn.site = function(parameters) {
|
|
388
388
|
}
|
389
389
|
});
|
390
390
|
}
|
391
|
-
if (
|
391
|
+
if ( isFunction( found ) ) {
|
392
392
|
response = found.apply(context, passedArguments);
|
393
393
|
}
|
394
394
|
else if(found !== undefined) {
|
@@ -476,17 +476,12 @@ $.site.settings = {
|
|
476
476
|
};
|
477
477
|
|
478
478
|
// allows for selection of elements with data attributes
|
479
|
-
$.extend($.expr
|
480
|
-
data:
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
}
|
485
|
-
})
|
486
|
-
: function(elem, i, match) {
|
487
|
-
// support: jQuery < 1.8
|
488
|
-
return !!$.data(elem, match[ 3 ]);
|
489
|
-
}
|
479
|
+
$.extend($.expr.pseudos, {
|
480
|
+
data: $.expr.createPseudo(function(dataName) {
|
481
|
+
return function(elem) {
|
482
|
+
return !!$.data(elem, dataName);
|
483
|
+
};
|
484
|
+
})
|
490
485
|
});
|
491
486
|
|
492
487
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.17+3767ba8
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(b,p,v,h){b.
|
11
|
+
!function(b,p,v,h){b.site=b.fn.site=function(e){var c,i=(new Date).getTime(),t=[],n=e,o="string"==typeof n,l=[].slice.call(arguments,1),r=b.isPlainObject(e)?b.extend(!0,{},b.site.settings,e):b.extend({},b.site.settings),s=r.namespace,u=r.error,a="module-"+s,m=b(v),d=this,g=m.data(a),f={initialize:function(){f.instantiate()},instantiate:function(){f.verbose("Storing instance of site",f),g=f,m.data(a,f)},normalize:function(){f.fix.console(),f.fix.requestAnimationFrame()},fix:{console:function(){f.debug("Normalizing window.console"),console!==h&&console.log!==h||(f.verbose("Console not available, normalizing events"),f.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(f.verbose("Console group not available, normalizing events"),p.console.group=function(){},p.console.groupEnd=function(){},p.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(f.verbose("Mark timeline not available, normalizing events"),p.console.markTimeline=function(){})},consoleClear:function(){f.debug("Disabling programmatic console clearing"),p.console.clear=function(){}},requestAnimationFrame:function(){f.debug("Normalizing requestAnimationFrame"),p.requestAnimationFrame===h&&(f.debug("RequestAnimationFrame not available, normalizing event"),p.requestAnimationFrame=p.requestAnimationFrame||p.mozRequestAnimationFrame||p.webkitRequestAnimationFrame||p.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return b.fn[e]!==h&&b.fn[e].settings!==h},enabled:{modules:function(e){var o=[];return e=e||r.modules,b.each(e,function(e,n){f.moduleExists(n)&&o.push(n)}),o}},disabled:{modules:function(e){var o=[];return e=e||r.modules,b.each(e,function(e,n){f.moduleExists(n)||o.push(n)}),o}},change:{setting:function(i,t,e,s){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,s=s===h||s,b.each(e,function(e,n){var o=!f.moduleExists(n)||(b.fn[n].settings.namespace||!1);f.moduleExists(n)&&(f.verbose("Changing default setting",i,t,n),b.fn[n].settings[i]=t,s&&o&&0<(o=b(":data(module-"+o+")")).length&&(f.verbose("Modifying existing settings",o),o[n]("setting",i,t)))})},settings:function(i,e,t){e="string"==typeof e?[e]:e||r.modules,t=t===h||t,b.each(e,function(e,n){var o;f.moduleExists(n)&&(f.verbose("Changing default setting",i,n),b.extend(!0,b.fn[n].settings,i),t&&s&&0<(o=b(":data(module-"+s+")")).length&&(f.verbose("Modifying existing settings",o),o[n]("setting",i)))})}},enable:{console:function(){f.console(!0)},debug:function(e,n){e=e||r.modules,f.debug("Enabling debug for modules",e),f.change.setting("debug",!0,e,n)},verbose:function(e,n){e=e||r.modules,f.debug("Enabling verbose debug for modules",e),f.change.setting("verbose",!0,e,n)}},disable:{console:function(){f.console(!1)},debug:function(e,n){e=e||r.modules,f.debug("Disabling debug for modules",e),f.change.setting("debug",!1,e,n)},verbose:function(e,n){e=e||r.modules,f.debug("Disabling verbose debug for modules",e),f.change.setting("verbose",!1,e,n)}},console:function(e){e?g.cache.console===h?f.error(u.console):(f.debug("Restoring console function"),p.console=g.cache.console):(f.debug("Disabling console function"),g.cache.console=p.console,p.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){f.verbose("Destroying previous site for",m),m.removeData(a)},cache:{},setting:function(e,n){if(b.isPlainObject(e))b.extend(!0,r,e);else{if(n===h)return r[e];r[e]=n}},internal:function(e,n){if(b.isPlainObject(e))b.extend(!0,f,e);else{if(n===h)return f[e];f[e]=n}},debug:function(){r.debug&&(r.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,r.name+":"),f.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,r.name+":"),f.error.apply(console,arguments)},performance:{log:function(e){var n,o;r.performance&&(o=(n=(new Date).getTime())-(i||n),i=n,t.push({Element:d,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":o})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=r.name+":",o=0;i=!1,clearTimeout(f.performance.timer),b.each(t,function(e,n){o+=n["Execution Time"]}),e+=" "+o+"ms",(console.group!==h||console.table!==h)&&0<t.length&&(console.groupCollapsed(e),console.table?console.table(t):b.each(t,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),t=[]}},invoke:function(i,e,n){var t,s,o,r,a=g;return e=e||l,n=n||d,"string"==typeof i&&a!==h&&(i=i.split(/[\. ]/),t=i.length-1,b.each(i,function(e,n){var o=e!=t?n+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(b.isPlainObject(a[o])&&e!=t)a=a[o];else{if(a[o]!==h)return s=a[o],!1;{if(!b.isPlainObject(a[n])||e==t)return a[n]!==h?s=a[n]:f.error(u.method,i),!1;a=a[n]}}})),"function"==typeof(r=s)&&"number"!=typeof r.nodeType?o=s.apply(n,e):s!==h&&(o=s),Array.isArray(c)?c.push(o):c!==h?c=[c,o]:o!==h&&(c=o),s}};return o?(g===h&&f.initialize(),f.invoke(n)):(g!==h&&f.destroy(),f.initialize()),c!==h?c:this},b.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","slider","rating","shape","sidebar","state","sticky","tab","toast","transition","visibility","visit"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},b.extend(b.expr.pseudos,{data:b.expr.createPseudo(function(n){return function(e){return!!b.data(e,n)}})})}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.17+3767ba8 - Slider
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -12,6 +12,10 @@
|
|
12
12
|
|
13
13
|
"use strict";
|
14
14
|
|
15
|
+
function isFunction(obj) {
|
16
|
+
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
+
}
|
18
|
+
|
15
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
16
20
|
? window
|
17
21
|
: (typeof self != 'undefined' && self.Math == Math)
|
@@ -23,6 +27,7 @@ $.fn.slider = function(parameters) {
|
|
23
27
|
|
24
28
|
var
|
25
29
|
$allModules = $(this),
|
30
|
+
$document = $(document),
|
26
31
|
$window = $(window),
|
27
32
|
|
28
33
|
moduleSelector = $allModules.selector || '',
|
@@ -236,7 +241,7 @@ $.fn.slider = function(parameters) {
|
|
236
241
|
$module.on('keydown' + eventNamespace, module.event.keydown);
|
237
242
|
},
|
238
243
|
globalKeyboardEvents: function() {
|
239
|
-
$
|
244
|
+
$document.on('keydown' + eventNamespace + documentEventID, module.event.activateFocus);
|
240
245
|
},
|
241
246
|
mouseEvents: function() {
|
242
247
|
module.verbose('Binding mouse and touch events');
|
@@ -264,8 +269,8 @@ $.fn.slider = function(parameters) {
|
|
264
269
|
slidingEvents: function() {
|
265
270
|
// these don't need the identifier because we only ever want one of them to be registered with document
|
266
271
|
module.verbose('Binding page wide events while handle is being draged');
|
267
|
-
$
|
268
|
-
$
|
272
|
+
$document.on('mousemove' + eventNamespace, module.event.move);
|
273
|
+
$document.on('mouseup' + eventNamespace, module.event.up);
|
269
274
|
},
|
270
275
|
windowEvents: function() {
|
271
276
|
$window.on('resize' + eventNamespace, module.event.resize);
|
@@ -285,12 +290,12 @@ $.fn.slider = function(parameters) {
|
|
285
290
|
.off('touchcancel' + eventNamespace);
|
286
291
|
$module.off('keydown' + eventNamespace);
|
287
292
|
$module.off('focusout' + eventNamespace);
|
288
|
-
$
|
293
|
+
$document.off('keydown' + eventNamespace + documentEventID, module.event.activateFocus);
|
289
294
|
$window.off('resize' + eventNamespace);
|
290
295
|
},
|
291
296
|
slidingEvents: function() {
|
292
|
-
$
|
293
|
-
$
|
297
|
+
$document.off('mousemove' + eventNamespace);
|
298
|
+
$document.off('mouseup' + eventNamespace);
|
294
299
|
},
|
295
300
|
},
|
296
301
|
|
@@ -406,7 +411,7 @@ $.fn.slider = function(parameters) {
|
|
406
411
|
$currThumb = undefined;
|
407
412
|
}
|
408
413
|
if(module.is.focused()) {
|
409
|
-
$
|
414
|
+
$document.trigger(event);
|
410
415
|
}
|
411
416
|
if(first || module.is.focused()) {
|
412
417
|
var step = module.determine.keyMovement(event);
|
@@ -433,7 +438,7 @@ $.fn.slider = function(parameters) {
|
|
433
438
|
if(!module.is.focused() && module.is.hover() && module.determine.keyMovement(event) != NO_STEP) {
|
434
439
|
event.preventDefault();
|
435
440
|
module.event.keydown(event, true);
|
436
|
-
$module.focus
|
441
|
+
$module.trigger('focus');
|
437
442
|
}
|
438
443
|
},
|
439
444
|
resize: function(_event) {
|
@@ -657,9 +662,9 @@ $.fn.slider = function(parameters) {
|
|
657
662
|
},
|
658
663
|
gapRatio: function() {
|
659
664
|
var gapRatio = 1;
|
660
|
-
|
665
|
+
|
661
666
|
if( settings.autoAdjustLabels ) {
|
662
|
-
var
|
667
|
+
var
|
663
668
|
numLabels = module.get.numLabels(),
|
664
669
|
trackLength = module.get.trackLength(),
|
665
670
|
gapCounter = 1
|
@@ -1236,13 +1241,13 @@ $.fn.slider = function(parameters) {
|
|
1236
1241
|
}
|
1237
1242
|
});
|
1238
1243
|
}
|
1239
|
-
if (
|
1244
|
+
if ( isFunction( found ) ) {
|
1240
1245
|
response = found.apply(context, passedArguments);
|
1241
1246
|
}
|
1242
1247
|
else if(found !== undefined) {
|
1243
1248
|
response = found;
|
1244
1249
|
}
|
1245
|
-
if(
|
1250
|
+
if(Array.isArray(returnedValue)) {
|
1246
1251
|
returnedValue.push(response);
|
1247
1252
|
}
|
1248
1253
|
else if(returnedValue !== undefined) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.17+3767ba8
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(X,t,Y,K){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),X.fn.slider=function(F){var S,e=X(this),A=X(t),O=e.selector||"",N=(new Date).getTime(),j=[],z=F,I="string"==typeof z,R=[].slice.call(arguments,1),B=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],U=0;return e.each(function(){var l,r,i,u,e,c,d,t,m,f,g,v,o,b,s,h,p=X.isPlainObject(F)?X.extend(!0,{},X.fn.slider.settings,F):X.extend({},X.fn.slider.settings),n=p.className,a=p.metadata,k=p.namespace,V=p.error,T=p.keys,w=p.interpretLabel,y=!1,M="."+k,x="module-"+k,P=X(this),E=this,C=P.data(x),L=1,D={initialize:function(){D.debug("Initializing slider",p),h=!0,t=U+=1,D.setup.layout(),D.setup.labels(),D.is.disabled()||D.bind.events(),D.read.metadata(),D.read.settings(),h=!1,D.instantiate()},instantiate:function(){D.verbose("Storing instance of slider",D),C=D,P.data(x,D)},destroy:function(){D.verbose("Destroying previous slider for",P),clearInterval(C.interval),D.unbind.events(),D.unbind.slidingEvents(),P.removeData(x),C=K},setup:{layout:function(){P.attr("tabindex")===K&&P.attr("tabindex",0),0==P.find(".inner").length&&P.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),o=D.get.precision(),i=P.find(".thumb:not(.second)"),l=i,D.is.range()&&(0==P.find(".thumb.second").length&&P.find(".inner").append("<div class='thumb second'></div>"),u=P.find(".thumb.second")),e=P.find(".track"),c=P.find(".track-fill"),v=i.width()/2},labels:function(){D.is.labeled()&&(0!=(d=P.find(".labels:not(.auto)")).length?D.setup.customLabel():D.setup.autoLabel(),p.showLabelTicks&&P.addClass(n.ticked))},customLabel:function(){var n,e=d.find(".label"),a=e.length,o=D.get.min(),s=D.get.max();e.each(function(e){var t=X(this).attr("data-value");n=t?((t=s<t?s:t<o?o:t)-o)/(s-o):(e+1)/(a+1),D.update.labelPosition(n,X(this))})},autoLabel:function(){0!=(d=P.find(".labels")).length?d.empty():d=P.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=D.get.numLabels();e<=t;e++){var n=D.get.label(e),n=""!==n?e%D.get.gapRatio()?X('<li class="halftick label"></li>'):X('<li class="label">'+n+"</li>"):null;n&&(D.update.labelPosition(e/t,n),d.append(n))}}},bind:{events:function(){D.bind.globalKeyboardEvents(),D.bind.keyboardEvents(),D.bind.mouseEvents(),p.autoAdjustLabels&&D.bind.windowEvents()},keyboardEvents:function(){D.verbose("Binding keyboard events"),P.on("keydown"+M,D.event.keydown)},globalKeyboardEvents:function(){X(Y).on("keydown"+M+t,D.event.activateFocus)},mouseEvents:function(){D.verbose("Binding mouse and touch events"),P.find(".track, .thumb, .inner").on("mousedown"+M,function(e){e.stopImmediatePropagation(),e.preventDefault(),D.event.down(e)}),P.on("mousedown"+M,D.event.down),P.on("mouseenter"+M,function(e){y=!0}),P.on("mouseleave"+M,function(e){y=!1}),P.find(".thumb").on("touchstart"+M,D.event.touchDown).on("touchmove"+M,D.event.move).on("touchend"+M,D.event.up).on("touchcancel"+M,D.event.touchCancel)},slidingEvents:function(){D.verbose("Binding page wide events while handle is being draged"),X(Y).on("mousemove"+M,D.event.move),X(Y).on("mouseup"+M,D.event.up)},windowEvents:function(){A.on("resize"+M,D.event.resize)}},unbind:{events:function(){P.find(".track, .thumb, .inner").off("mousedown"+M),P.off("mousedown"+M),P.off("mouseenter"+M),P.off("mouseleave"+M),P.find(".thumb").off("touchstart"+M).off("touchmove"+M).off("touchend"+M).off("touchcancel"+M),P.off("keydown"+M),P.off("focusout"+M),X(Y).off("keydown"+M+t,D.event.activateFocus),A.off("resize"+M)},slidingEvents:function(){X(Y).off("mousemove"+M),X(Y).off("mouseup"+M)}},event:{down:function(e){e.preventDefault(),D.is.range()?(e=D.determine.eventPos(e),e=D.determine.pos(e),l=p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal?(s=e,K):D.determine.closestThumb(e),b===K&&(b=D.get.currentThumbValue())):b===K&&(b=D.get.value()),D.is.disabled()||D.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),r===K&&(l=X(e.target),e=e.touches?e:e.originalEvent,r=e.targetTouches[0].identifier,b===K&&(b=D.get.currentThumbValue()))},move:function(e){var t,n,a;"mousemove"==e.type&&e.preventDefault(),D.is.disabled()||(t=D.determine.valueFromEvent(e),"mousemove"==e.type&&l===K&&(n=D.determine.eventPos(e),n=D.determine.pos(n),l=n<s?i:u),0==D.get.step()||D.is.smooth()?(n=D.thumbVal,a=D.secondThumbVal,e=D.determine.smoothValueFromEvent(e),l.hasClass("second")?(p.preventCrossover&&D.is.range()&&(t=Math.max(n,t),e=Math.max(n,e)),a=t):(p.preventCrossover&&D.is.range()&&(t=Math.min(a,t),e=Math.min(a,e)),n=t),t=Math.abs(n-(a||0)),D.update.position(e),p.onMove.call(E,t,n,a)):D.update.value(t,function(e,t,n){p.onMove.call(E,e,t,n)}))},up:function(e){e.preventDefault(),D.is.disabled()||(e=D.determine.valueFromEvent(e),D.set.value(e),D.unbind.slidingEvents(),b!==(r=K)&&(b=K))},touchCancel:function(e){e.preventDefault(),b!==(r=K)&&(D.update.value(b),b=K)},keydown:function(e,t){if(p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal&&(l=K),D.is.focused()&&X(Y).trigger(e),t||D.is.focused()){t=D.determine.keyMovement(e);if(0!=t)switch(e.preventDefault(),t){case 1:D.takeStep();break;case 2:D.takeStep(D.get.multiplier());break;case-1:D.backStep();break;case-2:D.backStep(D.get.multiplier())}}},activateFocus:function(e){!D.is.focused()&&D.is.hover()&&0!=D.determine.keyMovement(e)&&(e.preventDefault(),D.event.keydown(e,!0),P.focus())},resize:function(e){L!=D.get.gapRatio()&&(D.setup.labels(),L=D.get.gapRatio())}},resync:function(){D.verbose("Resyncing thumb position based on value"),D.is.range()&&D.update.position(D.secondThumbVal,u),D.update.position(D.thumbVal,i),D.setup.labels()},takeStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Taking a step"),0<t?D.set.value(n+t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Going back a step"),0<t?D.set.value(n-t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return P.hasClass(p.className.range)},hover:function(){return y},focused:function(){return P.is(":focus")},disabled:function(){return P.hasClass(p.className.disabled)},labeled:function(){return P.hasClass(p.className.labeled)},reversed:function(){return P.hasClass(p.className.reversed)},vertical:function(){return P.hasClass(p.className.vertical)},smooth:function(){return p.smooth||P.hasClass(p.className.smooth)}},get:{trackOffset:function(){return D.is.vertical()?e.offset().top:e.offset().left},trackLength:function(){return D.is.vertical()?e.height():e.width()},trackLeft:function(){return D.is.vertical()?e.position().top:e.position().left},trackStartPos:function(){return D.is.reversed()?D.get.trackLeft()+D.get.trackLength():D.get.trackLeft()},trackEndPos:function(){return D.is.reversed()?D.get.trackLeft():D.get.trackLeft()+D.get.trackLength()},trackStartMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-bottom"):P.css("padding-top"):D.is.reversed()?P.css("padding-right"):P.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-top"):P.css("padding-bottom"):D.is.reversed()?P.css("padding-left"):P.css("padding-right");return e||"0px"},precision:function(){var e=D.get.step(),e=(e=0!=e?2==(e=String(e).split(".")).length?e[1].length:0:p.decimalPlaces,Math.pow(10,e));return D.debug("Precision determined",e),e},min:function(){return p.min},max:function(){var e=D.get.step(),t=D.get.min(),n=0===e?0:Math.floor((p.max-t)/e);return 0==(0===e?0:(p.max-t)%e)?p.max:t+n*e},step:function(){return p.step},numLabels:function(){var e=Math.round((D.get.max()-D.get.min())/(0===D.get.step()?1:D.get.step()));return D.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return p.labelType},label:function(e){if(w)return w(e);switch(p.labelType){case p.labelTypes.number:return Math.round((e*(0===D.get.step()?1:D.get.step())+D.get.min())*o)/o;case p.labelTypes.letter:return B[e%26];default:return e}},value:function(){return m},currentThumbValue:function(){return l!==K&&l.hasClass("second")?D.secondThumbVal:D.thumbVal},thumbValue:function(e){return"second"!==e?D.thumbVal:D.is.range()?D.secondThumbVal:void D.error(V.notrange)},multiplier:function(){return p.pageMultiplier},thumbPosition:function(e){return"second"!==e?f:D.is.range()?g:void D.error(V.notrange)},gapRatio:function(){var e=1;if(p.autoAdjustLabels){var t=D.get.numLabels(),n=D.get.trackLength(),a=1;if(0<n)for(;n/t*a<p.labelDistance;)t%a||(e=a),a+=1}return e}},determine:{pos:function(e){return D.is.reversed()?D.get.trackStartPos()-e+D.get.trackOffset():e-D.get.trackOffset()-D.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(D.determine.thumbPos(i)),t=Math.abs(e-t),n=parseFloat(D.determine.thumbPos(u)),e=Math.abs(e-n);return(t!==e||D.get.thumbValue()!==D.get.min())&&t<=e?i:u},closestThumbPos:function(e){var t=parseFloat(D.determine.thumbPos(i)),n=Math.abs(e-t),a=parseFloat(D.determine.thumbPos(u));return n<=Math.abs(e-a)?t:a},thumbPos:function(e){return D.is.vertical()?D.is.reversed()?e.css("bottom"):e.css("top"):D.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=D.get.min(),n=D.get.max(),e=n<e?n:e<t?t:e,a=D.get.trackLength(),n=Math.round((e-t)/(n-t)*a);return D.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=D.get.trackLength(),n=D.get.step(),e=Math.round(e*t);return 0==n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=D.determine.eventPos(e),t=D.determine.pos(e),e=e<D.get.trackOffset()?D.is.reversed()?D.get.max():D.get.min():e>D.get.trackOffset()+D.get.trackLength()?D.is.reversed()?D.get.min():D.get.max():D.determine.value(t);return e},smoothValueFromEvent:function(e){var t=D.get.min(),n=D.get.max(),a=D.get.trackLength(),e=D.determine.eventPos(e)-D.get.trackOffset(),e=(e=e<0?0:a<e?a:e)/a;return(e=D.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if("touchmove"===e.type||"touchend"===e.type){for(var t=e.touches?e:e.originalEvent,n=t.changedTouches[0],a=0;a<t.touches.length;a++)if(t.touches[a].identifier===r){n=t.touches[a];break}var o=n.pageY,s=n.pageX;return D.is.vertical()?o:s}o=e.pageY||e.originalEvent.pageY,s=e.pageX||e.originalEvent.pageX;return D.is.vertical()?o:s},value:function(e){var t=D.is.reversed()?D.get.trackEndPos():D.get.trackStartPos(),t=(e-t)/((D.is.reversed()?D.get.trackStartPos():D.get.trackEndPos())-t),n=D.get.max()-D.get.min(),a=D.get.step(),t=t*n,n=0==a?t:Math.round(t/a)*a;return D.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&D.verbose("Rounding value to closest step: "+n),D.verbose("Cutting off additional decimal places"),Math.round((n+D.get.min())*o)/o},keyMovement:function(e){var e=e.which,t=!D.is.vertical()||D.is.reversed()?T.downArrow:T.upArrow,n=!D.is.vertical()||D.is.reversed()?T.upArrow:T.downArrow,a=!D.is.vertical()&&D.is.reversed()?T.rightArrow:T.leftArrow,o=!D.is.vertical()&&D.is.reversed()?T.leftArrow:T.rightArrow;return e==t||e==a?-1:e==n||e==o?1:e==T.pageDown?-2:e==T.pageUp?2:0}},handleNewValuePosition:function(e){var t=D.get.min(),n=D.get.max();return e<=t?e=t:n<=e&&(e=n),D.determine.positionFromValue(e)},set:{value:function(a,o){o=!1!==o;var s=b===K;b=b===K?D.get.value():b,D.update.value(a,function(e,t,n){h&&!p.fireOnInit||!o||(a!==b&&p.onChange.call(E,e,t,n),p.onMove.call(E,e,t,n)),s&&(b=K)})},rangeValue:function(e,t,n){var a,o,s;n=!1!==n,D.is.range()?(a=D.get.min(),o=D.get.max(),b=(s=b===K)?D.get.value():b,e<=a?e=a:o<=e&&(e=o),t<=a?t=a:o<=t&&(t=o),D.thumbVal=e,D.secondThumbVal=t,m=Math.abs(D.thumbVal-D.secondThumbVal),D.update.position(D.thumbVal,i),D.update.position(D.secondThumbVal,u),h&&!p.fireOnInit||!n||(m!==b&&p.onChange.call(E,m,D.thumbVal,D.secondThumbVal),p.onMove.call(E,m,D.thumbVal,D.secondThumbVal)),s&&(b=K)):D.error(V.notrange)},position:function(e,t){e=D.determine.value(e);"second"===t?(D.secondThumbVal=e,D.update.position(e,u)):(D.thumbVal=e,D.update.position(e,i)),m=Math.abs(D.thumbVal-(D.secondThumbVal||0)),D.set.value(m)}},update:{value:function(e,t){var n=D.get.min(),a=D.get.max();e<=n?e=n:a<=e&&(e=a),D.is.range()?((l=l===K?e<=D.get.currentThumbValue()?i:u:l).hasClass("second")?(p.preventCrossover&&D.is.range()&&(e=Math.max(D.thumbVal,e)),D.secondThumbVal=e):(p.preventCrossover&&D.is.range()&&(e=Math.min(D.secondThumbVal,e)),D.thumbVal=e),m=Math.abs(D.thumbVal-D.secondThumbVal)):(m=e,D.thumbVal=m),D.update.position(e),D.debug("Setting slider value to "+m),"function"==typeof t&&t(m,D.thumbVal,D.secondThumbVal)},position:function(e,t){var n=D.handleNewValuePosition(e),t=t!=K?t:l,a=D.thumbVal||D.get.min(),o=D.secondThumbVal||D.get.min();D.is.range()&&t.hasClass("second")?(g=n,o=e):(f=n,a=e);var s,r=D.get.min(),i=D.get.max(),e=100*(e-r)/(i-r),u=100*(Math.min(a,o)-r)/(i-r),a=100*(1-(Math.max(a,o)-r)/(i-r)),o=D.is.vertical()?D.is.reversed()?(s={bottom:"calc("+e+"% - "+v+"px)",top:"auto"},{bottom:u+"%",top:a+"%"}):(s={top:"calc("+e+"% - "+v+"px)",bottom:"auto"},{top:u+"%",bottom:a+"%"}):D.is.reversed()?(s={right:"calc("+e+"% - "+v+"px)",left:"auto"},{right:u+"%",left:a+"%"}):(s={left:"calc("+e+"% - "+v+"px)",right:"auto"},{left:u+"%",right:a+"%"});t.css(s),c.css(o),D.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=D.get.trackStartMargin(),a=D.get.trackEndMargin(),o=D.is.vertical()?D.is.reversed()?"bottom":"top":D.is.reversed()?"right":"left",s=D.is.reversed()&&!D.is.vertical()?" - ":" + ";t.css(o,"calc("+("(100% - "+n+" - "+a+") * "+e)+s+n+")")}},goto:{max:function(){D.set.value(D.get.max())},min:function(){D.set.value(D.get.min())}},read:{metadata:function(){var e={thumbVal:P.data(a.thumbVal),secondThumbVal:P.data(a.secondThumbVal)};e.thumbVal&&(D.is.range()&&e.secondThumbVal?(D.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),D.set.rangeValue(e.thumbVal,e.secondThumbVal)):(D.debug("Current value set from metadata",e.thumbVal),D.set.value(e.thumbVal)))},settings:function(){!1!==p.start&&(D.is.range()?(D.debug("Start position set from settings",p.start,p.end),D.set.rangeValue(p.start,p.end)):(D.debug("Start position set from settings",p.start),D.set.value(p.start)))}},setting:function(e,t){if(D.debug("Changing setting",e,t),X.isPlainObject(e))X.extend(!0,p,e);else{if(t===K)return p[e];X.isPlainObject(p[e])?X.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(X.isPlainObject(e))X.extend(!0,D,e);else{if(t===K)return D[e];D[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,p.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),D.verbose.apply(console,arguments)))},error:function(){p.silent||(D.error=Function.prototype.bind.call(console.error,console,p.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=(new Date).getTime())-(N||t),N=t,j.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){var e=p.name+":",n=0;N=!1,clearTimeout(D.performance.timer),X.each(j,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",O&&(e+=" '"+O+"'"),(console.group!==K||console.table!==K)&&0<j.length&&(console.groupCollapsed(e),console.table?console.table(j):X.each(j,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(a,e,t){var o,s,n,r=C;return e=e||R,t=t||E,"string"==typeof a&&r!==K&&(a=a.split(/[\. ]/),o=a.length-1,X.each(a,function(e,t){var n=e!=o?t+a[e+1].charAt(0).toUpperCase()+a[e+1].slice(1):a;if(X.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==K)return s=r[n],!1;{if(!X.isPlainObject(r[t])||e==o)return r[t]!==K?s=r[t]:D.error(V.method,a),!1;r=r[t]}}})),X.isFunction(s)?n=s.apply(t,e):s!==K&&(n=s),X.isArray(S)?S.push(n):S!==K?S=[S,n]:n!==K&&(S=n),s}};I?(C===K&&D.initialize(),D.invoke(z)):(C!==K&&C.invoke("destroy"),D.initialize())}),S!==K?S:this},X.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document);
|
11
|
+
!function(Y,t,n,K){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Y.fn.slider=function(S){var A,e=Y(this),F=Y(n),O=Y(t),N=e.selector||"",j=(new Date).getTime(),z=[],I=S,R="string"==typeof I,B=[].slice.call(arguments,1),U=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],X=0;return e.each(function(){var l,s,i,u,e,c,d,t,m,f,g,v,o,b,r,h,p=Y.isPlainObject(S)?Y.extend(!0,{},Y.fn.slider.settings,S):Y.extend({},Y.fn.slider.settings),n=p.className,a=p.metadata,k=p.namespace,V=p.error,T=p.keys,y=p.interpretLabel,w=!1,M="."+k,x="module-"+k,P=Y(this),E=this,C=P.data(x),L=1,D={initialize:function(){D.debug("Initializing slider",p),h=!0,t=X+=1,D.setup.layout(),D.setup.labels(),D.is.disabled()||D.bind.events(),D.read.metadata(),D.read.settings(),h=!1,D.instantiate()},instantiate:function(){D.verbose("Storing instance of slider",D),C=D,P.data(x,D)},destroy:function(){D.verbose("Destroying previous slider for",P),clearInterval(C.interval),D.unbind.events(),D.unbind.slidingEvents(),P.removeData(x),C=K},setup:{layout:function(){P.attr("tabindex")===K&&P.attr("tabindex",0),0==P.find(".inner").length&&P.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),o=D.get.precision(),i=P.find(".thumb:not(.second)"),l=i,D.is.range()&&(0==P.find(".thumb.second").length&&P.find(".inner").append("<div class='thumb second'></div>"),u=P.find(".thumb.second")),e=P.find(".track"),c=P.find(".track-fill"),v=i.width()/2},labels:function(){D.is.labeled()&&(0!=(d=P.find(".labels:not(.auto)")).length?D.setup.customLabel():D.setup.autoLabel(),p.showLabelTicks&&P.addClass(n.ticked))},customLabel:function(){var n,e=d.find(".label"),a=e.length,o=D.get.min(),r=D.get.max();e.each(function(e){var t=Y(this).attr("data-value");n=t?((t=r<t?r:t<o?o:t)-o)/(r-o):(e+1)/(a+1),D.update.labelPosition(n,Y(this))})},autoLabel:function(){0!=(d=P.find(".labels")).length?d.empty():d=P.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=D.get.numLabels();e<=t;e++){var n=D.get.label(e),n=""!==n?e%D.get.gapRatio()?Y('<li class="halftick label"></li>'):Y('<li class="label">'+n+"</li>"):null;n&&(D.update.labelPosition(e/t,n),d.append(n))}}},bind:{events:function(){D.bind.globalKeyboardEvents(),D.bind.keyboardEvents(),D.bind.mouseEvents(),p.autoAdjustLabels&&D.bind.windowEvents()},keyboardEvents:function(){D.verbose("Binding keyboard events"),P.on("keydown"+M,D.event.keydown)},globalKeyboardEvents:function(){F.on("keydown"+M+t,D.event.activateFocus)},mouseEvents:function(){D.verbose("Binding mouse and touch events"),P.find(".track, .thumb, .inner").on("mousedown"+M,function(e){e.stopImmediatePropagation(),e.preventDefault(),D.event.down(e)}),P.on("mousedown"+M,D.event.down),P.on("mouseenter"+M,function(e){w=!0}),P.on("mouseleave"+M,function(e){w=!1}),P.find(".thumb").on("touchstart"+M,D.event.touchDown).on("touchmove"+M,D.event.move).on("touchend"+M,D.event.up).on("touchcancel"+M,D.event.touchCancel)},slidingEvents:function(){D.verbose("Binding page wide events while handle is being draged"),F.on("mousemove"+M,D.event.move),F.on("mouseup"+M,D.event.up)},windowEvents:function(){O.on("resize"+M,D.event.resize)}},unbind:{events:function(){P.find(".track, .thumb, .inner").off("mousedown"+M),P.off("mousedown"+M),P.off("mouseenter"+M),P.off("mouseleave"+M),P.find(".thumb").off("touchstart"+M).off("touchmove"+M).off("touchend"+M).off("touchcancel"+M),P.off("keydown"+M),P.off("focusout"+M),F.off("keydown"+M+t,D.event.activateFocus),O.off("resize"+M)},slidingEvents:function(){F.off("mousemove"+M),F.off("mouseup"+M)}},event:{down:function(e){e.preventDefault(),D.is.range()?(e=D.determine.eventPos(e),e=D.determine.pos(e),l=p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal?(r=e,K):D.determine.closestThumb(e),b===K&&(b=D.get.currentThumbValue())):b===K&&(b=D.get.value()),D.is.disabled()||D.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),s===K&&(l=Y(e.target),e=e.touches?e:e.originalEvent,s=e.targetTouches[0].identifier,b===K&&(b=D.get.currentThumbValue()))},move:function(e){var t,n,a;"mousemove"==e.type&&e.preventDefault(),D.is.disabled()||(t=D.determine.valueFromEvent(e),"mousemove"==e.type&&l===K&&(n=D.determine.eventPos(e),n=D.determine.pos(n),l=n<r?i:u),0==D.get.step()||D.is.smooth()?(n=D.thumbVal,a=D.secondThumbVal,e=D.determine.smoothValueFromEvent(e),l.hasClass("second")?(p.preventCrossover&&D.is.range()&&(t=Math.max(n,t),e=Math.max(n,e)),a=t):(p.preventCrossover&&D.is.range()&&(t=Math.min(a,t),e=Math.min(a,e)),n=t),t=Math.abs(n-(a||0)),D.update.position(e),p.onMove.call(E,t,n,a)):D.update.value(t,function(e,t,n){p.onMove.call(E,e,t,n)}))},up:function(e){e.preventDefault(),D.is.disabled()||(e=D.determine.valueFromEvent(e),D.set.value(e),D.unbind.slidingEvents(),b!==(s=K)&&(b=K))},touchCancel:function(e){e.preventDefault(),b!==(s=K)&&(D.update.value(b),b=K)},keydown:function(e,t){if(p.preventCrossover&&D.is.range()&&D.thumbVal===D.secondThumbVal&&(l=K),D.is.focused()&&F.trigger(e),t||D.is.focused()){t=D.determine.keyMovement(e);if(0!=t)switch(e.preventDefault(),t){case 1:D.takeStep();break;case 2:D.takeStep(D.get.multiplier());break;case-1:D.backStep();break;case-2:D.backStep(D.get.multiplier())}}},activateFocus:function(e){!D.is.focused()&&D.is.hover()&&0!=D.determine.keyMovement(e)&&(e.preventDefault(),D.event.keydown(e,!0),P.trigger("focus"))},resize:function(e){L!=D.get.gapRatio()&&(D.setup.labels(),L=D.get.gapRatio())}},resync:function(){D.verbose("Resyncing thumb position based on value"),D.is.range()&&D.update.position(D.secondThumbVal,u),D.update.position(D.thumbVal,i),D.setup.labels()},takeStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Taking a step"),0<t?D.set.value(n+t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){e=e!=K?e:1;var t=D.get.step(),n=D.get.currentThumbValue();D.verbose("Going back a step"),0<t?D.set.value(n-t*e):0==t&&(t=D.get.precision(),D.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return P.hasClass(p.className.range)},hover:function(){return w},focused:function(){return P.is(":focus")},disabled:function(){return P.hasClass(p.className.disabled)},labeled:function(){return P.hasClass(p.className.labeled)},reversed:function(){return P.hasClass(p.className.reversed)},vertical:function(){return P.hasClass(p.className.vertical)},smooth:function(){return p.smooth||P.hasClass(p.className.smooth)}},get:{trackOffset:function(){return D.is.vertical()?e.offset().top:e.offset().left},trackLength:function(){return D.is.vertical()?e.height():e.width()},trackLeft:function(){return D.is.vertical()?e.position().top:e.position().left},trackStartPos:function(){return D.is.reversed()?D.get.trackLeft()+D.get.trackLength():D.get.trackLeft()},trackEndPos:function(){return D.is.reversed()?D.get.trackLeft():D.get.trackLeft()+D.get.trackLength()},trackStartMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-bottom"):P.css("padding-top"):D.is.reversed()?P.css("padding-right"):P.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=D.is.vertical()?D.is.reversed()?P.css("padding-top"):P.css("padding-bottom"):D.is.reversed()?P.css("padding-left"):P.css("padding-right");return e||"0px"},precision:function(){var e=D.get.step(),e=(e=0!=e?2==(e=String(e).split(".")).length?e[1].length:0:p.decimalPlaces,Math.pow(10,e));return D.debug("Precision determined",e),e},min:function(){return p.min},max:function(){var e=D.get.step(),t=D.get.min(),n=0===e?0:Math.floor((p.max-t)/e);return 0==(0===e?0:(p.max-t)%e)?p.max:t+n*e},step:function(){return p.step},numLabels:function(){var e=Math.round((D.get.max()-D.get.min())/(0===D.get.step()?1:D.get.step()));return D.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return p.labelType},label:function(e){if(y)return y(e);switch(p.labelType){case p.labelTypes.number:return Math.round((e*(0===D.get.step()?1:D.get.step())+D.get.min())*o)/o;case p.labelTypes.letter:return U[e%26];default:return e}},value:function(){return m},currentThumbValue:function(){return l!==K&&l.hasClass("second")?D.secondThumbVal:D.thumbVal},thumbValue:function(e){return"second"!==e?D.thumbVal:D.is.range()?D.secondThumbVal:void D.error(V.notrange)},multiplier:function(){return p.pageMultiplier},thumbPosition:function(e){return"second"!==e?f:D.is.range()?g:void D.error(V.notrange)},gapRatio:function(){var e=1;if(p.autoAdjustLabels){var t=D.get.numLabels(),n=D.get.trackLength(),a=1;if(0<n)for(;n/t*a<p.labelDistance;)t%a||(e=a),a+=1}return e}},determine:{pos:function(e){return D.is.reversed()?D.get.trackStartPos()-e+D.get.trackOffset():e-D.get.trackOffset()-D.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(D.determine.thumbPos(i)),t=Math.abs(e-t),n=parseFloat(D.determine.thumbPos(u)),e=Math.abs(e-n);return(t!==e||D.get.thumbValue()!==D.get.min())&&t<=e?i:u},closestThumbPos:function(e){var t=parseFloat(D.determine.thumbPos(i)),n=Math.abs(e-t),a=parseFloat(D.determine.thumbPos(u));return n<=Math.abs(e-a)?t:a},thumbPos:function(e){return D.is.vertical()?D.is.reversed()?e.css("bottom"):e.css("top"):D.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=D.get.min(),n=D.get.max(),e=n<e?n:e<t?t:e,a=D.get.trackLength(),n=Math.round((e-t)/(n-t)*a);return D.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=D.get.trackLength(),n=D.get.step(),e=Math.round(e*t);return 0==n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=D.determine.eventPos(e),t=D.determine.pos(e),e=e<D.get.trackOffset()?D.is.reversed()?D.get.max():D.get.min():e>D.get.trackOffset()+D.get.trackLength()?D.is.reversed()?D.get.min():D.get.max():D.determine.value(t);return e},smoothValueFromEvent:function(e){var t=D.get.min(),n=D.get.max(),a=D.get.trackLength(),e=D.determine.eventPos(e)-D.get.trackOffset(),e=(e=e<0?0:a<e?a:e)/a;return(e=D.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if("touchmove"===e.type||"touchend"===e.type){for(var t=e.touches?e:e.originalEvent,n=t.changedTouches[0],a=0;a<t.touches.length;a++)if(t.touches[a].identifier===s){n=t.touches[a];break}var o=n.pageY,r=n.pageX;return D.is.vertical()?o:r}o=e.pageY||e.originalEvent.pageY,r=e.pageX||e.originalEvent.pageX;return D.is.vertical()?o:r},value:function(e){var t=D.is.reversed()?D.get.trackEndPos():D.get.trackStartPos(),t=(e-t)/((D.is.reversed()?D.get.trackStartPos():D.get.trackEndPos())-t),n=D.get.max()-D.get.min(),a=D.get.step(),t=t*n,n=0==a?t:Math.round(t/a)*a;return D.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&D.verbose("Rounding value to closest step: "+n),D.verbose("Cutting off additional decimal places"),Math.round((n+D.get.min())*o)/o},keyMovement:function(e){var e=e.which,t=!D.is.vertical()||D.is.reversed()?T.downArrow:T.upArrow,n=!D.is.vertical()||D.is.reversed()?T.upArrow:T.downArrow,a=!D.is.vertical()&&D.is.reversed()?T.rightArrow:T.leftArrow,o=!D.is.vertical()&&D.is.reversed()?T.leftArrow:T.rightArrow;return e==t||e==a?-1:e==n||e==o?1:e==T.pageDown?-2:e==T.pageUp?2:0}},handleNewValuePosition:function(e){var t=D.get.min(),n=D.get.max();return e<=t?e=t:n<=e&&(e=n),D.determine.positionFromValue(e)},set:{value:function(a,o){o=!1!==o;var r=b===K;b=b===K?D.get.value():b,D.update.value(a,function(e,t,n){h&&!p.fireOnInit||!o||(a!==b&&p.onChange.call(E,e,t,n),p.onMove.call(E,e,t,n)),r&&(b=K)})},rangeValue:function(e,t,n){var a,o,r;n=!1!==n,D.is.range()?(a=D.get.min(),o=D.get.max(),b=(r=b===K)?D.get.value():b,e<=a?e=a:o<=e&&(e=o),t<=a?t=a:o<=t&&(t=o),D.thumbVal=e,D.secondThumbVal=t,m=Math.abs(D.thumbVal-D.secondThumbVal),D.update.position(D.thumbVal,i),D.update.position(D.secondThumbVal,u),h&&!p.fireOnInit||!n||(m!==b&&p.onChange.call(E,m,D.thumbVal,D.secondThumbVal),p.onMove.call(E,m,D.thumbVal,D.secondThumbVal)),r&&(b=K)):D.error(V.notrange)},position:function(e,t){e=D.determine.value(e);"second"===t?(D.secondThumbVal=e,D.update.position(e,u)):(D.thumbVal=e,D.update.position(e,i)),m=Math.abs(D.thumbVal-(D.secondThumbVal||0)),D.set.value(m)}},update:{value:function(e,t){var n=D.get.min(),a=D.get.max();e<=n?e=n:a<=e&&(e=a),D.is.range()?((l=l===K?e<=D.get.currentThumbValue()?i:u:l).hasClass("second")?(p.preventCrossover&&D.is.range()&&(e=Math.max(D.thumbVal,e)),D.secondThumbVal=e):(p.preventCrossover&&D.is.range()&&(e=Math.min(D.secondThumbVal,e)),D.thumbVal=e),m=Math.abs(D.thumbVal-D.secondThumbVal)):(m=e,D.thumbVal=m),D.update.position(e),D.debug("Setting slider value to "+m),"function"==typeof t&&t(m,D.thumbVal,D.secondThumbVal)},position:function(e,t){var n=D.handleNewValuePosition(e),t=t!=K?t:l,a=D.thumbVal||D.get.min(),o=D.secondThumbVal||D.get.min();D.is.range()&&t.hasClass("second")?(g=n,o=e):(f=n,a=e);var r,s=D.get.min(),i=D.get.max(),e=100*(e-s)/(i-s),u=100*(Math.min(a,o)-s)/(i-s),a=100*(1-(Math.max(a,o)-s)/(i-s)),o=D.is.vertical()?D.is.reversed()?(r={bottom:"calc("+e+"% - "+v+"px)",top:"auto"},{bottom:u+"%",top:a+"%"}):(r={top:"calc("+e+"% - "+v+"px)",bottom:"auto"},{top:u+"%",bottom:a+"%"}):D.is.reversed()?(r={right:"calc("+e+"% - "+v+"px)",left:"auto"},{right:u+"%",left:a+"%"}):(r={left:"calc("+e+"% - "+v+"px)",right:"auto"},{left:u+"%",right:a+"%"});t.css(r),c.css(o),D.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=D.get.trackStartMargin(),a=D.get.trackEndMargin(),o=D.is.vertical()?D.is.reversed()?"bottom":"top":D.is.reversed()?"right":"left",r=D.is.reversed()&&!D.is.vertical()?" - ":" + ";t.css(o,"calc("+("(100% - "+n+" - "+a+") * "+e)+r+n+")")}},goto:{max:function(){D.set.value(D.get.max())},min:function(){D.set.value(D.get.min())}},read:{metadata:function(){var e={thumbVal:P.data(a.thumbVal),secondThumbVal:P.data(a.secondThumbVal)};e.thumbVal&&(D.is.range()&&e.secondThumbVal?(D.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),D.set.rangeValue(e.thumbVal,e.secondThumbVal)):(D.debug("Current value set from metadata",e.thumbVal),D.set.value(e.thumbVal)))},settings:function(){!1!==p.start&&(D.is.range()?(D.debug("Start position set from settings",p.start,p.end),D.set.rangeValue(p.start,p.end)):(D.debug("Start position set from settings",p.start),D.set.value(p.start)))}},setting:function(e,t){if(D.debug("Changing setting",e,t),Y.isPlainObject(e))Y.extend(!0,p,e);else{if(t===K)return p[e];Y.isPlainObject(p[e])?Y.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,D,e);else{if(t===K)return D[e];D[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,p.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),D.verbose.apply(console,arguments)))},error:function(){p.silent||(D.error=Function.prototype.bind.call(console.error,console,p.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=(new Date).getTime())-(j||t),j=t,z.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){var e=p.name+":",n=0;j=!1,clearTimeout(D.performance.timer),Y.each(z,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",N&&(e+=" '"+N+"'"),(console.group!==K||console.table!==K)&&0<z.length&&(console.groupCollapsed(e),console.table?console.table(z):Y.each(z,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),z=[]}},invoke:function(a,e,t){var o,r,n,s,i=C;return e=e||B,t=t||E,"string"==typeof a&&i!==K&&(a=a.split(/[\. ]/),o=a.length-1,Y.each(a,function(e,t){var n=e!=o?t+a[e+1].charAt(0).toUpperCase()+a[e+1].slice(1):a;if(Y.isPlainObject(i[n])&&e!=o)i=i[n];else{if(i[n]!==K)return r=i[n],!1;{if(!Y.isPlainObject(i[t])||e==o)return i[t]!==K?r=i[t]:D.error(V.method,a),!1;i=i[t]}}})),"function"==typeof(s=r)&&"number"!=typeof s.nodeType?n=r.apply(t,e):r!==K&&(n=r),Array.isArray(A)?A.push(n):A!==K?A=[A,n]:n!==K&&(A=n),r}};R?(C===K&&D.initialize(),D.invoke(I)):(C!==K&&C.invoke("destroy"),D.initialize())}),A!==K?A:this},Y.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document);
|
package/dist/components/state.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.17+3767ba8 - State
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
"use strict";
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -556,7 +556,7 @@ $.fn.state = function(parameters) {
|
|
556
556
|
}
|
557
557
|
});
|
558
558
|
}
|
559
|
-
if (
|
559
|
+
if ( isFunction( found ) ) {
|
560
560
|
response = found.apply(context, passedArguments);
|
561
561
|
}
|
562
562
|
else if(found !== undefined) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.17+3767ba8
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(w,C,A,P){"use strict";
|
11
|
+
!function(w,C,A,P){"use strict";C=void 0!==C&&C.Math==Math?C:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w.fn.state=function(v){var g,b=w(this),x=b.selector||"",p=(new Date).getTime(),h=[],m=v,T="string"==typeof m,y=[].slice.call(arguments,1);return b.each(function(){var i=w.isPlainObject(v)?w.extend(!0,{},w.fn.state.settings,v):w.extend({},w.fn.state.settings),r=i.error,n=i.metadata,t=i.className,e=i.namespace,a=i.states,o=i.text,s="."+e,c=e+"-module",l=w(this),u=this,d=l.data(c),f={initialize:function(){f.verbose("Initializing module"),i.automatic&&f.add.defaults(),i.context&&""!==x?([C,A].indexOf(i.context)<0?w(A).find(i.context):w(i.context)).on(x,"mouseenter"+s,f.change.text).on(x,"mouseleave"+s,f.reset.text).on(x,"click"+s,f.toggle.state):l.on("mouseenter"+s,f.change.text).on("mouseleave"+s,f.reset.text).on("click"+s,f.toggle.state),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),d=f,l.data(c,f)},destroy:function(){f.verbose("Destroying previous module",d),l.off(s).removeData(c)},refresh:function(){f.verbose("Refreshing selector cache"),l=w(u)},add:{defaults:function(){var n=v&&w.isPlainObject(v.states)?v.states:{};w.each(i.defaults,function(e,t){f.is[e]!==P&&f.is[e]()&&(f.verbose("Adding default states",e,u),w.extend(i.states,t,n))})}},is:{active:function(){return l.hasClass(t.active)},loading:function(){return l.hasClass(t.loading)},inactive:function(){return!l.hasClass(t.active)},state:function(e){return t[e]!==P&&l.hasClass(t[e])},enabled:function(){return!l.is(i.filter.active)},disabled:function(){return l.is(i.filter.active)},textEnabled:function(){return!l.is(i.filter.text)},button:function(){return l.is(".button:not(a, .submit)")},input:function(){return l.is("input")},progress:function(){return l.is(".ui.progress")}},allow:function(e){f.debug("Now allowing state",e),a[e]=!0},disallow:function(e){f.debug("No longer allowing",e),a[e]=!1},allows:function(e){return a[e]||!1},enable:function(){l.removeClass(t.disabled)},disable:function(){l.addClass(t.disabled)},setState:function(e){f.allows(e)&&l.addClass(t[e])},removeState:function(e){f.allows(e)&&l.removeClass(t[e])},toggle:{state:function(){var e;if(f.allows("active")&&f.is.enabled()){if(f.refresh(),w.fn.api!==P)if(e=l.api("get request"),l.api("was cancelled"))f.debug("API Request cancelled by beforesend"),i.activateTest=function(){return!1},i.deactivateTest=function(){return!1};else if(e)return void f.listenTo(e);f.change.state()}}},listenTo:function(e){f.debug("API request detected, waiting for state signal",e),e&&(o.loading&&f.update.text(o.loading),w.when(e).then(function(){"resolved"==e.state()?(f.debug("API request succeeded"),i.activateTest=function(){return!0},i.deactivateTest=function(){return!0}):(f.debug("API request failed"),i.activateTest=function(){return!1},i.deactivateTest=function(){return!1}),f.change.state()}))},change:{state:function(){f.debug("Determining state change direction"),f.is.inactive()?f.activate():f.deactivate(),i.sync&&f.sync(),i.onChange.call(u)},text:function(){f.is.textEnabled()&&(f.is.disabled()?(f.verbose("Changing text to disabled text",o.hover),f.update.text(o.disabled)):f.is.active()?o.hover?(f.verbose("Changing text to hover text",o.hover),f.update.text(o.hover)):o.deactivate&&(f.verbose("Changing text to deactivating text",o.deactivate),f.update.text(o.deactivate)):o.hover?(f.verbose("Changing text to hover text",o.hover),f.update.text(o.hover)):o.activate&&(f.verbose("Changing text to activating text",o.activate),f.update.text(o.activate)))}},activate:function(){i.activateTest.call(u)&&(f.debug("Setting state to active"),l.addClass(t.active),f.update.text(o.active),i.onActivate.call(u))},deactivate:function(){i.deactivateTest.call(u)&&(f.debug("Setting state to inactive"),l.removeClass(t.active),f.update.text(o.inactive),i.onDeactivate.call(u))},sync:function(){f.verbose("Syncing other buttons to current state"),f.is.active()?b.not(l).state("activate"):b.not(l).state("deactivate")},get:{text:function(){return i.selector.text?l.find(i.selector.text).text():l.html()},textFor:function(e){return o[e]||!1}},flash:{text:function(e,t,n){var a=f.get.text();f.debug("Flashing text message",e,t),e=e||i.text.flash,t=t||i.flashDuration,n=n||function(){},f.update.text(e),setTimeout(function(){f.update.text(a),n.call(u)},t)}},reset:{text:function(){var e=o.active||l.data(n.storedText),t=o.inactive||l.data(n.storedText);f.is.textEnabled()&&(f.is.active()&&e?(f.verbose("Resetting active text",e),f.update.text(e)):t&&(f.verbose("Resetting inactive text",e),f.update.text(t)))}},update:{text:function(e){var t=f.get.text();e&&e!==t?(f.debug("Updating text",e),i.selector.text?l.data(n.storedText,e).find(i.selector.text).text(e):l.data(n.storedText,e).html(e)):f.debug("Text is already set, ignoring update",e)}},setting:function(e,t){if(f.debug("Changing setting",e,t),w.isPlainObject(e))w.extend(!0,i,e);else{if(t===P)return i[e];w.isPlainObject(i[e])?w.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(w.isPlainObject(e))w.extend(!0,f,e);else{if(t===P)return f[e];f[e]=t}},debug:function(){!i.silent&&i.debug&&(i.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,i.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),f.verbose.apply(console,arguments)))},error:function(){i.silent||(f.error=Function.prototype.bind.call(console.error,console,i.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;i.performance&&(n=(t=(new Date).getTime())-(p||t),p=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=i.name+":",n=0;p=!1,clearTimeout(f.performance.timer),w.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",x&&(e+=" '"+x+"'"),(console.group!==P||console.table!==P)&&0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):w.each(h,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(a,e,t){var i,o,n,s,c=d;return e=e||y,t=t||u,"string"==typeof a&&c!==P&&(a=a.split(/[\. ]/),i=a.length-1,w.each(a,function(e,t){var n=e!=i?t+a[e+1].charAt(0).toUpperCase()+a[e+1].slice(1):a;if(w.isPlainObject(c[n])&&e!=i)c=c[n];else{if(c[n]!==P)return o=c[n],!1;{if(!w.isPlainObject(c[t])||e==i)return c[t]!==P?o=c[t]:f.error(r.method,a),!1;c=c[t]}}})),"function"==typeof(s=o)&&"number"!=typeof s.nodeType?n=o.apply(t,e):o!==P&&(n=o),Array.isArray(g)?g.push(n):g!==P?g=[g,n]:n!==P&&(g=n),o}};T?(d===P&&f.initialize(),f.invoke(m)):(d!==P&&d.invoke("destroy"),f.initialize())}),g!==P?g:this},w.fn.state.settings={name:"State",debug:!1,verbose:!1,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:1e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{beforeSend:"The before send function has cancelled state change",method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,activate:!1,deactivate:!1}}}(jQuery,window,document);
|
package/dist/components/step.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.17+3767ba8 - Sticky
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
'use strict';
|
14
14
|
|
15
|
-
|
15
|
+
function isFunction(obj) {
|
16
16
|
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
}
|
17
|
+
}
|
18
18
|
|
19
19
|
window = (typeof window != 'undefined' && window.Math == Math)
|
20
20
|
? window
|
@@ -26,6 +26,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
|
|
26
26
|
$.fn.sticky = function(parameters) {
|
27
27
|
var
|
28
28
|
$allModules = $(this),
|
29
|
+
$document = $(document),
|
29
30
|
moduleSelector = $allModules.selector || '',
|
30
31
|
|
31
32
|
time = new Date().getTime(),
|
@@ -53,7 +54,7 @@ $.fn.sticky = function(parameters) {
|
|
53
54
|
|
54
55
|
$module = $(this),
|
55
56
|
$window = $(window),
|
56
|
-
$scroll = [window,document].indexOf(settings.scrollContext) < 0 ? $
|
57
|
+
$scroll = [window,document].indexOf(settings.scrollContext) < 0 ? $document.find(settings.scrollContext) : $(settings.scrollContext),
|
57
58
|
$container,
|
58
59
|
$context,
|
59
60
|
|
@@ -139,7 +140,7 @@ $.fn.sticky = function(parameters) {
|
|
139
140
|
|
140
141
|
determineContainer: function() {
|
141
142
|
if(settings.container) {
|
142
|
-
$container = [window,document].indexOf(settings.container) < 0 ? $
|
143
|
+
$container = [window,document].indexOf(settings.container) < 0 ? $document.find(settings.container) : $(settings.container);
|
143
144
|
}
|
144
145
|
else {
|
145
146
|
$container = $module.offsetParent();
|
@@ -148,7 +149,7 @@ $.fn.sticky = function(parameters) {
|
|
148
149
|
|
149
150
|
determineContext: function() {
|
150
151
|
if(settings.context) {
|
151
|
-
$context = [window,document].indexOf(settings.context) < 0 ? $
|
152
|
+
$context = [window,document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context);
|
152
153
|
}
|
153
154
|
else {
|
154
155
|
$context = $container;
|
@@ -430,13 +431,13 @@ $.fn.sticky = function(parameters) {
|
|
430
431
|
if( module.is.top() ) {
|
431
432
|
$module
|
432
433
|
.css('bottom', '')
|
433
|
-
.css('top', -scroll)
|
434
|
+
.css('top', (-scroll) + 'px')
|
434
435
|
;
|
435
436
|
}
|
436
437
|
if( module.is.bottom() ) {
|
437
438
|
$module
|
438
439
|
.css('top', '')
|
439
|
-
.css('bottom', scroll)
|
440
|
+
.css('bottom', scroll + 'px')
|
440
441
|
;
|
441
442
|
}
|
442
443
|
},
|
@@ -855,7 +856,7 @@ $.fn.sticky = function(parameters) {
|
|
855
856
|
}
|
856
857
|
});
|
857
858
|
}
|
858
|
-
if (
|
859
|
+
if ( isFunction( found ) ) {
|
859
860
|
response = found.apply(context, passedArguments);
|
860
861
|
}
|
861
862
|
else if(found !== undefined) {
|