diff --git a/components/accordion.css b/components/accordion.css index 13bee368..e9b104de 100755 --- a/components/accordion.css +++ b/components/accordion.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Accordion + * # Semantic UI 2.4.1 - Accordion * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/accordion.js b/components/accordion.js index c0b56aef..94e8830a 100755 --- a/components/accordion.js +++ b/components/accordion.js @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Accordion + * # Semantic UI 2.4.1 - Accordion * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/accordion.min.css b/components/accordion.min.css index a3fafa02..80a8e46f 100755 --- a/components/accordion.min.css +++ b/components/accordion.min.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Accordion + * # Semantic UI 2.4.1 - Accordion * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/accordion.min.js b/components/accordion.min.js index 391e5133..1dd73b80 100755 --- a/components/accordion.min.js +++ b/components/accordion.min.js @@ -1 +1 @@ -!function(e,n,t,i){"use strict";n=void 0!==n&&n.Math==Math?n:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.accordion=function(t){var o,a=e(this),s=(new Date).getTime(),l=[],r=arguments[0],c="string"==typeof r,u=[].slice.call(arguments,1);n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame;return a.each(function(){var d,g,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.accordion.settings,t):e.extend({},e.fn.accordion.settings),m=f.className,p=f.namespace,h=f.selector,v=f.error,b="."+p,y="module-"+p,C=a.selector||"",O=e(this),x=O.find(h.title),F=O.find(h.content),A=this,q=O.data(y);g={initialize:function(){g.debug("Initializing",O),g.bind.events(),f.observeChanges&&g.observeChanges(),g.instantiate()},instantiate:function(){q=g,O.data(y,g)},destroy:function(){g.debug("Destroying previous instance",O),O.off(b).removeData(y)},refresh:function(){x=O.find(h.title),F=O.find(h.content)},observeChanges:function(){"MutationObserver"in n&&((d=new MutationObserver(function(e){g.debug("DOM tree modified, updating selector cache"),g.refresh()})).observe(A,{childList:!0,subtree:!0}),g.debug("Setting up mutation observer",d))},bind:{events:function(){g.debug("Binding delegated events"),O.on(f.on+b,h.trigger,g.event.click)}},event:{click:function(){g.toggle.call(this)}},toggle:function(n){var t=n!==i?"number"==typeof n?x.eq(n):e(n).closest(h.title):e(this).closest(h.title),o=t.next(F),a=o.hasClass(m.animating),s=o.hasClass(m.active),l=s&&!a,r=!s&&a;g.debug("Toggling visibility of content",t),l||r?f.collapsible?g.close.call(t):g.debug("Cannot close accordion content collapsing is disabled"):g.open.call(t)},open:function(n){var t=n!==i?"number"==typeof n?x.eq(n):e(n).closest(h.title):e(this).closest(h.title),o=t.next(F),a=o.hasClass(m.animating);o.hasClass(m.active)||a?g.debug("Accordion already open, skipping",o):(g.debug("Opening accordion content",t),f.onOpening.call(o),f.onChanging.call(o),f.exclusive&&g.closeOthers.call(t),t.addClass(m.active),o.stop(!0,!0).addClass(m.animating),f.animateChildren&&(e.fn.transition!==i&&O.transition("is supported")?o.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:f.debug,verbose:f.verbose,duration:f.duration}):o.children().stop(!0,!0).animate({opacity:1},f.duration,g.resetOpacity)),o.slideDown(f.duration,f.easing,function(){o.removeClass(m.animating).addClass(m.active),g.reset.display.call(this),f.onOpen.call(this),f.onChange.call(this)}))},close:function(n){var t=n!==i?"number"==typeof n?x.eq(n):e(n).closest(h.title):e(this).closest(h.title),o=t.next(F),a=o.hasClass(m.animating),s=o.hasClass(m.active);!s&&!(!s&&a)||s&&a||(g.debug("Closing accordion content",o),f.onClosing.call(o),f.onChanging.call(o),t.removeClass(m.active),o.stop(!0,!0).addClass(m.animating),f.animateChildren&&(e.fn.transition!==i&&O.transition("is supported")?o.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:f.debug,verbose:f.verbose,duration:f.duration}):o.children().stop(!0,!0).animate({opacity:0},f.duration,g.resetOpacity)),o.slideUp(f.duration,f.easing,function(){o.removeClass(m.animating).removeClass(m.active),g.reset.display.call(this),f.onClose.call(this),f.onChange.call(this)}))},closeOthers:function(n){var t,o,a,s=n!==i?x.eq(n):e(this).closest(h.title),l=s.parents(h.content).prev(h.title),r=s.closest(h.accordion),c=h.title+"."+m.active+":visible",u=h.content+"."+m.active+":visible";f.closeNested?a=(t=r.find(c).not(l)).next(F):(t=r.find(c).not(l),o=r.find(u).find(c).not(l),a=(t=t.not(o)).next(F)),t.length>0&&(g.debug("Exclusive enabled, closing other content",t),t.removeClass(m.active),a.removeClass(m.animating).stop(!0,!0),f.animateChildren&&(e.fn.transition!==i&&O.transition("is supported")?a.children().transition({animation:"fade out",useFailSafe:!0,debug:f.debug,verbose:f.verbose,duration:f.duration}):a.children().stop(!0,!0).animate({opacity:0},f.duration,g.resetOpacity)),a.slideUp(f.duration,f.easing,function(){e(this).removeClass(m.active),g.reset.display.call(this)}))},reset:{display:function(){g.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){g.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(n,t){if(g.debug("Changing setting",n,t),e.isPlainObject(n))e.extend(!0,f,n);else{if(t===i)return f[n];e.isPlainObject(f[n])?e.extend(!0,f[n],t):f[n]=t}},internal:function(n,t){if(g.debug("Changing internal",n,t),t===i)return g[n];e.isPlainObject(n)?e.extend(!0,g,n):g[n]=t},debug:function(){!f.silent&&f.debug&&(f.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,f.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),g.verbose.apply(console,arguments)))},error:function(){f.silent||(g.error=Function.prototype.bind.call(console.error,console,f.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var n,t;f.performance&&(t=(n=(new Date).getTime())-(s||n),s=n,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":t})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var n=f.name+":",t=0;s=!1,clearTimeout(g.performance.timer),e.each(l,function(e,n){t+=n["Execution Time"]}),n+=" "+t+"ms",C&&(n+=" '"+C+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(n),console.table?console.table(l):e.each(l,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(n,t,a){var s,l,r,c=q;return t=t||u,a=A||a,"string"==typeof n&&c!==i&&(n=n.split(/[\. ]/),s=n.length-1,e.each(n,function(t,o){var a=t!=s?o+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(e.isPlainObject(c[a])&&t!=s)c=c[a];else{if(c[a]!==i)return l=c[a],!1;if(!e.isPlainObject(c[o])||t==s)return c[o]!==i?(l=c[o],!1):(g.error(v.method,n),!1);c=c[o]}})),e.isFunction(l)?r=l.apply(a,t):l!==i&&(r=l),e.isArray(o)?o.push(r):o!==i?o=[o,r]:r!==i&&(o=r),l}},c?(q===i&&g.initialize(),g.invoke(r)):(q!==i&&q.invoke("destroy"),g.initialize())}),o!==i?o:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},e.extend(e.easing,{easeOutQuad:function(e,n,t,i,o){return-i*(n/=o)*(n-2)+t}})}(jQuery,window,document); \ No newline at end of file +!function(F,A,e,q){"use strict";A=void 0!==A&&A.Math==Math?A:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.fn.accordion=function(a){var v,s=F(this),b=(new Date).getTime(),y=[],C=a,O="string"==typeof C,x=[].slice.call(arguments,1);A.requestAnimationFrame||A.mozRequestAnimationFrame||A.webkitRequestAnimationFrame||A.msRequestAnimationFrame;return s.each(function(){var e,c,u=F.isPlainObject(a)?F.extend(!0,{},F.fn.accordion.settings,a):F.extend({},F.fn.accordion.settings),d=u.className,n=u.namespace,g=u.selector,l=u.error,t="."+n,i="module-"+n,o=s.selector||"",f=F(this),m=f.find(g.title),p=f.find(g.content),r=this,h=f.data(i);c={initialize:function(){c.debug("Initializing",f),c.bind.events(),u.observeChanges&&c.observeChanges(),c.instantiate()},instantiate:function(){h=c,f.data(i,c)},destroy:function(){c.debug("Destroying previous instance",f),f.off(t).removeData(i)},refresh:function(){m=f.find(g.title),p=f.find(g.content)},observeChanges:function(){"MutationObserver"in A&&((e=new MutationObserver(function(e){c.debug("DOM tree modified, updating selector cache"),c.refresh()})).observe(r,{childList:!0,subtree:!0}),c.debug("Setting up mutation observer",e))},bind:{events:function(){c.debug("Binding delegated events"),f.on(u.on+t,g.trigger,c.event.click)}},event:{click:function(){c.toggle.call(this)}},toggle:function(e){var n=e!==q?"number"==typeof e?m.eq(e):F(e).closest(g.title):F(this).closest(g.title),t=n.next(p),i=t.hasClass(d.animating),o=t.hasClass(d.active),a=o&&!i,s=!o&&i;c.debug("Toggling visibility of content",n),a||s?u.collapsible?c.close.call(n):c.debug("Cannot close accordion content collapsing is disabled"):c.open.call(n)},open:function(e){var n=e!==q?"number"==typeof e?m.eq(e):F(e).closest(g.title):F(this).closest(g.title),t=n.next(p),i=t.hasClass(d.animating);t.hasClass(d.active)||i?c.debug("Accordion already open, skipping",t):(c.debug("Opening accordion content",n),u.onOpening.call(t),u.onChanging.call(t),u.exclusive&&c.closeOthers.call(n),n.addClass(d.active),t.stop(!0,!0).addClass(d.animating),u.animateChildren&&(F.fn.transition!==q&&f.transition("is supported")?t.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:u.debug,verbose:u.verbose,duration:u.duration}):t.children().stop(!0,!0).animate({opacity:1},u.duration,c.resetOpacity)),t.slideDown(u.duration,u.easing,function(){t.removeClass(d.animating).addClass(d.active),c.reset.display.call(this),u.onOpen.call(this),u.onChange.call(this)}))},close:function(e){var n=e!==q?"number"==typeof e?m.eq(e):F(e).closest(g.title):F(this).closest(g.title),t=n.next(p),i=t.hasClass(d.animating),o=t.hasClass(d.active);!o&&!(!o&&i)||o&&i||(c.debug("Closing accordion content",t),u.onClosing.call(t),u.onChanging.call(t),n.removeClass(d.active),t.stop(!0,!0).addClass(d.animating),u.animateChildren&&(F.fn.transition!==q&&f.transition("is supported")?t.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:u.debug,verbose:u.verbose,duration:u.duration}):t.children().stop(!0,!0).animate({opacity:0},u.duration,c.resetOpacity)),t.slideUp(u.duration,u.easing,function(){t.removeClass(d.animating).removeClass(d.active),c.reset.display.call(this),u.onClose.call(this),u.onChange.call(this)}))},closeOthers:function(e){var n,t,i,o=e!==q?m.eq(e):F(this).closest(g.title),a=o.parents(g.content).prev(g.title),s=o.closest(g.accordion),l=g.title+"."+d.active+":visible",r=g.content+"."+d.active+":visible";i=u.closeNested?(n=s.find(l).not(a)).next(p):(n=s.find(l).not(a),t=s.find(r).find(l).not(a),(n=n.not(t)).next(p)),00},expectingJSON:function(){return"json"===v.dataType||"jsonp"===v.dataType},form:function(){return k.is("form")||P.is("form")},mocked:function(){return v.mockResponse||v.mockResponseAsync||v.response||v.responseAsync},input:function(){return k.is("input")},loading:function(){return!!b.request&&"pending"==b.request.state()},abortedRequest:function(e){return e&&e.readyState!==n&&0===e.readyState?(b.verbose("XHR request determined to be aborted"),!0):(b.verbose("XHR request was not aborted"),!1)},validResponse:function(t){return b.is.expectingJSON()&&e.isFunction(v.successTest)?(b.debug("Checking JSON returned success",v.successTest,t),v.successTest(t)?(b.debug("Response passed success test",t),!0):(b.debug("Response failed success test",t),!1)):(b.verbose("Response is not JSON, skipping validation",v.successTest,t),!0)}},was:{cancelled:function(){return b.cancelled||!1},succesful:function(){return b.request&&"resolved"==b.request.state()},failure:function(){return b.request&&"rejected"==b.request.state()},complete:function(){return b.request&&("resolved"==b.request.state()||"rejected"==b.request.state())}},add:{urlData:function(t,r){var o,s;return t&&(o=t.match(v.regExp.required),s=t.match(v.regExp.optional),r=r||v.urlData,o&&(b.debug("Looking for required URL variables",o),e.each(o,function(o,s){var i=-1!==s.indexOf("$")?s.substr(2,s.length-3):s.substr(1,s.length-2),a=e.isPlainObject(r)&&r[i]!==n?r[i]:k.data(i)!==n?k.data(i):P.data(i)!==n?P.data(i):r[i];if(a===n)return b.error(R.requiredParameter,i,t),t=!1,!1;b.verbose("Found required variable",i,a),a=v.encodeParameters?b.get.urlEncodedValue(a):a,t=t.replace(s,a)})),s&&(b.debug("Looking for optional URL variables",o),e.each(s,function(o,s){var i=-1!==s.indexOf("$")?s.substr(3,s.length-4):s.substr(2,s.length-3),a=e.isPlainObject(r)&&r[i]!==n?r[i]:k.data(i)!==n?k.data(i):P.data(i)!==n?P.data(i):r[i];a!==n?(b.verbose("Optional variable Found",i,a),t=t.replace(s,a)):(b.verbose("Optional variable not found",i),t=-1!==t.indexOf("/"+s)?t.replace("/"+s,""):t.replace(s,""))}))),t},formData:function(t){var r=e.fn.serializeObject!==n,o=r?T.serializeObject():T.serialize();return t=t||v.data,e.isPlainObject(t)?r?(b.debug("Extending existing data with form data",t,o),t=e.extend(!0,{},t,o)):(b.error(R.missingSerialize),b.debug("Cant extend data. Replacing data with form data",t,o),t=o):(b.debug("Adding form data",o),t=o),t}},send:{request:function(){b.set.loading(),b.request=b.create.request(),b.is.mocked()?b.mockedXHR=b.create.mockedXHR():b.xhr=b.create.xhr(),v.onRequest.call(O,b.request,b.xhr)}},event:{trigger:function(e){b.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,r,n){var o=this,s=(new Date).getTime()-m,i=v.loadingDuration-s,a=!!e.isFunction(v.onResponse)&&(b.is.expectingJSON()?v.onResponse.call(o,e.extend(!0,{},t)):v.onResponse.call(o,t));i=i>0?i:0,a&&(b.debug("Modified API response in onResponse callback",v.onResponse,a,t),t=a),i>0&&b.debug("Response completed early delaying state change by",i),setTimeout(function(){b.is.validResponse(t)?b.request.resolveWith(o,[t,n]):b.request.rejectWith(o,[n,"invalid"])},i)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-m,s=v.loadingDuration-o;(s=s>0?s:0)>0&&b.debug("Response completed early delaying state change by",s),setTimeout(function(){b.is.abortedRequest(e)?b.request.rejectWith(n,[e,"aborted",r]):b.request.rejectWith(n,[e,"error",t,r])},s)}},request:{done:function(e,t){b.debug("Successful API Response",e),"local"===v.cache&&f&&(b.write.cachedResponse(f,e),b.debug("Saving server response locally",b.cache)),v.onSuccess.call(O,e,k,t)},complete:function(e,t){var r,n;b.was.succesful()?(n=e,r=t):(r=e,n=b.get.responseFromXHR(r)),b.remove.loading(),v.onComplete.call(O,n,k,r)},fail:function(e,t,r){var o=b.get.responseFromXHR(e),i=b.get.errorFromRequest(o,t,r);if("aborted"==t)return b.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),v.onAbort.call(O,t,k,e),!0;"invalid"==t?b.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"==t&&e!==n&&(b.debug("XHR produced a server error",t,r),200!=e.status&&r!==n&&""!==r&&b.error(R.statusMessage+r,s.url),v.onError.call(O,i,k,e)),v.errorDuration&&"aborted"!==t&&(b.debug("Adding error state"),b.set.error(),b.should.removeError()&&setTimeout(b.remove.error,v.errorDuration)),b.debug("API Request failed",i,e),v.onFailure.call(O,o,k,e)}}},create:{request:function(){return e.Deferred().always(b.event.request.complete).done(b.event.request.done).fail(b.event.request.fail)},mockedXHR:function(){var t,r,n,o=v.mockResponse||v.response,s=v.mockResponseAsync||v.responseAsync;return n=e.Deferred().always(b.event.xhr.complete).done(b.event.xhr.done).fail(b.event.xhr.fail),o?(e.isFunction(o)?(b.debug("Using specified synchronous callback",o),r=o.call(O,g)):(b.debug("Using settings specified response",o),r=o),n.resolveWith(O,[r,!1,{responseText:r}])):e.isFunction(s)&&(t=function(e){b.debug("Async callback returned response",e),e?n.resolveWith(O,[e,!1,{responseText:e}]):n.rejectWith(O,[{responseText:e},!1,!1])},b.debug("Using specified async response callback",s),s.call(O,g,t)),n},xhr:function(){var t;return t=e.ajax(s).always(b.event.xhr.always).done(b.event.xhr.done).fail(b.event.xhr.fail),b.verbose("Created server request",t,s),t}},set:{error:function(){b.verbose("Adding error state to element",P),P.addClass(x.error)},loading:function(){b.verbose("Adding loading state to element",P),P.addClass(x.loading),m=(new Date).getTime()}},remove:{error:function(){b.verbose("Removing error state from element",P),P.removeClass(x.error)},loading:function(){b.verbose("Removing loading state from element",P),P.removeClass(x.loading)}},get:{responseFromXHR:function(t){return!!e.isPlainObject(t)&&(b.is.expectingJSON()?b.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,r,o){return e.isPlainObject(t)&&t.error!==n?t.error:v.error[r]!==n?v.error[r]:o},request:function(){return b.request||!1},xhr:function(){return b.xhr||!1},settings:function(){var t;return(t=v.beforeSend.call(O,v))&&(t.success!==n&&(b.debug("Legacy success callback detected",t),b.error(R.legacyParameters,t.success),t.onSuccess=t.success),t.failure!==n&&(b.debug("Legacy failure callback detected",t),b.error(R.legacyParameters,t.failure),t.onFailure=t.failure),t.complete!==n&&(b.debug("Legacy complete callback detected",t),b.error(R.legacyParameters,t.complete),t.onComplete=t.complete)),t===n&&b.error(R.noReturnedValue),!1===t?t:t!==n?e.extend(!0,{},t):e.extend(!0,{},v)},urlEncodedValue:function(e){var r=t.decodeURIComponent(e),n=t.encodeURIComponent(e);return r!==e?(b.debug("URL value is already encoded, avoiding double encoding",e),e):(b.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var t={};return e.isWindow(j)||(b.is.input()?t.value=k.val():b.is.form()||(t.text=k.text())),t},event:function(){return e.isWindow(j)||"now"==v.on?(b.debug("API called without element, no events attached"),!1):"auto"==v.on?k.is("input")?j.oninput!==n?"input":j.onpropertychange!==n?"propertychange":"keyup":k.is("form")?"submit":"click":v.on},templatedURL:function(e){if(e=e||k.data(y.action)||v.action||!1,f=k.data(y.url)||v.url||!1)return b.debug("Using specified url",f),f;if(e){if(b.debug("Looking up url for action",e,v.api),v.api[e]===n&&!b.is.mocked())return void b.error(R.missingAction,v.action,v.api);f=v.api[e]}else b.is.form()&&(f=k.attr("action")||P.attr("action")||!1,b.debug("No url or action specified, defaulting to form action",f));return f}},abort:function(){var e=b.get.xhr();e&&"resolved"!==e.state()&&(b.debug("Cancelling API request"),e.abort())},reset:function(){b.remove.error(),b.remove.loading()},setting:function(t,r){if(b.debug("Changing setting",t,r),e.isPlainObject(t))e.extend(!0,v,t);else{if(r===n)return v[t];e.isPlainObject(v[t])?e.extend(!0,v[t],r):v[t]=r}},internal:function(t,r){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(r===n)return b[t];b[t]=r}},debug:function(){!v.silent&&v.debug&&(v.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,v.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),b.verbose.apply(console,arguments)))},error:function(){v.silent||(b.error=Function.prototype.bind.call(console.error,console,v.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,r;v.performance&&(r=(t=(new Date).getTime())-(a||t),a=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){var t=v.name+":",r=0;a=!1,clearTimeout(b.performance.timer),e.each(u,function(e,t){r+=t["Execution Time"]}),t+=" "+r+"ms",i&&(t+=" '"+i+"'"),(console.group!==n||console.table!==n)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,r,s){var i,a,u,c=w;return r=r||l,s=j||s,"string"==typeof t&&c!==n&&(t=t.split(/[\. ]/),i=t.length-1,e.each(t,function(r,o){var s=r!=i?o+t[r+1].charAt(0).toUpperCase()+t[r+1].slice(1):t;if(e.isPlainObject(c[s])&&r!=i)c=c[s];else{if(c[s]!==n)return a=c[s],!1;if(!e.isPlainObject(c[o])||r==i)return c[o]!==n?(a=c[o],!1):(b.error(R.method,t),!1);c=c[o]}})),e.isFunction(a)?u=a.apply(s,r):a!==n&&(u=a),e.isArray(o)?o.push(u):o!==n?o=[o,u]:u!==n&&(o=u),a}},d?(w===n&&b.initialize(),b.invoke(c)):(w!==n&&w.invoke("destroy"),b.initialize())}),o!==n?o:this},e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document); \ No newline at end of file +!function(j,O,e,w){"use strict";O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();j.api=j.fn.api=function(q){var R,e=j.isFunction(this)?j(O):j(this),x=e.selector||"",S=(new Date).getTime(),A=[],k=q,T="string"==typeof k,P=[].slice.call(arguments,1);return e.each(function(){var s,i,r,e,a,u,c=j.isPlainObject(q)?j.extend(!0,{},j.fn.api.settings,q):j.extend({},j.fn.api.settings),t=c.namespace,n=c.metadata,o=c.selector,d=c.error,l=c.className,g="."+t,f="module-"+t,p=j(this),m=p.closest(o.form),b=c.stateContext?j(c.stateContext):p,v=this,h=b[0],y=p.data(f);u={initialize:function(){T||u.bind.events(),u.instantiate()},instantiate:function(){u.verbose("Storing instance of module",u),y=u,p.data(f,y)},destroy:function(){u.verbose("Destroying previous module for",v),p.removeData(f).off(g)},bind:{events:function(){var e=u.get.event();e?(u.verbose("Attaching API events to element",e),p.on(e+g,u.event.trigger)):"now"==c.on&&(u.debug("Querying API endpoint immediately"),u.query())}},decode:{json:function(e){if(e!==w&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(O.Storage!==w)return t=sessionStorage.getItem(e),u.debug("Using cached response",e,t),t=u.decode.json(t);u.error(d.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?u.debug("Response empty, not caching",t):O.Storage!==w?(j.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e,t),u.verbose("Storing cached response for url",e,t)):u.error(d.noStorage)}},query:function(){if(u.is.disabled())u.debug("Element is disabled API request aborted");else{if(u.is.loading()){if(!c.interruptRequests)return void u.debug("Cancelling request, previous request is still pending");u.debug("Interrupting previous request"),u.abort()}if(c.defaultData&&j.extend(!0,c.urlData,u.get.defaultData()),c.serializeForm&&(c.data=u.add.formData(c.data)),!1===(i=u.get.settings()))return u.cancelled=!0,void u.error(d.beforeSend);if(u.cancelled=!1,(r=u.get.templatedURL())||u.is.mocked()){if((r=u.add.urlData(r))||u.is.mocked()){if(i.url=c.base+r,s=j.extend(!0,{},c,{type:c.method||c.type,data:e,url:c.base+r,beforeSend:c.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),u.debug("Querying URL",s.url),u.verbose("Using AJAX settings",s),"local"===c.cache&&u.read.cachedResponse(r))return u.debug("Response returned from local cache"),u.request=u.create.request(),void u.request.resolveWith(h,[u.read.cachedResponse(r)]);c.throttle?c.throttleFirstRequest||u.timer?(u.debug("Throttling request",c.throttle),clearTimeout(u.timer),u.timer=setTimeout(function(){u.timer&&delete u.timer,u.debug("Sending throttled request",e,s.method),u.send.request()},c.throttle)):(u.debug("Sending request",e,s.method),u.send.request(),u.timer=setTimeout(function(){},c.throttle)):(u.debug("Sending request",e,s.method),u.send.request())}}else u.error(d.missingURL)}},should:{removeError:function(){return!0===c.hideError||"auto"===c.hideError&&!u.is.form()}},is:{disabled:function(){return 0 .button { - width: 12.500%; + width: 12.5%; } .ui.nine.buttons { width: 100%; @@ -1249,7 +1249,7 @@ height: 14.285%; } .ui.eight.vertical.buttons > .button { - height: 12.500%; + height: 12.5%; } .ui.nine.vertical.buttons > .button { height: 11.11%; diff --git a/components/button.min.css b/components/button.min.css index bd326eb9..9e093e85 100755 --- a/components/button.min.css +++ b/components/button.min.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Button + * # Semantic UI 2.4.1 - Button * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/card.css b/components/card.css index 20d70a29..da7add2f 100755 --- a/components/card.css +++ b/components/card.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Item + * # Semantic UI 2.4.1 - Item * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/card.min.css b/components/card.min.css index fa708c61..573b260d 100755 --- a/components/card.min.css +++ b/components/card.min.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Item + * # Semantic UI 2.4.1 - Item * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/checkbox.css b/components/checkbox.css index 7059c0b4..0746f5c9 100755 --- a/components/checkbox.css +++ b/components/checkbox.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Checkbox + * # Semantic UI 2.4.1 - Checkbox * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/checkbox.js b/components/checkbox.js index dded09fd..d97d5e3d 100755 --- a/components/checkbox.js +++ b/components/checkbox.js @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Checkbox + * # Semantic UI 2.4.1 - Checkbox * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/checkbox.min.css b/components/checkbox.min.css index d17f6263..312c96d2 100755 --- a/components/checkbox.min.css +++ b/components/checkbox.min.css @@ -1,5 +1,5 @@ /*! - * # Semantic UI 2.4.0 - Checkbox + * # Semantic UI 2.4.1 - Checkbox * http://github.com/semantic-org/semantic-ui/ * * diff --git a/components/checkbox.min.js b/components/checkbox.min.js index 9d056b15..e38167fe 100755 --- a/components/checkbox.min.js +++ b/components/checkbox.min.js @@ -1 +1 @@ -!function(e,n,t,i){"use strict";n=void 0!==n&&n.Math==Math?n:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.checkbox=function(o){var a,c=e(this),r=c.selector||"",l=(new Date).getTime(),d=[],s=arguments[0],u="string"==typeof s,b=[].slice.call(arguments,1);return c.each(function(){var c,h,g=e.extend(!0,{},e.fn.checkbox.settings,o),f=g.className,p=g.namespace,k=g.selector,m=g.error,v="."+p,y="module-"+p,C=e(this),x=e(this).children(k.label),w=e(this).children(k.input),I=w[0],D=!1,S=!1,E=C.data(y),O=this;h={initialize:function(){h.verbose("Initializing checkbox",g),h.create.label(),h.bind.events(),h.set.tabbable(),h.hide.input(),h.observeChanges(),h.instantiate(),h.setup()},instantiate:function(){h.verbose("Storing instance of module",h),E=h,C.data(y,h)},destroy:function(){h.verbose("Destroying module"),h.unbind.events(),h.show.input(),C.removeData(y)},fix:{reference:function(){C.is(k.input)&&(h.debug("Behavior called on adjusting invoked element"),C=C.closest(k.checkbox),h.refresh())}},setup:function(){h.set.initialLoad(),h.is.indeterminate()?(h.debug("Initial value is indeterminate"),h.indeterminate()):h.is.checked()?(h.debug("Initial value is checked"),h.check()):(h.debug("Initial value is unchecked"),h.uncheck()),h.remove.initialLoad()},refresh:function(){x=C.children(k.label),w=C.children(k.input),I=w[0]},hide:{input:function(){h.verbose("Modifying z-index to be unselectable"),w.addClass(f.hidden)}},show:{input:function(){h.verbose("Modifying z-index to be selectable"),w.removeClass(f.hidden)}},observeChanges:function(){"MutationObserver"in n&&((c=new MutationObserver(function(e){h.debug("DOM tree modified, updating selector cache"),h.refresh()})).observe(O,{childList:!0,subtree:!0}),h.debug("Setting up mutation observer",c))},attachEvents:function(n,t){var i=e(n);t=e.isFunction(h[t])?h[t]:h.toggle,i.length>0?(h.debug("Attaching checkbox events to element",n,t),i.on("click"+v,t)):h.error(m.notFound)},event:{click:function(n){var t=e(n.target);t.is(k.input)?h.verbose("Using default check action on initialized checkbox"):t.is(k.link)?h.debug("Clicking link inside checkbox, skipping toggle"):(h.toggle(),w.focus(),n.preventDefault())},keydown:function(e){var n=e.which,t=13,i=32;n==27?(h.verbose("Escape key pressed blurring field"),w.blur(),S=!0):e.ctrlKey||n!=i&&n!=t?S=!1:(h.verbose("Enter/space key pressed, toggling checkbox"),h.toggle(),S=!0)},keyup:function(e){S&&e.preventDefault()}},check:function(){h.should.allowCheck()&&(h.debug("Checking checkbox",w),h.set.checked(),h.should.ignoreCallbacks()||(g.onChecked.call(I),g.onChange.call(I)))},uncheck:function(){h.should.allowUncheck()&&(h.debug("Unchecking checkbox"),h.set.unchecked(),h.should.ignoreCallbacks()||(g.onUnchecked.call(I),g.onChange.call(I)))},indeterminate:function(){h.should.allowIndeterminate()?h.debug("Checkbox is already indeterminate"):(h.debug("Making checkbox indeterminate"),h.set.indeterminate(),h.should.ignoreCallbacks()||(g.onIndeterminate.call(I),g.onChange.call(I)))},determinate:function(){h.should.allowDeterminate()?h.debug("Checkbox is already determinate"):(h.debug("Making checkbox determinate"),h.set.determinate(),h.should.ignoreCallbacks()||(g.onDeterminate.call(I),g.onChange.call(I)))},enable:function(){h.is.enabled()?h.debug("Checkbox is already enabled"):(h.debug("Enabling checkbox"),h.set.enabled(),g.onEnable.call(I),g.onEnabled.call(I))},disable:function(){h.is.disabled()?h.debug("Checkbox is already disabled"):(h.debug("Disabling checkbox"),h.set.disabled(),g.onDisable.call(I),g.onDisabled.call(I))},get:{radios:function(){var n=h.get.name();return e('input[name="'+n+'"]').closest(k.checkbox)},otherRadios:function(){return h.get.radios().not(C)},name:function(){return w.attr("name")}},is:{initialLoad:function(){return D},radio:function(){return w.hasClass(f.radio)||"radio"==w.attr("type")},indeterminate:function(){return w.prop("indeterminate")!==i&&w.prop("indeterminate")},checked:function(){return w.prop("checked")!==i&&w.prop("checked")},disabled:function(){return w.prop("disabled")!==i&&w.prop("disabled")},enabled:function(){return!h.is.disabled()},determinate:function(){return!h.is.indeterminate()},unchecked:function(){return!h.is.checked()}},should:{allowCheck:function(){return h.is.determinate()&&h.is.checked()&&!h.should.forceCallbacks()?(h.debug("Should not allow check, checkbox is already checked"),!1):!1!==g.beforeChecked.apply(I)||(h.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return h.is.determinate()&&h.is.unchecked()&&!h.should.forceCallbacks()?(h.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!1!==g.beforeUnchecked.apply(I)||(h.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return h.is.indeterminate()&&!h.should.forceCallbacks()?(h.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!1!==g.beforeIndeterminate.apply(I)||(h.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return h.is.determinate()&&!h.should.forceCallbacks()?(h.debug("Should not allow determinate, checkbox is already determinate"),!1):!1!==g.beforeDeterminate.apply(I)||(h.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return h.is.initialLoad()&&g.fireOnInit},ignoreCallbacks:function(){return D&&!g.fireOnInit}},can:{change:function(){return!(C.hasClass(f.disabled)||C.hasClass(f.readOnly)||w.prop("disabled")||w.prop("readonly"))},uncheck:function(){return"boolean"==typeof g.uncheckable?g.uncheckable:!h.is.radio()}},set:{initialLoad:function(){D=!0},checked:function(){h.verbose("Setting class to checked"),C.removeClass(f.indeterminate).addClass(f.checked),h.is.radio()&&h.uncheckOthers(),h.is.indeterminate()||!h.is.checked()?(h.verbose("Setting state to checked",I),w.prop("indeterminate",!1).prop("checked",!0),h.trigger.change()):h.debug("Input is already checked, skipping input property change")},unchecked:function(){h.verbose("Removing checked class"),C.removeClass(f.indeterminate).removeClass(f.checked),h.is.indeterminate()||!h.is.unchecked()?(h.debug("Setting state to unchecked"),w.prop("indeterminate",!1).prop("checked",!1),h.trigger.change()):h.debug("Input is already unchecked")},indeterminate:function(){h.verbose("Setting class to indeterminate"),C.addClass(f.indeterminate),h.is.indeterminate()?h.debug("Input is already indeterminate, skipping input property change"):(h.debug("Setting state to indeterminate"),w.prop("indeterminate",!0),h.trigger.change())},determinate:function(){h.verbose("Removing indeterminate class"),C.removeClass(f.indeterminate),h.is.determinate()?h.debug("Input is already determinate, skipping input property change"):(h.debug("Setting state to determinate"),w.prop("indeterminate",!1))},disabled:function(){h.verbose("Setting class to disabled"),C.addClass(f.disabled),h.is.disabled()?h.debug("Input is already disabled, skipping input property change"):(h.debug("Setting state to disabled"),w.prop("disabled","disabled"),h.trigger.change())},enabled:function(){h.verbose("Removing disabled class"),C.removeClass(f.disabled),h.is.enabled()?h.debug("Input is already enabled, skipping input property change"):(h.debug("Setting state to enabled"),w.prop("disabled",!1),h.trigger.change())},tabbable:function(){h.verbose("Adding tabindex to checkbox"),w.attr("tabindex")===i&&w.attr("tabindex",0)}},remove:{initialLoad:function(){D=!1}},trigger:{change:function(){var e=t.createEvent("HTMLEvents"),n=w[0];n&&(h.verbose("Triggering native change event"),e.initEvent("change",!0,!1),n.dispatchEvent(e))}},create:{label:function(){w.prevAll(k.label).length>0?(w.prev(k.label).detach().insertAfter(w),h.debug("Moving existing label",x)):h.has.label()||(x=e("