semantic-ui-css
Advanced tools
Comparing version 1.9.3 to 1.10.1
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
@@ -138,9 +138,13 @@ /* | ||
// call beforesend and get any settings changes | ||
requestSettings = module.get.settings(); | ||
requestSettings = module.get.settings(); | ||
// check if beforesend cancelled request | ||
// check if before send cancelled request | ||
if(requestSettings === false) { | ||
module.cancelled = true; | ||
module.error(error.beforeSend); | ||
return; | ||
} | ||
else { | ||
module.cancelled = false; | ||
} | ||
@@ -216,2 +220,5 @@ if(settings.url) { | ||
was: { | ||
cancelled: function() { | ||
return (module.cancelled || false); | ||
}, | ||
succesful: function() { | ||
@@ -218,0 +225,0 @@ return (module.request && module.request.state() == 'resolved'); |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -11,2 +11,2 @@ * http://www.semantic-ui.com/ | ||
*/ | ||
!function(e,t,r,n){e.api=e.fn.api=function(r){var o,a=e(e.isFunction(this)?t:this),i=a.selector||"",s=(new Date).getTime(),u=[],c=arguments[0],l="string"==typeof c,d=[].slice.call(arguments,1);return a.each(function(){var t,a,f,g,m,p=e.isPlainObject(r)?e.extend(!0,{},e.fn.api.settings,r):e.extend({},e.fn.api.settings),b=p.namespace,v=p.metadata,h=p.selector,y=p.error,q=p.className,x="."+b,A="module-"+b,D=e(this),P=D.closest(h.form),R=p.stateContext?e(p.stateContext):D,T=this,S=R.get(),j=D.data(A);m={initialize:function(){var e=m.get.event();l||(e?(m.debug("Attaching API events to element",e),D.on(e+x,m.event.trigger)):"now"==p.on&&(m.debug("Querying API now",e),m.query())),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),j=m,D.data(A,j)},destroy:function(){m.verbose("Destroying previous module for",T),D.removeData(A).off(x)},query:function(){if(m.is.disabled())return void m.debug("Element is disabled API request aborted");if(m.is.loading()&&0===p.throttle)return void m.debug("Cancelling request, previous request is still pending");if(p.defaultData&&e.extend(!0,p.urlData,m.get.defaultData()),(p.serializeForm!==!1||R.is("form"))&&("json"==p.serializeForm?e.extend(!0,p.data,m.get.formData()):p.data=m.get.formData()),a=m.get.settings(),a===!1)return void m.error(y.beforeSend);if(p.url?(m.debug("Using specified url",f),f=m.add.urlData(p.url)):(f=m.add.urlData(m.get.templateURL()),m.debug("Added URL Data to url",f)),!f){if(!D.is("form"))return void m.error(y.missingURL,p.action);m.debug("No url or action specified, defaulting to form action"),f=D.attr("action")}m.set.loading(),t=e.extend(!0,{},p,{type:p.method||p.type,data:g,url:p.base+f,beforeSend:p.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),m.debug("Querying URL",t.url),m.debug("Sending data",g,t.method),m.verbose("Using AJAX settings",t),m.is.loading()?m.timer=setTimeout(function(){m.request=m.create.request(),m.xhr=m.create.xhr(),p.onRequest.call(S,m.request,m.xhr)},p.throttle):(m.request=m.create.request(),m.xhr=m.create.xhr(),p.onRequest.call(S,m.request,m.xhr))},is:{disabled:function(){return D.filter(p.filter).length>0},loading:function(){return m.request&&"pending"==m.request.state()}},was:{succesful:function(){return m.request&&"resolved"==m.request.state()},failure:function(){return m.request&&"rejected"==m.request.state()},complete:function(){return m.request&&("resolved"==m.request.state()||"rejected"==m.request.state())}},add:{urlData:function(t,r){var o,a;return t&&(o=t.match(p.regExp.required),a=t.match(p.regExp.optional),r=r||p.urlData,o&&(m.debug("Looking for required URL variables",o),e.each(o,function(o,a){var i=-1!==a.indexOf("$")?a.substr(2,a.length-3):a.substr(1,a.length-2),s=e.isPlainObject(r)&&r[i]!==n?r[i]:D.data(i)!==n?D.data(i):R.data(i)!==n?R.data(i):r[i];return s===n?(m.error(y.requiredParameter,i,t),t=!1,!1):(m.verbose("Found required variable",i,s),void(t=t.replace(a,s)))})),a&&(m.debug("Looking for optional URL variables",o),e.each(a,function(o,a){var i=-1!==a.indexOf("$")?a.substr(3,a.length-4):a.substr(2,a.length-3),s=e.isPlainObject(r)&&r[i]!==n?r[i]:D.data(i)!==n?D.data(i):R.data(i)!==n?R.data(i):r[i];s!==n?(m.verbose("Optional variable Found",i,s),t=t.replace(a,s)):(m.verbose("Optional variable not found",i),t=-1!==t.indexOf("/"+a)?t.replace("/"+a,""):t.replace(a,""))}))),t}},event:{trigger:function(e){m.query(),("submit"==e.type||"click"==e.type)&&e.preventDefault()},xhr:{always:function(){},done:function(e){var t=this,r=(new Date).getTime()-s,n=p.loadingDuration-r;n=n>0?n:0,setTimeout(function(){m.request.resolveWith(t,[e])},n)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-s,a=p.loadingDuration-o;a=a>0?a:0,setTimeout(function(){"abort"!==t?m.request.rejectWith(n,[e,t,r]):m.reset()},a)}},request:{complete:function(e){m.remove.loading(),p.onComplete.call(S,e,D)},done:function(t){m.debug("API Response Received",t),"json"==p.dataType&&e.isFunction(p.successTest)?(m.debug("Checking JSON returned success",p.successTest,t),p.successTest(t)?p.onSuccess.call(S,t,D):(m.debug("JSON test specified by user and response failed",t),p.onFailure.call(S,t,D))):p.onSuccess.call(S,t,D)},error:function(r,o,a){var i,s=p.error[o]!==n?p.error[o]:a;if(r!==n)if(r.readyState!==n&&4==r.readyState){if(200!=r.status&&a!==n&&""!==a)m.error(y.statusMessage+a,t.url);else if("error"==o&&"json"==p.dataType)try{i=e.parseJSON(r.responseText),i&&i.error!==n&&(s=i.error)}catch(u){m.error(y.JSONParse)}m.remove.loading(),m.set.error(),p.errorDuration&&setTimeout(m.remove.error,p.errorDuration),m.debug("API Request error:",s),p.onError.call(S,s,D)}else p.onAbort.call(S,s,D),m.debug("Request Aborted (Most likely caused by page change or CORS Policy)",o,a)}}},create:{request:function(){return e.Deferred().always(m.event.request.complete).done(m.event.request.done).fail(m.event.request.error)},xhr:function(){return e.ajax(t).always(m.event.xhr.always).done(m.event.xhr.done).fail(m.event.xhr.fail)}},set:{error:function(){m.verbose("Adding error state to element",R),R.addClass(q.error)},loading:function(){m.verbose("Adding loading state to element",R),R.addClass(q.loading)}},remove:{error:function(){m.verbose("Removing error state from element",R),R.removeClass(q.error)},loading:function(){m.verbose("Removing loading state from element",R),R.removeClass(q.loading)}},get:{request:function(){return m.request||!1},xhr:function(){return m.xhr||!1},settings:function(){var e;return e=p.beforeSend.call(D,p),e&&(e.success!==n&&(m.debug("Legacy success callback detected",e),m.error(y.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==n&&(m.debug("Legacy failure callback detected",e),m.error(y.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==n&&(m.debug("Legacy complete callback detected",e),m.error(y.legacyParameters,e.complete),e.onComplete=e.complete)),e===n&&m.error(y.noReturnedValue),e!==n?e:p},defaultData:function(){var t={};return e.isWindow(T)||(D.is("input")?t.value=D.val():D.is("form")||(t.text=D.text())),t},event:function(){return e.isWindow(T)||"now"==p.on?(m.debug("API called without element, no events attached"),!1):"auto"==p.on?D.is("input")?T.oninput!==n?"input":T.onpropertychange!==n?"propertychange":"keyup":D.is("form")?"submit":"click":p.on},formData:function(){var t;return e(this).serializeObject()!==n?t=P.serializeObject():(m.error(y.missingSerialize),t=P.serialize()),m.debug("Retrieved form data",t),t},templateURL:function(e){var t;return e=e||D.data(v.action)||p.action||!1,e&&(m.debug("Looking up url for action",e,p.api),p.api[e]!==n?(t=p.api[e],m.debug("Found template url",t)):m.error(y.missingAction,p.action,p.api)),t}},abort:function(){var e=m.get.xhr();e&&"resolved"!==e.state()&&(m.debug("Cancelling API request"),e.abort(),m.request.rejectWith(p.apiSettings))},reset:function(){m.remove.error(),m.remove.loading()},setting:function(t,r){if(m.debug("Changing setting",t,r),e.isPlainObject(t))e.extend(!0,p,t);else{if(r===n)return p[t];p[t]=r}},internal:function(t,r){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(r===n)return m[t];m[t]=r}},debug:function(){p.debug&&(p.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,p.name+":"),m.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,p.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var t,r,n;p.performance&&(t=(new Date).getTime(),n=s||t,r=t-n,s=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var t=p.name+":",r=0;s=!1,clearTimeout(m.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,a){var i,s,u,c=j;return r=r||d,a=T||a,"string"==typeof t&&c!==n&&(t=t.split(/[\. ]/),i=t.length-1,e.each(t,function(r,o){var a=r!=i?o+t[r+1].charAt(0).toUpperCase()+t[r+1].slice(1):t;if(e.isPlainObject(c[a])&&r!=i)c=c[a];else{if(c[a]!==n)return s=c[a],!1;if(!e.isPlainObject(c[o])||r==i)return c[o]!==n?(s=c[o],!1):(m.error(y.method,t),!1);c=c[o]}})),e.isFunction(s)?u=s.apply(a,r):s!==n&&(u=s),e.isArray(o)?o.push(u):o!==n?o=[o,u]:u!==n&&(o=u),s}},l?(j===n&&m.initialize(),m.invoke(c)):(j!==n&&j.invoke("destroy"),m.initialize())}),o!==n?o:this},e.api.settings={name:"API",namespace:"api",debug:!0,verbose:!1,performance:!0,on:"auto",filter:".disabled",stateContext:!1,loadingDuration:0,errorDuration:2e3,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,method:"get",data:{},dataType:"json",beforeSend:function(e){return e},beforeXHR:function(){},onRequest:function(){},onSuccess:function(){},onComplete:function(){},onFailure:function(){},onError:function(){},onAbort:function(){},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:"Required dependency jquery-serialize-object missing, using basic serialize",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",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:{form:"form"},metadata:{action:"action"}},e.api.settings.api={}}(jQuery,window,document); | ||
!function(e,t,r,n){e.api=e.fn.api=function(r){var o,a=e(e.isFunction(this)?t:this),i=a.selector||"",s=(new Date).getTime(),u=[],c=arguments[0],l="string"==typeof c,d=[].slice.call(arguments,1);return a.each(function(){var t,a,f,g,m,p=e.isPlainObject(r)?e.extend(!0,{},e.fn.api.settings,r):e.extend({},e.fn.api.settings),b=p.namespace,v=p.metadata,h=p.selector,y=p.error,q=p.className,x="."+b,A="module-"+b,D=e(this),P=D.closest(h.form),R=p.stateContext?e(p.stateContext):D,T=this,S=R.get(),j=D.data(A);m={initialize:function(){var e=m.get.event();l||(e?(m.debug("Attaching API events to element",e),D.on(e+x,m.event.trigger)):"now"==p.on&&(m.debug("Querying API now",e),m.query())),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),j=m,D.data(A,j)},destroy:function(){m.verbose("Destroying previous module for",T),D.removeData(A).off(x)},query:function(){if(m.is.disabled())return void m.debug("Element is disabled API request aborted");if(m.is.loading()&&0===p.throttle)return void m.debug("Cancelling request, previous request is still pending");if(p.defaultData&&e.extend(!0,p.urlData,m.get.defaultData()),(p.serializeForm!==!1||R.is("form"))&&("json"==p.serializeForm?e.extend(!0,p.data,m.get.formData()):p.data=m.get.formData()),a=m.get.settings(),a===!1)return m.cancelled=!0,void m.error(y.beforeSend);if(m.cancelled=!1,p.url?(m.debug("Using specified url",f),f=m.add.urlData(p.url)):(f=m.add.urlData(m.get.templateURL()),m.debug("Added URL Data to url",f)),!f){if(!D.is("form"))return void m.error(y.missingURL,p.action);m.debug("No url or action specified, defaulting to form action"),f=D.attr("action")}m.set.loading(),t=e.extend(!0,{},p,{type:p.method||p.type,data:g,url:p.base+f,beforeSend:p.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),m.debug("Querying URL",t.url),m.debug("Sending data",g,t.method),m.verbose("Using AJAX settings",t),m.is.loading()?m.timer=setTimeout(function(){m.request=m.create.request(),m.xhr=m.create.xhr(),p.onRequest.call(S,m.request,m.xhr)},p.throttle):(m.request=m.create.request(),m.xhr=m.create.xhr(),p.onRequest.call(S,m.request,m.xhr))},is:{disabled:function(){return D.filter(p.filter).length>0},loading:function(){return m.request&&"pending"==m.request.state()}},was:{cancelled:function(){return m.cancelled||!1},succesful:function(){return m.request&&"resolved"==m.request.state()},failure:function(){return m.request&&"rejected"==m.request.state()},complete:function(){return m.request&&("resolved"==m.request.state()||"rejected"==m.request.state())}},add:{urlData:function(t,r){var o,a;return t&&(o=t.match(p.regExp.required),a=t.match(p.regExp.optional),r=r||p.urlData,o&&(m.debug("Looking for required URL variables",o),e.each(o,function(o,a){var i=-1!==a.indexOf("$")?a.substr(2,a.length-3):a.substr(1,a.length-2),s=e.isPlainObject(r)&&r[i]!==n?r[i]:D.data(i)!==n?D.data(i):R.data(i)!==n?R.data(i):r[i];return s===n?(m.error(y.requiredParameter,i,t),t=!1,!1):(m.verbose("Found required variable",i,s),void(t=t.replace(a,s)))})),a&&(m.debug("Looking for optional URL variables",o),e.each(a,function(o,a){var i=-1!==a.indexOf("$")?a.substr(3,a.length-4):a.substr(2,a.length-3),s=e.isPlainObject(r)&&r[i]!==n?r[i]:D.data(i)!==n?D.data(i):R.data(i)!==n?R.data(i):r[i];s!==n?(m.verbose("Optional variable Found",i,s),t=t.replace(a,s)):(m.verbose("Optional variable not found",i),t=-1!==t.indexOf("/"+a)?t.replace("/"+a,""):t.replace(a,""))}))),t}},event:{trigger:function(e){m.query(),("submit"==e.type||"click"==e.type)&&e.preventDefault()},xhr:{always:function(){},done:function(e){var t=this,r=(new Date).getTime()-s,n=p.loadingDuration-r;n=n>0?n:0,setTimeout(function(){m.request.resolveWith(t,[e])},n)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-s,a=p.loadingDuration-o;a=a>0?a:0,setTimeout(function(){"abort"!==t?m.request.rejectWith(n,[e,t,r]):m.reset()},a)}},request:{complete:function(e){m.remove.loading(),p.onComplete.call(S,e,D)},done:function(t){m.debug("API Response Received",t),"json"==p.dataType&&e.isFunction(p.successTest)?(m.debug("Checking JSON returned success",p.successTest,t),p.successTest(t)?p.onSuccess.call(S,t,D):(m.debug("JSON test specified by user and response failed",t),p.onFailure.call(S,t,D))):p.onSuccess.call(S,t,D)},error:function(r,o,a){var i,s=p.error[o]!==n?p.error[o]:a;if(r!==n)if(r.readyState!==n&&4==r.readyState){if(200!=r.status&&a!==n&&""!==a)m.error(y.statusMessage+a,t.url);else if("error"==o&&"json"==p.dataType)try{i=e.parseJSON(r.responseText),i&&i.error!==n&&(s=i.error)}catch(u){m.error(y.JSONParse)}m.remove.loading(),m.set.error(),p.errorDuration&&setTimeout(m.remove.error,p.errorDuration),m.debug("API Request error:",s),p.onError.call(S,s,D)}else p.onAbort.call(S,s,D),m.debug("Request Aborted (Most likely caused by page change or CORS Policy)",o,a)}}},create:{request:function(){return e.Deferred().always(m.event.request.complete).done(m.event.request.done).fail(m.event.request.error)},xhr:function(){return e.ajax(t).always(m.event.xhr.always).done(m.event.xhr.done).fail(m.event.xhr.fail)}},set:{error:function(){m.verbose("Adding error state to element",R),R.addClass(q.error)},loading:function(){m.verbose("Adding loading state to element",R),R.addClass(q.loading)}},remove:{error:function(){m.verbose("Removing error state from element",R),R.removeClass(q.error)},loading:function(){m.verbose("Removing loading state from element",R),R.removeClass(q.loading)}},get:{request:function(){return m.request||!1},xhr:function(){return m.xhr||!1},settings:function(){var e;return e=p.beforeSend.call(D,p),e&&(e.success!==n&&(m.debug("Legacy success callback detected",e),m.error(y.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==n&&(m.debug("Legacy failure callback detected",e),m.error(y.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==n&&(m.debug("Legacy complete callback detected",e),m.error(y.legacyParameters,e.complete),e.onComplete=e.complete)),e===n&&m.error(y.noReturnedValue),e!==n?e:p},defaultData:function(){var t={};return e.isWindow(T)||(D.is("input")?t.value=D.val():D.is("form")||(t.text=D.text())),t},event:function(){return e.isWindow(T)||"now"==p.on?(m.debug("API called without element, no events attached"),!1):"auto"==p.on?D.is("input")?T.oninput!==n?"input":T.onpropertychange!==n?"propertychange":"keyup":D.is("form")?"submit":"click":p.on},formData:function(){var t;return e(this).serializeObject()!==n?t=P.serializeObject():(m.error(y.missingSerialize),t=P.serialize()),m.debug("Retrieved form data",t),t},templateURL:function(e){var t;return e=e||D.data(v.action)||p.action||!1,e&&(m.debug("Looking up url for action",e,p.api),p.api[e]!==n?(t=p.api[e],m.debug("Found template url",t)):m.error(y.missingAction,p.action,p.api)),t}},abort:function(){var e=m.get.xhr();e&&"resolved"!==e.state()&&(m.debug("Cancelling API request"),e.abort(),m.request.rejectWith(p.apiSettings))},reset:function(){m.remove.error(),m.remove.loading()},setting:function(t,r){if(m.debug("Changing setting",t,r),e.isPlainObject(t))e.extend(!0,p,t);else{if(r===n)return p[t];p[t]=r}},internal:function(t,r){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(r===n)return m[t];m[t]=r}},debug:function(){p.debug&&(p.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,p.name+":"),m.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,p.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var t,r,n;p.performance&&(t=(new Date).getTime(),n=s||t,r=t-n,s=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,100)},display:function(){var t=p.name+":",r=0;s=!1,clearTimeout(m.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,a){var i,s,u,c=j;return r=r||d,a=T||a,"string"==typeof t&&c!==n&&(t=t.split(/[\. ]/),i=t.length-1,e.each(t,function(r,o){var a=r!=i?o+t[r+1].charAt(0).toUpperCase()+t[r+1].slice(1):t;if(e.isPlainObject(c[a])&&r!=i)c=c[a];else{if(c[a]!==n)return s=c[a],!1;if(!e.isPlainObject(c[o])||r==i)return c[o]!==n?(s=c[o],!1):(m.error(y.method,t),!1);c=c[o]}})),e.isFunction(s)?u=s.apply(a,r):s!==n&&(u=s),e.isArray(o)?o.push(u):o!==n?o=[o,u]:u!==n&&(o=u),s}},l?(j===n&&m.initialize(),m.invoke(c)):(j!==n&&j.invoke("destroy"),m.initialize())}),o!==n?o:this},e.api.settings={name:"API",namespace:"api",debug:!0,verbose:!1,performance:!0,on:"auto",filter:".disabled",stateContext:!1,loadingDuration:0,errorDuration:2e3,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,method:"get",data:{},dataType:"json",beforeSend:function(e){return e},beforeXHR:function(){},onRequest:function(){},onSuccess:function(){},onComplete:function(){},onFailure:function(){},onError:function(){},onAbort:function(){},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:"Required dependency jquery-serialize-object missing, using basic serialize",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",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:{form:"form"},metadata:{action:"action"}},e.api.settings.api={}}(jQuery,window,document); |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
@@ -972,8 +972,16 @@ /* | ||
// value contains (text) | ||
// value contains text (insensitive) | ||
contains: function(value, text) { | ||
// escape regex characters | ||
text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); | ||
return (value.search(text) !== -1); | ||
return (value.search( new RegExp(text, 'i') ) !== -1); | ||
}, | ||
// value contains text (case sensitive) | ||
containsExactly: function(value, text) { | ||
// escape regex characters | ||
text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); | ||
return (value.search( new RegExp(text) ) !== -1); | ||
}, | ||
// is most likely an email | ||
@@ -1024,7 +1032,20 @@ email: function(value){ | ||
// is exactly value | ||
// is value (case insensitive) | ||
is: function(value, text) { | ||
text = (typeof text == 'string') | ||
? text.toLowerCase() | ||
: text | ||
; | ||
value = (typeof value == 'string') | ||
? value.toLowerCase() | ||
: value | ||
; | ||
return (value == text); | ||
}, | ||
// is value | ||
isExactly: function(value, text) { | ||
return (value == text); | ||
}, | ||
// is at least string length | ||
@@ -1068,7 +1089,20 @@ length: function(value, requiredLength) { | ||
// value is not exactly notValue | ||
// value is not value (case insensitive) | ||
not: function(value, notValue) { | ||
value = (typeof value == 'string') | ||
? value.toLowerCase() | ||
: value | ||
; | ||
notValue = (typeof notValue == 'string') | ||
? notValue.toLowerCase() | ||
: notValue | ||
; | ||
return (value != notValue); | ||
}, | ||
// value is not value (case sensitive) | ||
notExactly: function(value, notValue) { | ||
return (value != notValue); | ||
}, | ||
// value is most likely url | ||
@@ -1075,0 +1109,0 @@ url: function(value) { |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -11,2 +11,2 @@ * http://www.semantic-ui.com/ | ||
*/ | ||
!function(e,t,n,i){e.fn.form=function(t,r){var o,a=e(this),s=e.extend(!0,{},e.fn.form.settings,r),l=e.extend({},e.fn.form.settings.defaults,t),c=s.namespace,u=s.metadata,d=s.selector,f=s.className,p=(s.error,"."+c),v="module-"+c,m=a.selector||"",h=(new Date).getTime(),g=[],b=arguments[0],k="string"==typeof b,y=[].slice.call(arguments,1);return a.each(function(){var t,r=e(this),c=e(this).find(d.field),x=e(this).find(d.group),w=e(this).find(d.message),C=(e(this).find(d.prompt),e(this).find(d.submit)),E=e(this).find(d.clear),S=e(this).find(d.reset),F=[],z=!1,R=this,T=r.data(v);t={initialize:function(){t.verbose("Initializing form validation",r,l,s),t.bindEvents(),t.set.defaults(),t.instantiate()},instantiate:function(){t.verbose("Storing instance of module",t),T=t,r.data(v,t)},destroy:function(){t.verbose("Destroying previous module",T),t.removeEvents(),r.removeData(v)},refresh:function(){t.verbose("Refreshing selector cache"),c=r.find(d.field)},submit:function(){t.verbose("Submitting form",r),r.submit()},attachEvents:function(n,i){i=i||"submit",e(n).on("click",function(e){t[i](),e.preventDefault()})},bindEvents:function(){s.keyboardShortcuts&&c.on("keydown"+p,t.event.field.keydown),r.on("submit"+p,t.validate.form),c.on("blur"+p,t.event.field.blur),t.attachEvents(C,"submit"),t.attachEvents(S,"reset"),t.attachEvents(E,"clear"),c.each(function(){var n=e(this).prop("type"),i=t.get.changeEvent(n);e(this).on(i+p,t.event.field.change)})},clear:function(){c.each(function(){var n=e(this),i=n.parent(),r=n.closest(x),o=r.find(d.prompt),a=n.data(u.defaultValue)||"",s=i.is(d.uiCheckbox),l=i.is(d.uiDropdown),c=r.hasClass(f.error);c&&(t.verbose("Resetting error on field",r),r.removeClass(f.error),o.remove()),l?(t.verbose("Resetting dropdown value",i,a),i.dropdown("clear")):s?i.checkbox("uncheck"):(t.verbose("Resetting field value",n,a),n.val(""))})},reset:function(){c.each(function(){var n=e(this),i=n.parent(),r=n.closest(x),o=r.find(d.prompt),a=n.data(u.defaultValue)||"",s=i.is(d.uiCheckbox),l=i.is(d.uiDropdown),c=r.hasClass(f.error);c&&(t.verbose("Resetting error on field",r),r.removeClass(f.error),o.remove()),l?(t.verbose("Resetting dropdown value",i,a),i.dropdown("restore defaults")):s?(t.verbose("Resetting checkbox value",i,a),i.checkbox(a===!0?"check":"uncheck")):(t.verbose("Resetting field value",n,a),n.val(a))})},removeEvents:function(){r.off(p),c.off(p),C.off(p),c.off(p)},event:{field:{keydown:function(n){var i=e(this),r=n.which,o={enter:13,escape:27};r==o.escape&&(t.verbose("Escape key pressed blurring field"),i.blur()),!n.ctrlKey&&r==o.enter&&i.is(d.input)&&i.not(d.checkbox).length>0&&(C.addClass(f.pressed),z||(i.one("keyup"+p,t.event.field.keyup),t.submit(),t.debug("Enter pressed on input submitting form")),z=!0)},keyup:function(){z=!1,C.removeClass(f.pressed)},blur:function(){var n=e(this),i=n.closest(x);i.hasClass(f.error)?(t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))):("blur"==s.on||"change"==s.on)&&t.validate.field(t.get.validation(n))},change:function(){var n=e(this),i=n.closest(x);("change"==s.on||i.hasClass(f.error)&&s.revalidate)&&(clearTimeout(t.timer),t.timer=setTimeout(function(){t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))},s.delay))}}},get:{changeEvent:function(e){return"checkbox"==e||"radio"==e||"hidden"==e?"change":t.get.inputEvent()},inputEvent:function(){return n.createElement("input").oninput!==i?"input":n.createElement("input").onpropertychange!==i?"propertychange":"keyup"},field:function(n){return t.verbose("Finding field with identifier",n),c.filter("#"+n).length>0?c.filter("#"+n):c.filter('[name="'+n+'"]').length>0?c.filter('[name="'+n+'"]'):c.filter('[name="'+n+'[]"]').length>0?c.filter('[name="'+n+'[]"]'):c.filter("[data-"+u.validate+'="'+n+'"]').length>0?c.filter("[data-"+u.validate+'="'+n+'"]'):e("<input/>")},fields:function(n){var i=e();return e.each(n,function(e,n){i=i.add(t.get.field(n))}),i},validation:function(n){var i;return e.each(l,function(e,r){t.get.field(r.identifier).get(0)==n.get(0)&&(i=r)}),i||!1},value:function(e){var n,i=[];return i.push(e),n=t.get.values.call(R,i),n[e]},values:function(n){var i=e.isArray(n)?t.get.fields(n):c,r={};return i.each(function(n,i){var o=e(i),a=(o.prop("type"),o.prop("name")),s=o.val(),l=o.is(d.checkbox),c=o.is(d.radio),u=-1!==a.indexOf("[]"),f=l?o.is(":checked"):!1;if(a)if(u)if(a=a.replace("[]",""),r[a]||(r[a]=[]),l){if(!f)return t.debug("Omitted unchecked checkbox",o),!0;r[a].push(s)}else r[a].push(s);else if(c)f&&(r[a]=s);else if(l){if(!f)return t.debug("Omitted unchecked checkbox",o),!0;r[a]=!0}else r[a]=s}),r}},has:{field:function(e){return t.verbose("Checking for existence of a field with identifier",e),c.filter("#"+e).length>0?!0:c.filter('[name="'+e+'"]').length>0?!0:c.filter("[data-"+u.validate+'="'+e+'"]').length>0?!0:!1}},add:{prompt:function(n,o){var a=t.get.field(n),l=a.closest(x),c=l.children(d.prompt),u=0!==c.length;o="string"==typeof o?[o]:o,t.verbose("Adding field error state",n),l.addClass(f.error),s.inline&&(u||(c=s.templates.prompt(o),c.appendTo(l)),c.html(o[0]),u?t.verbose("Inline errors are disabled, no inline error added",n):s.transition&&e.fn.transition!==i&&r.transition("is supported")?(t.verbose("Displaying error with css transition",s.transition),c.transition(s.transition+" in",s.duration)):(t.verbose("Displaying error with fallback javascript animation"),c.fadeIn(s.duration)))},errors:function(e){t.debug("Adding form error messages",e),w.html(s.templates.error(e))}},remove:{prompt:function(n){var o=t.get.field(n.identifier),a=o.closest(x),l=a.children(d.prompt);a.removeClass(f.error),s.inline&&l.is(":visible")&&(t.verbose("Removing prompt for field",n),s.transition&&e.fn.transition!==i&&r.transition("is supported")?l.transition(s.transition+" out",s.duration,function(){l.remove()}):l.fadeOut(s.duration,function(){l.remove()}))}},set:{success:function(){r.removeClass(f.error).addClass(f.success)},defaults:function(){c.each(function(){var t=e(this),n=t.filter(d.checkbox).length>0,i=n?t.is(":checked"):t.val();t.data(u.defaultValue,i)})},error:function(){r.removeClass(f.success).addClass(f.error)},value:function(e,n){var i={};return i[e]=n,t.set.values.call(R,i)},values:function(n){e.isEmptyObject(n)||(e.each(n,function(n,i){var r,o=t.get.field(n),a=o.parent(),s=e.isArray(i),l=a.is(d.uiCheckbox),c=a.is(d.uiDropdown),u=o.is(d.radio)&&l,f=o.length>0;f&&(s&&l?(t.verbose("Selecting multiple",i,o),a.checkbox("uncheck"),e.each(i,function(e,t){r=o.filter('[value="'+t+'"]'),a=r.parent(),r.length>0&&a.checkbox("check")})):u?(t.verbose("Selecting radio value",i,o),o.filter('[value="'+i+'"]').parent(d.uiCheckbox).checkbox("check")):l?(t.verbose("Setting checkbox value",i,a),a.checkbox(i===!0?"check":"uncheck")):c?(t.verbose("Setting dropdown value",i,a),a.dropdown("set selected",i)):(t.verbose("Setting field value",i,o),o.val(i)))}),t.validate.form())}},validate:{form:function(n){var o=!0;return z?!1:(F=[],e.each(l,function(e,n){t.validate.field(n)||(o=!1)}),o?(t.debug("Form has no validation errors, submitting"),t.set.success(),s.onSuccess.call(R,n)):(t.debug("Form has errors"),t.set.error(),s.inline||t.add.errors(F),r.data("moduleApi")!==i&&n.stopImmediatePropagation(),s.onFailure.call(R,F)))},field:function(n){var r=t.get.field(n.identifier),o=!0,a=[];return r.prop("disabled")?(t.debug("Field is disabled. Skipping",n.identifier),o=!0):n.optional&&""===e.trim(r.val())?(t.debug("Field is optional and empty. Skipping",n.identifier),o=!0):n.rules!==i&&e.each(n.rules,function(e,i){t.has.field(n.identifier)&&!t.validate.rule(n,i)&&(t.debug("Field is invalid",n.identifier,i.type),a.push(i.prompt),o=!1)}),o?(t.remove.prompt(n,a),s.onValid.call(r),!0):(F=F.concat(a),t.add.prompt(n.identifier,a),s.onInvalid.call(r,a),!1)},rule:function(n,r){var o,a,l=t.get.field(n.identifier),c=r.type,u=e.trim(l.val()+""),d=/\[(.*)\]/i,f=d.exec(c),p=!0;return f!==i&&null!==f?(o=""+f[1],a=c.replace(f[0],""),p=s.rules[a].call(R,u,o)):p=s.rules[c].call(l,u),p}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(n,r){if(e.isPlainObject(n))e.extend(!0,t,n);else{if(r===i)return t[n];t[n]=r}},debug:function(){s.debug&&(s.performance?t.performance.log(arguments):(t.debug=Function.prototype.bind.call(console.info,console,s.name+":"),t.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?t.performance.log(arguments):(t.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),t.verbose.apply(console,arguments)))},error:function(){t.error=Function.prototype.bind.call(console.error,console,s.name+":"),t.error.apply(console,arguments)},performance:{log:function(e){var n,i,r;s.performance&&(n=(new Date).getTime(),r=h||n,i=n-r,h=n,g.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:R,"Execution Time":i})),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100)},display:function(){var n=s.name+":",r=0;h=!1,clearTimeout(t.performance.timer),e.each(g,function(e,t){r+=t["Execution Time"]}),n+=" "+r+"ms",m&&(n+=" '"+m+"'"),a.length>1&&(n+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&g.length>0&&(console.groupCollapsed(n),console.table?console.table(g):e.each(g,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),g=[]}},invoke:function(t,n,r){var a,s,l,c=T;return n=n||y,r=R||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,r){var o=n!=a?r+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[o])&&n!=a)c=c[o];else{if(c[o]!==i)return s=c[o],!1;if(!e.isPlainObject(c[r])||n==a)return c[r]!==i?(s=c[r],!1):!1;c=c[r]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},k?(T===i&&t.initialize(),t.invoke(b)):(T!==i&&T.invoke("destroy"),t.initialize())}),o!==i?o:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!0,performance:!0,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:".reset",submit:".submit",uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},error:{method:"The method you called is not defined."},templates:{error:function(t){var n='<ul class="list">';return e.each(t,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>",e(n)},prompt:function(t){return e("<div/>").addClass("ui red pointing prompt label").html(t[0])}},rules:{checked:function(){return e(this).filter(":checked").length>0},contains:function(e,t){return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==e.search(t)},email:function(e){var t=new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?","i");return t.test(e)},empty:function(e){return!(e===i||""===e)},integer:function(e,t){var n,r,o,a=/^\-?\d+$/;return t===i||""===t||".."===t||(-1==t.indexOf("..")?a.test(t)&&(n=r=t-0):(o=t.split("..",2),a.test(o[0])&&(n=o[0]-0),a.test(o[1])&&(r=o[1]-0))),a.test(e)&&(n===i||e>=n)&&(r===i||r>=e)},is:function(e,t){return e==t},length:function(e,t){return e!==i?e.length>=t:!1},match:function(t,n){var r,o=e(this);return o.find("#"+n).length>0?r=o.find("#"+n).val():o.find('[name="'+n+'"]').length>0?r=o.find('[name="'+n+'"]').val():o.find('[data-validate="'+n+'"]').length>0&&(r=o.find('[data-validate="'+n+'"]').val()),r!==i?t.toString()==r.toString():!1},maxLength:function(e,t){return e!==i?e.length<=t:!1},not:function(e,t){return e!=t},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)}}}}(jQuery,window,document); | ||
!function(e,t,n,i){e.fn.form=function(t,r){var o,a=e(this),s=e.extend(!0,{},e.fn.form.settings,r),l=e.extend({},e.fn.form.settings.defaults,t),c=s.namespace,u=s.metadata,d=s.selector,f=s.className,p=(s.error,"."+c),v="module-"+c,m=a.selector||"",h=(new Date).getTime(),g=[],b=arguments[0],k="string"==typeof b,y=[].slice.call(arguments,1);return a.each(function(){var t,r=e(this),c=e(this).find(d.field),x=e(this).find(d.group),w=e(this).find(d.message),E=(e(this).find(d.prompt),e(this).find(d.submit)),C=e(this).find(d.clear),S=e(this).find(d.reset),R=[],F=!1,z=this,T=r.data(v);t={initialize:function(){t.verbose("Initializing form validation",r,l,s),t.bindEvents(),t.set.defaults(),t.instantiate()},instantiate:function(){t.verbose("Storing instance of module",t),T=t,r.data(v,t)},destroy:function(){t.verbose("Destroying previous module",T),t.removeEvents(),r.removeData(v)},refresh:function(){t.verbose("Refreshing selector cache"),c=r.find(d.field)},submit:function(){t.verbose("Submitting form",r),r.submit()},attachEvents:function(n,i){i=i||"submit",e(n).on("click",function(e){t[i](),e.preventDefault()})},bindEvents:function(){s.keyboardShortcuts&&c.on("keydown"+p,t.event.field.keydown),r.on("submit"+p,t.validate.form),c.on("blur"+p,t.event.field.blur),t.attachEvents(E,"submit"),t.attachEvents(S,"reset"),t.attachEvents(C,"clear"),c.each(function(){var n=e(this).prop("type"),i=t.get.changeEvent(n);e(this).on(i+p,t.event.field.change)})},clear:function(){c.each(function(){var n=e(this),i=n.parent(),r=n.closest(x),o=r.find(d.prompt),a=n.data(u.defaultValue)||"",s=i.is(d.uiCheckbox),l=i.is(d.uiDropdown),c=r.hasClass(f.error);c&&(t.verbose("Resetting error on field",r),r.removeClass(f.error),o.remove()),l?(t.verbose("Resetting dropdown value",i,a),i.dropdown("clear")):s?i.checkbox("uncheck"):(t.verbose("Resetting field value",n,a),n.val(""))})},reset:function(){c.each(function(){var n=e(this),i=n.parent(),r=n.closest(x),o=r.find(d.prompt),a=n.data(u.defaultValue)||"",s=i.is(d.uiCheckbox),l=i.is(d.uiDropdown),c=r.hasClass(f.error);c&&(t.verbose("Resetting error on field",r),r.removeClass(f.error),o.remove()),l?(t.verbose("Resetting dropdown value",i,a),i.dropdown("restore defaults")):s?(t.verbose("Resetting checkbox value",i,a),i.checkbox(a===!0?"check":"uncheck")):(t.verbose("Resetting field value",n,a),n.val(a))})},removeEvents:function(){r.off(p),c.off(p),E.off(p),c.off(p)},event:{field:{keydown:function(n){var i=e(this),r=n.which,o={enter:13,escape:27};r==o.escape&&(t.verbose("Escape key pressed blurring field"),i.blur()),!n.ctrlKey&&r==o.enter&&i.is(d.input)&&i.not(d.checkbox).length>0&&(E.addClass(f.pressed),F||(i.one("keyup"+p,t.event.field.keyup),t.submit(),t.debug("Enter pressed on input submitting form")),F=!0)},keyup:function(){F=!1,E.removeClass(f.pressed)},blur:function(){var n=e(this),i=n.closest(x);i.hasClass(f.error)?(t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))):("blur"==s.on||"change"==s.on)&&t.validate.field(t.get.validation(n))},change:function(){var n=e(this),i=n.closest(x);("change"==s.on||i.hasClass(f.error)&&s.revalidate)&&(clearTimeout(t.timer),t.timer=setTimeout(function(){t.debug("Revalidating field",n,t.get.validation(n)),t.validate.field(t.get.validation(n))},s.delay))}}},get:{changeEvent:function(e){return"checkbox"==e||"radio"==e||"hidden"==e?"change":t.get.inputEvent()},inputEvent:function(){return n.createElement("input").oninput!==i?"input":n.createElement("input").onpropertychange!==i?"propertychange":"keyup"},field:function(n){return t.verbose("Finding field with identifier",n),c.filter("#"+n).length>0?c.filter("#"+n):c.filter('[name="'+n+'"]').length>0?c.filter('[name="'+n+'"]'):c.filter('[name="'+n+'[]"]').length>0?c.filter('[name="'+n+'[]"]'):c.filter("[data-"+u.validate+'="'+n+'"]').length>0?c.filter("[data-"+u.validate+'="'+n+'"]'):e("<input/>")},fields:function(n){var i=e();return e.each(n,function(e,n){i=i.add(t.get.field(n))}),i},validation:function(n){var i;return e.each(l,function(e,r){t.get.field(r.identifier).get(0)==n.get(0)&&(i=r)}),i||!1},value:function(e){var n,i=[];return i.push(e),n=t.get.values.call(z,i),n[e]},values:function(n){var i=e.isArray(n)?t.get.fields(n):c,r={};return i.each(function(n,i){var o=e(i),a=(o.prop("type"),o.prop("name")),s=o.val(),l=o.is(d.checkbox),c=o.is(d.radio),u=-1!==a.indexOf("[]"),f=l?o.is(":checked"):!1;if(a)if(u)if(a=a.replace("[]",""),r[a]||(r[a]=[]),l){if(!f)return t.debug("Omitted unchecked checkbox",o),!0;r[a].push(s)}else r[a].push(s);else if(c)f&&(r[a]=s);else if(l){if(!f)return t.debug("Omitted unchecked checkbox",o),!0;r[a]=!0}else r[a]=s}),r}},has:{field:function(e){return t.verbose("Checking for existence of a field with identifier",e),c.filter("#"+e).length>0?!0:c.filter('[name="'+e+'"]').length>0?!0:c.filter("[data-"+u.validate+'="'+e+'"]').length>0?!0:!1}},add:{prompt:function(n,o){var a=t.get.field(n),l=a.closest(x),c=l.children(d.prompt),u=0!==c.length;o="string"==typeof o?[o]:o,t.verbose("Adding field error state",n),l.addClass(f.error),s.inline&&(u||(c=s.templates.prompt(o),c.appendTo(l)),c.html(o[0]),u?t.verbose("Inline errors are disabled, no inline error added",n):s.transition&&e.fn.transition!==i&&r.transition("is supported")?(t.verbose("Displaying error with css transition",s.transition),c.transition(s.transition+" in",s.duration)):(t.verbose("Displaying error with fallback javascript animation"),c.fadeIn(s.duration)))},errors:function(e){t.debug("Adding form error messages",e),w.html(s.templates.error(e))}},remove:{prompt:function(n){var o=t.get.field(n.identifier),a=o.closest(x),l=a.children(d.prompt);a.removeClass(f.error),s.inline&&l.is(":visible")&&(t.verbose("Removing prompt for field",n),s.transition&&e.fn.transition!==i&&r.transition("is supported")?l.transition(s.transition+" out",s.duration,function(){l.remove()}):l.fadeOut(s.duration,function(){l.remove()}))}},set:{success:function(){r.removeClass(f.error).addClass(f.success)},defaults:function(){c.each(function(){var t=e(this),n=t.filter(d.checkbox).length>0,i=n?t.is(":checked"):t.val();t.data(u.defaultValue,i)})},error:function(){r.removeClass(f.success).addClass(f.error)},value:function(e,n){var i={};return i[e]=n,t.set.values.call(z,i)},values:function(n){e.isEmptyObject(n)||(e.each(n,function(n,i){var r,o=t.get.field(n),a=o.parent(),s=e.isArray(i),l=a.is(d.uiCheckbox),c=a.is(d.uiDropdown),u=o.is(d.radio)&&l,f=o.length>0;f&&(s&&l?(t.verbose("Selecting multiple",i,o),a.checkbox("uncheck"),e.each(i,function(e,t){r=o.filter('[value="'+t+'"]'),a=r.parent(),r.length>0&&a.checkbox("check")})):u?(t.verbose("Selecting radio value",i,o),o.filter('[value="'+i+'"]').parent(d.uiCheckbox).checkbox("check")):l?(t.verbose("Setting checkbox value",i,a),a.checkbox(i===!0?"check":"uncheck")):c?(t.verbose("Setting dropdown value",i,a),a.dropdown("set selected",i)):(t.verbose("Setting field value",i,o),o.val(i)))}),t.validate.form())}},validate:{form:function(n){var o=!0;return F?!1:(R=[],e.each(l,function(e,n){t.validate.field(n)||(o=!1)}),o?(t.debug("Form has no validation errors, submitting"),t.set.success(),s.onSuccess.call(z,n)):(t.debug("Form has errors"),t.set.error(),s.inline||t.add.errors(R),r.data("moduleApi")!==i&&n.stopImmediatePropagation(),s.onFailure.call(z,R)))},field:function(n){var r=t.get.field(n.identifier),o=!0,a=[];return r.prop("disabled")?(t.debug("Field is disabled. Skipping",n.identifier),o=!0):n.optional&&""===e.trim(r.val())?(t.debug("Field is optional and empty. Skipping",n.identifier),o=!0):n.rules!==i&&e.each(n.rules,function(e,i){t.has.field(n.identifier)&&!t.validate.rule(n,i)&&(t.debug("Field is invalid",n.identifier,i.type),a.push(i.prompt),o=!1)}),o?(t.remove.prompt(n,a),s.onValid.call(r),!0):(R=R.concat(a),t.add.prompt(n.identifier,a),s.onInvalid.call(r,a),!1)},rule:function(n,r){var o,a,l=t.get.field(n.identifier),c=r.type,u=e.trim(l.val()+""),d=/\[(.*)\]/i,f=d.exec(c),p=!0;return f!==i&&null!==f?(o=""+f[1],a=c.replace(f[0],""),p=s.rules[a].call(z,u,o)):p=s.rules[c].call(l,u),p}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(n,r){if(e.isPlainObject(n))e.extend(!0,t,n);else{if(r===i)return t[n];t[n]=r}},debug:function(){s.debug&&(s.performance?t.performance.log(arguments):(t.debug=Function.prototype.bind.call(console.info,console,s.name+":"),t.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?t.performance.log(arguments):(t.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),t.verbose.apply(console,arguments)))},error:function(){t.error=Function.prototype.bind.call(console.error,console,s.name+":"),t.error.apply(console,arguments)},performance:{log:function(e){var n,i,r;s.performance&&(n=(new Date).getTime(),r=h||n,i=n-r,h=n,g.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:z,"Execution Time":i})),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100)},display:function(){var n=s.name+":",r=0;h=!1,clearTimeout(t.performance.timer),e.each(g,function(e,t){r+=t["Execution Time"]}),n+=" "+r+"ms",m&&(n+=" '"+m+"'"),a.length>1&&(n+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&g.length>0&&(console.groupCollapsed(n),console.table?console.table(g):e.each(g,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),g=[]}},invoke:function(t,n,r){var a,s,l,c=T;return n=n||y,r=z||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,r){var o=n!=a?r+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[o])&&n!=a)c=c[o];else{if(c[o]!==i)return s=c[o],!1;if(!e.isPlainObject(c[r])||n==a)return c[r]!==i?(s=c[r],!1):!1;c=c[r]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},k?(T===i&&t.initialize(),t.invoke(b)):(T!==i&&T.invoke("destroy"),t.initialize())}),o!==i?o:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!0,performance:!0,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:".reset",submit:".submit",uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},error:{method:"The method you called is not defined."},templates:{error:function(t){var n='<ul class="list">';return e.each(t,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>",e(n)},prompt:function(t){return e("<div/>").addClass("ui red pointing prompt label").html(t[0])}},rules:{checked:function(){return e(this).filter(":checked").length>0},contains:function(e,t){return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),-1!==e.search(new RegExp(t))},email:function(e){var t=new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?","i");return t.test(e)},empty:function(e){return!(e===i||""===e)},integer:function(e,t){var n,r,o,a=/^\-?\d+$/;return t===i||""===t||".."===t||(-1==t.indexOf("..")?a.test(t)&&(n=r=t-0):(o=t.split("..",2),a.test(o[0])&&(n=o[0]-0),a.test(o[1])&&(r=o[1]-0))),a.test(e)&&(n===i||e>=n)&&(r===i||r>=e)},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,e="string"==typeof e?e.toLowerCase():e,e==t},isExactly:function(e,t){return e==t},length:function(e,t){return e!==i?e.length>=t:!1},match:function(t,n){var r,o=e(this);return o.find("#"+n).length>0?r=o.find("#"+n).val():o.find('[name="'+n+'"]').length>0?r=o.find('[name="'+n+'"]').val():o.find('[data-validate="'+n+'"]').length>0&&(r=o.find('[data-validate="'+n+'"]').val()),r!==i?t.toString()==r.toString():!1},maxLength:function(e,t){return e!==i?e.length<=t:!1},not:function(e,t){return e="string"==typeof e?e.toLowerCase():e,t="string"==typeof t?t.toLowerCase():t,e!=t},notExactly:function(e,t){return e!=t},url:function(e){var t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)}}}}(jQuery,window,document); |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
@@ -306,8 +306,8 @@ /* | ||
; | ||
value = value || module.get.value(); | ||
value = value || module.get.value(); | ||
results = results || module.get.results(); | ||
if(settings.type === 'category') { | ||
module.debug('Finding result from category results', value); | ||
module.debug('Finding result that matches', value); | ||
$.each(results, function(index, category) { | ||
if(category.results !== undefined) { | ||
if($.isArray(category.results)) { | ||
result = module.search.object(value, category.results)[0]; | ||
@@ -338,2 +338,3 @@ if(result.length > 0) { | ||
$prompt.val(value); | ||
module.query(); | ||
}, | ||
@@ -622,3 +623,5 @@ buttonPressed: function() { | ||
if(isProperObject) { | ||
module.error(error.maxResults); | ||
if(settings.type == 'standard') { | ||
module.error(error.maxResults); | ||
} | ||
} | ||
@@ -625,0 +628,0 @@ else { |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -11,2 +11,2 @@ * http://www.semantic-ui.com/ | ||
*/ | ||
!function(e,t,s,n){"use strict";e.fn.search=function(r){var a,i=e(this),o=i.selector||"",c=(new Date).getTime(),u=[],l=arguments[0],d="string"==typeof l,g=[].slice.call(arguments,1);return e(this).each(function(){var f,p=e.extend(!0,{},e.fn.search.settings,r),m=p.className,h=p.metadata,v=p.regExp,b=p.selector,y=p.error,R=p.namespace,w="."+R,x=R+"-module",C=e(this),k=C.find(b.prompt),A=C.find(b.searchButton),T=C.find(b.results),q=(C.find(b.result),C.find(b.category),this),S=C.data(x);f={initialize:function(){f.verbose("Initializing module");var e=k[0],t=e!==n&&e.oninput!==n?"input":e!==n&&e.onpropertychange!==n?"propertychange":"keyup";p.automatic&&k.on(t+w,f.throttle),k.on("focus"+w,f.event.focus).on("blur"+w,f.event.blur).on("keydown"+w,f.handleKeyboard),A.on("click"+w,f.query),T.on("mousedown"+w,f.event.result.mousedown).on("mouseup"+w,f.event.result.mouseup).on("click"+w,b.result,f.event.result.click),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),S=f,C.data(x,f)},destroy:function(){f.verbose("Destroying instance"),C.removeData(x),k.off(w),A.off(w),T.off(w)},event:{focus:function(){f.set.focus(),clearTimeout(f.timer),f.throttle(),f.has.minimumCharacters()&&f.showResults()},blur:function(){var e=s.activeElement===this;e||f.resultsClicked||(f.cancel.query(),f.remove.focus(),f.timer=setTimeout(f.hideResults,p.hideDelay))},result:{mousedown:function(){f.resultsClicked=!0},mouseup:function(){f.resultsClicked=!1},click:function(s){f.debug("Search result selected");var n=e(this),r=n.find(b.title).eq(0),a=n.find("a[href]").eq(0),i=a.attr("href")||!1,o=a.attr("target")||!1,c=(r.html(),r.length>0?r.text():!1),u=f.get.results(),l=f.get.result(c,u);return e.isFunction(p.onSelect)&&p.onSelect.call(q,l,u)===!1?void f.debug("Custom onSelect callback cancelled default select action"):(f.hideResults(),c&&f.set.value(c),void(i&&(f.verbose("Opening search link found in result",a),"_blank"==o||s.ctrlKey?t.open(i):t.location.href=i)))}}},handleKeyboard:function(e){var t,s=C.find(b.result),n=C.find(b.category),r=s.index(s.filter("."+m.active)),a=s.length,i=e.which,o={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(i==o.escape&&(f.verbose("Escape key pressed, blurring search field"),k.trigger("blur")),f.is.visible())if(i==o.enter){if(f.verbose("Enter key pressed, selecting active result"),s.filter("."+m.active).length>0)return f.event.result.click.call(s.filter("."+m.active),e),e.preventDefault(),!1}else i==o.upArrow?(f.verbose("Up key pressed, changing active result"),t=0>r-1?r:r-1,n.removeClass(m.active),s.removeClass(m.active).eq(t).addClass(m.active).closest(n).addClass(m.active),e.preventDefault()):i==o.downArrow&&(f.verbose("Down key pressed, changing active result"),t=r+1>=a?r:r+1,n.removeClass(m.active),s.removeClass(m.active).eq(t).addClass(m.active).closest(n).addClass(m.active),e.preventDefault());else i==o.enter&&(f.verbose("Enter key pressed, executing query"),f.query(),f.set.buttonPressed(),k.one("keyup",f.remove.buttonFocus))},setup:{api:function(){var e={on:!1,action:"search",onFailure:f.error};f.verbose("First request, initializing API"),C.api(e)}},can:{useAPI:function(){return e.fn.api!==n},transition:function(){return p.transition&&e.fn.transition!==n&&C.transition("is supported")}},is:{empty:function(){return""===T.html()},visible:function(){return T.filter(":visible").length>0},focused:function(){return k.filter(":focus").length>0}},get:{value:function(){return k.val()},results:function(){var e=C.data(h.results);return e},result:function(t,s){var r=!1;return t=t||f.get.value(),s=s||f.get.results(),"category"===p.type?(f.debug("Finding result from category results",t),e.each(s,function(e,s){return s.results!==n&&(r=f.search.object(t,s.results)[0],r.length>0)?!0:void 0})):(f.debug("Finding result in results object",t),r=f.search.object(t,s)[0]),r}},set:{focus:function(){C.addClass(m.focus)},loading:function(){C.addClass(m.loading)},value:function(e){f.verbose("Setting search input value",e),k.val(e)},buttonPressed:function(){A.addClass(m.pressed)}},remove:{loading:function(){C.removeClass(m.loading)},focus:function(){C.removeClass(m.focus)},buttonPressed:function(){A.removeClass(m.pressed)}},query:function(){var t=f.get.value(),s=f.read.cachedHTML(t);s?(f.debug("Reading result for "+t+" from cache"),f.addResults(s)):(f.debug("Querying for "+t),e.isPlainObject(p.source)||e.isArray(p.source)?f.search.local(t):f.can.useAPI()?p.apiSettings?(f.debug("Searching with specified API settings",p.apiSettings),f.search.remote(t)):e.api.settings.api.search!==n&&(f.debug("Searching with default search API endpoint"),f.search.remote(t)):f.error(y.source),p.onSearchQuery.call(q,t))},search:{local:function(e){var t,s=f.search.object(e,p.content);f.set.loading(),f.save.results(s),f.debug("Returned local search results",s),t=f.generateResults({results:s}),f.remove.loading(),f.write.cachedHTML(e,t),f.addResults(t)},remote:function(t){var s={onSuccess:function(e){f.parse.response.call(q,e,t)},urlData:{query:t}};C.api("get request")||f.setup.api(),e.extend(!0,s,p.apiSettings),f.debug("Executing search",s),f.cancel.query(),C.api("setting",s).api("query")},object:function(t,s){var r=[],a=[],i=e.isArray(p.searchFields)?p.searchFields:[p.searchFields],o=new RegExp(v.exact+t,"i"),c=new RegExp(t,"i");return s=s||p.source,s===n?(f.error(y.source),[]):(e.each(i,function(t,n){e.each(s,function(t,s){var i="string"==typeof s[n],u=-1==e.inArray(s,r)&&-1==e.inArray(s,a);i&&u&&(s[n].match(o)?r.push(s):p.searchFullText&&s[n].match(c)&&a.push(s))})}),e.merge(r,a))}},parse:{response:function(e,t){var s=f.generateResults(e);f.verbose("Parsing server response",e),e!==n&&(t&&(f.write.cachedHTML(t,s),e.results!==n&&f.save.results(e.results)),f.addResults(s))}},throttle:function(){clearTimeout(f.timer),f.has.minimumCharacters()?f.timer=setTimeout(f.query,p.searchDelay):f.hideResults()},cancel:{query:function(){f.can.useAPI()&&C.api("abort")}},has:{minimumCharacters:function(){var e=f.get.value(),t=e.length;return t>=p.minCharacters}},read:{cachedHTML:function(e){var t=C.data(h.cache);return p.cache?(f.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==n?t[e]:!1):!1}},save:{results:function(e){f.verbose("Saving current search results to metadata",e),C.data(h.results,e)}},write:{cachedHTML:function(e,t){var s=C.data(h.cache)!==n?C.data(h.cache):{};p.cache&&(f.verbose("Writing generated html to cache",e,t),s[e]=t,C.data(h.cache,s))}},addResults:function(t){return e.isFunction(p.onResultsAdd)&&p.onResultsAdd.call(T,t)===!1?(f.debug("onResultsAdd callback cancelled default action"),!1):(T.html(t),void f.showResults())},showResults:function(){f.is.visible()||!f.is.focused()||f.is.empty()||(f.can.transition()?(f.debug("Showing results with css animations"),T.transition({animation:p.transition+" in",duration:p.duration,queue:!0})):(f.debug("Showing results with javascript"),T.stop().fadeIn(p.duration,p.easing)),p.onResultsOpen.call(T))},hideResults:function(){f.is.visible()&&(f.can.transition()?(f.debug("Hiding results with css animations"),T.transition({animation:p.transition+" out",duration:p.duration,queue:!0})):(f.debug("Hiding results with javascript"),T.stop().fadeOut(p.duration,p.easing)),p.onResultsClose.call(T))},generateResults:function(t){f.debug("Generating html from response",t);var s=p.templates[p.type],n=e.isPlainObject(t.results)&&!e.isEmptyObject(t.results),r=e.isArray(t.results)&&t.results.length>0,a="";return n||r?(p.maxResults>0&&(n?f.error(y.maxResults):t.results=t.results.slice(0,p.maxResults)),e.isFunction(s)?a=s(t):f.error(y.noTemplate,!1)):a=f.displayMessage(y.noResults,"empty"),p.onResults.call(q,t),a},displayMessage:function(e,t){return t=t||"standard",f.debug("Displaying message",e,t),f.addResults(p.templates.message(e,t)),p.templates.message(e,t)},setting:function(t,s){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(s===n)return p[t];p[t]=s}},internal:function(t,s){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(s===n)return f[t];f[t]=s}},debug:function(){p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments)},performance:{log:function(e){var t,s,n;p.performance&&(t=(new Date).getTime(),n=c||t,s=t-n,c=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:q,"Execution Time":s})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,100)},display:function(){var t=p.name+":",s=0;c=!1,clearTimeout(f.performance.timer),e.each(u,function(e,t){s+=t["Execution Time"]}),t+=" "+s+"ms",o&&(t+=" '"+o+"'"),i.length>1&&(t+=" ("+i.length+")"),(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,s,r){var i,o,c,u=S;return s=s||g,r=q||r,"string"==typeof t&&u!==n&&(t=t.split(/[\. ]/),i=t.length-1,e.each(t,function(s,r){var a=s!=i?r+t[s+1].charAt(0).toUpperCase()+t[s+1].slice(1):t;if(e.isPlainObject(u[a])&&s!=i)u=u[a];else{if(u[a]!==n)return o=u[a],!1;if(!e.isPlainObject(u[r])||s==i)return u[r]!==n?(o=u[r],!1):!1;u=u[r]}})),e.isFunction(o)?c=o.apply(r,s):o!==n&&(c=o),e.isArray(a)?a.push(c):a!==n?a=[a,c]:c!==n&&(a=c),o}},d?(S===n&&f.initialize(),f.invoke(l)):(S!==n&&S.invoke("destroy"),f.initialize())}),a!==n?a:this},e.fn.search.settings={name:"Search Module",namespace:"search",debug:!1,verbose:!0,performance:!0,type:"standard",minCharacters:1,apiSettings:!1,source:!1,searchFields:["title","description"],searchFullText:!0,automatic:"true",hideDelay:0,searchDelay:100,maxResults:7,cache:!0,transition:"scale",duration:300,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(){},onResults:function(){},onResultsOpen:function(){},onResultsClose:function(){},className:{active:"active",empty:"empty",focus:"focus",loading:"loading",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noTemplate:"A valid template name was not specified.",serverError:"There was an issue with querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results"},regExp:{exact:"(?:s|^)"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,s=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r=function(e){return n[e]};return s.test(e)?e.replace(t,r):e},message:function(e,t){var s="";return e!==n&&t!==n&&(s+='<div class="message '+t+'">',s+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",s+="</div>"),s},category:function(t){var s="",r=e.fn.search.settings.templates.escape;return t.results!==n?(e.each(t.results,function(t,a){a.results!==n&&a.results.length>0&&(s+='<div class="category"><div class="name">'+a.name+"</div>",e.each(a.results,function(e,t){s+='<div class="result">',t.url&&(s+='<a href="'+t.url+'"></a>'),t.image!==n&&(t.image=r(t.image),s+='<div class="image"> <img src="'+t.image+'" alt=""></div>'),s+='<div class="content">',t.price!==n&&(t.price=r(t.price),s+='<div class="price">'+t.price+"</div>"),t.title!==n&&(t.title=r(t.title),s+='<div class="title">'+t.title+"</div>"),t.description!==n&&(s+='<div class="description">'+t.description+"</div>"),s+="</div></div>"}),s+="</div>")}),t.action&&(s+='<a href="'+t.action.url+'" class="action">'+t.action.text+"</a>"),s):!1},standard:function(t){var s="";return t.results!==n?(e.each(t.results,function(e,t){s+=t.url?'<a class="result" href="'+t.url+'">':'<a class="result">',t.image!==n&&(s+='<div class="image"> <img src="'+t.image+'"></div>'),s+='<div class="content">',t.price!==n&&(s+='<div class="price">'+t.price+"</div>"),t.title!==n&&(s+='<div class="title">'+t.title+"</div>"),t.description!==n&&(s+='<div class="description">'+t.description+"</div>"),s+="</div>",s+="</a>"}),t.action&&(s+='<a href="'+t.action.url+'" class="action">'+t.action.text+"</a>"),s):!1}}}}(jQuery,window,document); | ||
!function(e,t,s,n){"use strict";e.fn.search=function(r){var a,i=e(this),o=i.selector||"",c=(new Date).getTime(),u=[],l=arguments[0],d="string"==typeof l,g=[].slice.call(arguments,1);return e(this).each(function(){var f,p=e.extend(!0,{},e.fn.search.settings,r),m=p.className,h=p.metadata,v=p.regExp,b=p.selector,y=p.error,R=p.namespace,w="."+R,x=R+"-module",C=e(this),k=C.find(b.prompt),A=C.find(b.searchButton),T=C.find(b.results),q=(C.find(b.result),C.find(b.category),this),S=C.data(x);f={initialize:function(){f.verbose("Initializing module");var e=k[0],t=e!==n&&e.oninput!==n?"input":e!==n&&e.onpropertychange!==n?"propertychange":"keyup";p.automatic&&k.on(t+w,f.throttle),k.on("focus"+w,f.event.focus).on("blur"+w,f.event.blur).on("keydown"+w,f.handleKeyboard),A.on("click"+w,f.query),T.on("mousedown"+w,f.event.result.mousedown).on("mouseup"+w,f.event.result.mouseup).on("click"+w,b.result,f.event.result.click),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),S=f,C.data(x,f)},destroy:function(){f.verbose("Destroying instance"),C.removeData(x),k.off(w),A.off(w),T.off(w)},event:{focus:function(){f.set.focus(),clearTimeout(f.timer),f.throttle(),f.has.minimumCharacters()&&f.showResults()},blur:function(){var e=s.activeElement===this;e||f.resultsClicked||(f.cancel.query(),f.remove.focus(),f.timer=setTimeout(f.hideResults,p.hideDelay))},result:{mousedown:function(){f.resultsClicked=!0},mouseup:function(){f.resultsClicked=!1},click:function(s){f.debug("Search result selected");var n=e(this),r=n.find(b.title).eq(0),a=n.find("a[href]").eq(0),i=a.attr("href")||!1,o=a.attr("target")||!1,c=(r.html(),r.length>0?r.text():!1),u=f.get.results(),l=f.get.result(c,u);return e.isFunction(p.onSelect)&&p.onSelect.call(q,l,u)===!1?void f.debug("Custom onSelect callback cancelled default select action"):(f.hideResults(),c&&f.set.value(c),void(i&&(f.verbose("Opening search link found in result",a),"_blank"==o||s.ctrlKey?t.open(i):t.location.href=i)))}}},handleKeyboard:function(e){var t,s=C.find(b.result),n=C.find(b.category),r=s.index(s.filter("."+m.active)),a=s.length,i=e.which,o={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(i==o.escape&&(f.verbose("Escape key pressed, blurring search field"),k.trigger("blur")),f.is.visible())if(i==o.enter){if(f.verbose("Enter key pressed, selecting active result"),s.filter("."+m.active).length>0)return f.event.result.click.call(s.filter("."+m.active),e),e.preventDefault(),!1}else i==o.upArrow?(f.verbose("Up key pressed, changing active result"),t=0>r-1?r:r-1,n.removeClass(m.active),s.removeClass(m.active).eq(t).addClass(m.active).closest(n).addClass(m.active),e.preventDefault()):i==o.downArrow&&(f.verbose("Down key pressed, changing active result"),t=r+1>=a?r:r+1,n.removeClass(m.active),s.removeClass(m.active).eq(t).addClass(m.active).closest(n).addClass(m.active),e.preventDefault());else i==o.enter&&(f.verbose("Enter key pressed, executing query"),f.query(),f.set.buttonPressed(),k.one("keyup",f.remove.buttonFocus))},setup:{api:function(){var e={on:!1,action:"search",onFailure:f.error};f.verbose("First request, initializing API"),C.api(e)}},can:{useAPI:function(){return e.fn.api!==n},transition:function(){return p.transition&&e.fn.transition!==n&&C.transition("is supported")}},is:{empty:function(){return""===T.html()},visible:function(){return T.filter(":visible").length>0},focused:function(){return k.filter(":focus").length>0}},get:{value:function(){return k.val()},results:function(){var e=C.data(h.results);return e},result:function(t,s){var n=!1;return t=t||f.get.value(),s=s||f.get.results(),"category"===p.type?(f.debug("Finding result that matches",t),e.each(s,function(s,r){return e.isArray(r.results)&&(n=f.search.object(t,r.results)[0],n.length>0)?!0:void 0})):(f.debug("Finding result in results object",t),n=f.search.object(t,s)[0]),n}},set:{focus:function(){C.addClass(m.focus)},loading:function(){C.addClass(m.loading)},value:function(e){f.verbose("Setting search input value",e),k.val(e),f.query()},buttonPressed:function(){A.addClass(m.pressed)}},remove:{loading:function(){C.removeClass(m.loading)},focus:function(){C.removeClass(m.focus)},buttonPressed:function(){A.removeClass(m.pressed)}},query:function(){var t=f.get.value(),s=f.read.cachedHTML(t);s?(f.debug("Reading result for "+t+" from cache"),f.addResults(s)):(f.debug("Querying for "+t),e.isPlainObject(p.source)||e.isArray(p.source)?f.search.local(t):f.can.useAPI()?p.apiSettings?(f.debug("Searching with specified API settings",p.apiSettings),f.search.remote(t)):e.api.settings.api.search!==n&&(f.debug("Searching with default search API endpoint"),f.search.remote(t)):f.error(y.source),p.onSearchQuery.call(q,t))},search:{local:function(e){var t,s=f.search.object(e,p.content);f.set.loading(),f.save.results(s),f.debug("Returned local search results",s),t=f.generateResults({results:s}),f.remove.loading(),f.write.cachedHTML(e,t),f.addResults(t)},remote:function(t){var s={onSuccess:function(e){f.parse.response.call(q,e,t)},urlData:{query:t}};C.api("get request")||f.setup.api(),e.extend(!0,s,p.apiSettings),f.debug("Executing search",s),f.cancel.query(),C.api("setting",s).api("query")},object:function(t,s){var r=[],a=[],i=e.isArray(p.searchFields)?p.searchFields:[p.searchFields],o=new RegExp(v.exact+t,"i"),c=new RegExp(t,"i");return s=s||p.source,s===n?(f.error(y.source),[]):(e.each(i,function(t,n){e.each(s,function(t,s){var i="string"==typeof s[n],u=-1==e.inArray(s,r)&&-1==e.inArray(s,a);i&&u&&(s[n].match(o)?r.push(s):p.searchFullText&&s[n].match(c)&&a.push(s))})}),e.merge(r,a))}},parse:{response:function(e,t){var s=f.generateResults(e);f.verbose("Parsing server response",e),e!==n&&(t&&(f.write.cachedHTML(t,s),e.results!==n&&f.save.results(e.results)),f.addResults(s))}},throttle:function(){clearTimeout(f.timer),f.has.minimumCharacters()?f.timer=setTimeout(f.query,p.searchDelay):f.hideResults()},cancel:{query:function(){f.can.useAPI()&&C.api("abort")}},has:{minimumCharacters:function(){var e=f.get.value(),t=e.length;return t>=p.minCharacters}},read:{cachedHTML:function(e){var t=C.data(h.cache);return p.cache?(f.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==n?t[e]:!1):!1}},save:{results:function(e){f.verbose("Saving current search results to metadata",e),C.data(h.results,e)}},write:{cachedHTML:function(e,t){var s=C.data(h.cache)!==n?C.data(h.cache):{};p.cache&&(f.verbose("Writing generated html to cache",e,t),s[e]=t,C.data(h.cache,s))}},addResults:function(t){return e.isFunction(p.onResultsAdd)&&p.onResultsAdd.call(T,t)===!1?(f.debug("onResultsAdd callback cancelled default action"),!1):(T.html(t),void f.showResults())},showResults:function(){f.is.visible()||!f.is.focused()||f.is.empty()||(f.can.transition()?(f.debug("Showing results with css animations"),T.transition({animation:p.transition+" in",duration:p.duration,queue:!0})):(f.debug("Showing results with javascript"),T.stop().fadeIn(p.duration,p.easing)),p.onResultsOpen.call(T))},hideResults:function(){f.is.visible()&&(f.can.transition()?(f.debug("Hiding results with css animations"),T.transition({animation:p.transition+" out",duration:p.duration,queue:!0})):(f.debug("Hiding results with javascript"),T.stop().fadeOut(p.duration,p.easing)),p.onResultsClose.call(T))},generateResults:function(t){f.debug("Generating html from response",t);var s=p.templates[p.type],n=e.isPlainObject(t.results)&&!e.isEmptyObject(t.results),r=e.isArray(t.results)&&t.results.length>0,a="";return n||r?(p.maxResults>0&&(n?"standard"==p.type&&f.error(y.maxResults):t.results=t.results.slice(0,p.maxResults)),e.isFunction(s)?a=s(t):f.error(y.noTemplate,!1)):a=f.displayMessage(y.noResults,"empty"),p.onResults.call(q,t),a},displayMessage:function(e,t){return t=t||"standard",f.debug("Displaying message",e,t),f.addResults(p.templates.message(e,t)),p.templates.message(e,t)},setting:function(t,s){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(s===n)return p[t];p[t]=s}},internal:function(t,s){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(s===n)return f[t];f[t]=s}},debug:function(){p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))},error:function(){f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments)},performance:{log:function(e){var t,s,n;p.performance&&(t=(new Date).getTime(),n=c||t,s=t-n,c=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:q,"Execution Time":s})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,100)},display:function(){var t=p.name+":",s=0;c=!1,clearTimeout(f.performance.timer),e.each(u,function(e,t){s+=t["Execution Time"]}),t+=" "+s+"ms",o&&(t+=" '"+o+"'"),i.length>1&&(t+=" ("+i.length+")"),(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,s,r){var i,o,c,u=S;return s=s||g,r=q||r,"string"==typeof t&&u!==n&&(t=t.split(/[\. ]/),i=t.length-1,e.each(t,function(s,r){var a=s!=i?r+t[s+1].charAt(0).toUpperCase()+t[s+1].slice(1):t;if(e.isPlainObject(u[a])&&s!=i)u=u[a];else{if(u[a]!==n)return o=u[a],!1;if(!e.isPlainObject(u[r])||s==i)return u[r]!==n?(o=u[r],!1):!1;u=u[r]}})),e.isFunction(o)?c=o.apply(r,s):o!==n&&(c=o),e.isArray(a)?a.push(c):a!==n?a=[a,c]:c!==n&&(a=c),o}},d?(S===n&&f.initialize(),f.invoke(l)):(S!==n&&S.invoke("destroy"),f.initialize())}),a!==n?a:this},e.fn.search.settings={name:"Search Module",namespace:"search",debug:!1,verbose:!0,performance:!0,type:"standard",minCharacters:1,apiSettings:!1,source:!1,searchFields:["title","description"],searchFullText:!0,automatic:"true",hideDelay:0,searchDelay:100,maxResults:7,cache:!0,transition:"scale",duration:300,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(){},onResults:function(){},onResultsOpen:function(){},onResultsClose:function(){},className:{active:"active",empty:"empty",focus:"focus",loading:"loading",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noTemplate:"A valid template name was not specified.",serverError:"There was an issue with querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results"},regExp:{exact:"(?:s|^)"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,s=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r=function(e){return n[e]};return s.test(e)?e.replace(t,r):e},message:function(e,t){var s="";return e!==n&&t!==n&&(s+='<div class="message '+t+'">',s+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",s+="</div>"),s},category:function(t){var s="",r=e.fn.search.settings.templates.escape;return t.results!==n?(e.each(t.results,function(t,a){a.results!==n&&a.results.length>0&&(s+='<div class="category"><div class="name">'+a.name+"</div>",e.each(a.results,function(e,t){s+='<div class="result">',t.url&&(s+='<a href="'+t.url+'"></a>'),t.image!==n&&(t.image=r(t.image),s+='<div class="image"> <img src="'+t.image+'" alt=""></div>'),s+='<div class="content">',t.price!==n&&(t.price=r(t.price),s+='<div class="price">'+t.price+"</div>"),t.title!==n&&(t.title=r(t.title),s+='<div class="title">'+t.title+"</div>"),t.description!==n&&(s+='<div class="description">'+t.description+"</div>"),s+="</div></div>"}),s+="</div>")}),t.action&&(s+='<a href="'+t.action.url+'" class="action">'+t.action.text+"</a>"),s):!1},standard:function(t){var s="";return t.results!==n?(e.each(t.results,function(e,t){s+=t.url?'<a class="result" href="'+t.url+'">':'<a class="result">',t.image!==n&&(s+='<div class="image"> <img src="'+t.image+'"></div>'),s+='<div class="content">',t.price!==n&&(s+='<div class="price">'+t.price+"</div>"),t.title!==n&&(s+='<div class="title">'+t.title+"</div>"),t.description!==n&&(s+='<div class="description">'+t.description+"</div>"),s+="</div>",s+="</a>"}),t.action&&(s+='<a href="'+t.action.url+'" class="action">'+t.action.text+"</a>"),s):!1}}}}(jQuery,window,document); |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
@@ -368,8 +368,17 @@ /* | ||
module.refresh(); | ||
if(module.othersActive() && module.get.transition() !== 'overlay') { | ||
if(module.othersActive()) { | ||
module.debug('Other sidebars currently visible'); | ||
settings.transition = 'overlay'; | ||
if(settings.exclusive) { | ||
module.hideOthers(); | ||
// if not overlay queue animation after hide | ||
if(settings.transition != 'overlay') { | ||
module.hideOthers(module.show); | ||
return; | ||
} | ||
else { | ||
module.hideOthers(); | ||
} | ||
} | ||
else { | ||
settings.transition = 'overlay'; | ||
} | ||
} | ||
@@ -426,4 +435,3 @@ animateMethod(function() { | ||
; | ||
callback = callback || function(){}; | ||
callback = callback || function(){}; | ||
$otherSidebars | ||
@@ -430,0 +438,0 @@ .sidebar('hide', function() { |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -11,2 +11,2 @@ * http://www.semantic-ui.com/ | ||
*/ | ||
!function(e,i,n,t){"use strict";e.fn.sidebar=function(o){var r,s=e(this),a=e(i),l=e(n),c=e("html"),u=e("head"),d=s.selector||"",f=(new Date).getTime(),m=[],b=arguments[0],g="string"==typeof b,v=[].slice.call(arguments,1),h=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame||function(e){setTimeout(e,0)};return s.each(function(){var s,p,y,k,w,x,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.sidebar.settings,o):e.extend({},e.fn.sidebar.settings),C=T.selector,S=T.className,A=T.namespace,P=T.regExp,F=T.error,O="."+A,E="module-"+A,D=e(this),H=e(T.context),L=D.children(C.sidebar),j=H.children(C.fixed),z=H.children(C.pusher),M=this,R=D.data(E);x={initialize:function(){x.debug("Initializing sidebar",o),x.create.id(),w=x.get.transitionEvent(),("auto"==T.useLegacy&&x.is.legacy()||T.useLegacy===!0)&&(T.transition="overlay",T.useLegacy=!0),x.is.ios()&&x.set.ios(),T.delaySetup?h(x.setup.layout):x.setup.layout(),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),R=x,D.data(E,x)},create:{id:function(){x.verbose("Creating unique id for element"),y=x.get.uniqueID(),p="."+y}},destroy:function(){x.verbose("Destroying previous module for",D),x.remove.direction(),D.off(O).removeData(E),H.off(p),a.off(p),l.off(p)},event:{clickaway:function(e){var i=z.find(e.target).length>0||z.is(e.target),n=H.is(e.target);i&&(x.verbose("User clicked on dimmed page"),x.hide()),n&&(x.verbose("User clicked on dimmable context (scaled out page)"),x.hide())},touch:function(){},containScroll:function(){M.scrollTop<=0&&(M.scrollTop=1),M.scrollTop+M.offsetHeight>=M.scrollHeight&&(M.scrollTop=M.scrollHeight-M.offsetHeight-1)},scroll:function(i){0===e(i.target).closest(C.sidebar).length&&i.preventDefault()}},bind:{clickaway:function(){x.verbose("Adding clickaway events to context",H),T.closable&&H.on("click"+p,x.event.clickaway).on("touchend"+p,x.event.clickaway)},scrollLock:function(){T.scrollLock&&(x.debug("Disabling page scroll"),a.on("DOMMouseScroll"+p,x.event.scroll)),x.verbose("Adding events to contain sidebar scroll"),l.on("touchmove"+p,x.event.touch),D.on("scroll"+O,x.event.containScroll)}},unbind:{clickaway:function(){x.verbose("Removing clickaway events from context",H),H.off(p)},scrollLock:function(){x.verbose("Removing scroll lock from page"),l.off(p),a.off(p),D.off("scroll"+O)}},add:{bodyCSS:function(){var i,n=D.outerWidth(),t=D.outerHeight(),o=x.get.direction(),r={left:n,right:-n,top:t,bottom:-t};x.is.rtl()&&(x.verbose("RTL detected, flipping widths"),r.left=-n,r.right=n),i='<style title="'+A+'">',"left"===o||"right"===o?(x.debug("Adding CSS rules for animation distance",n),i+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { -webkit-transform: translate3d("+r[o]+"px, 0, 0); transform: translate3d("+r[o]+"px, 0, 0); }"):("top"===o||"bottom"==o)&&(i+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+r[o]+"px, 0); transform: translate3d(0, "+r[o]+"px, 0); }"),x.is.ie()&&("left"===o||"right"===o?(x.debug("Adding CSS rules for animation distance",n),i+=" body.pushable > .ui.visible."+o+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+r[o]+"px, 0, 0); transform: translate3d("+r[o]+"px, 0, 0); }"):("top"===o||"bottom"==o)&&(i+=" body.pushable > .ui.visible."+o+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+r[o]+"px, 0); transform: translate3d(0, "+r[o]+"px, 0); }"),i+=" 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(0px, 0, 0); transform: translate3d(0px, 0, 0); }"),i+="</style>",u.append(i),s=e("style[title="+A+"]"),x.debug("Adding sizing css to head",s)}},refresh:function(){x.verbose("Refreshing selector cache"),H=e(T.context),L=H.children(C.sidebar),z=H.children(C.pusher),j=H.children(C.fixed)},refreshSidebars:function(){x.verbose("Refreshing other sidebars"),L=H.children(C.sidebar)},repaint:function(){x.verbose("Forcing repaint event"),M.style.display="none",M.offsetHeight,M.scrollTop=M.scrollTop,M.style.display=""},setup:{layout:function(){0===H.children(C.pusher).length&&(x.debug("Adding wrapper element for sidebar"),x.error(F.pusher),z=e('<div class="pusher" />'),H.children().not(C.omitted).not(L).wrapAll(z),x.refresh()),(0===D.nextAll(C.pusher).length||D.nextAll(C.pusher)[0]!==z[0])&&(x.debug("Moved sidebar to correct parent element"),x.error(F.movedSidebar,M),D.detach().prependTo(H),x.refresh()),x.set.pushable(),x.set.direction()}},attachEvents:function(i,n){var t=e(i);n=e.isFunction(x[n])?x[n]:x.toggle,t.length>0?(x.debug("Attaching sidebar events to element",i,n),t.on("click"+O,n)):x.error(F.notFound,i)},show:function(i){var n=T.useLegacy===!0?x.legacyPushPage:x.pushPage;i=e.isFunction(i)?i:function(){},x.is.hidden()?(x.refreshSidebars(),T.overlay&&(x.error(F.overlay),T.transition="overlay"),x.refresh(),x.othersActive()&&"overlay"!==x.get.transition()&&(x.debug("Other sidebars currently visible"),T.transition="overlay",T.exclusive&&x.hideOthers()),n(function(){i.call(M),T.onShow.call(M)}),T.onChange.call(M),T.onVisible.call(M)):x.debug("Sidebar is already visible")},hide:function(i){var n=T.useLegacy===!0?x.legacyPullPage:x.pullPage;i=e.isFunction(i)?i:function(){},(x.is.visible()||x.is.animating())&&(x.debug("Hiding sidebar",i),x.refreshSidebars(),n(function(){i.call(M),T.onHidden.call(M)}),T.onChange.call(M),T.onHide.call(M))},othersAnimating:function(){return L.not(D).filter("."+S.animating).length>0},othersVisible:function(){return L.not(D).filter("."+S.visible).length>0},othersActive:function(){return x.othersVisible()||x.othersAnimating()},hideOthers:function(e){var i=L.not(D).filter("."+S.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){t++,t==n&&e()})},toggle:function(){x.verbose("Determining toggled direction"),x.is.hidden()?x.show():x.hide()},pushPage:function(i){var n,t,o=x.get.transition(),r="safe"==o?H:"overlay"===o||x.othersActive()?D:z;i=e.isFunction(i)?i:function(){},"scale down"==T.transition&&x.scrollToTop(),x.set.transition(o),x.repaint(),n=function(){x.bind.clickaway(),x.add.bodyCSS(),x.set.animating(),x.set.visible(),x.othersVisible()||T.dimPage&&z.addClass(S.dimmed)},t=function(e){e.target==r[0]&&(r.off(w+p,t),x.remove.animating(),x.bind.scrollLock(),i.call(M))},r.off(w+p),r.on(w+p,t),h(n)},pullPage:function(i){var n,t,o=x.get.transition(),r="safe"==o?H:"overlay"==o||x.othersActive()?D:z;i=e.isFunction(i)?i:function(){},x.verbose("Removing context push state",x.get.direction()),x.set.transition(o),x.unbind.clickaway(),x.unbind.scrollLock(),n=function(){x.set.animating(),x.remove.visible(),T.dimPage&&!x.othersVisible()&&z.removeClass(S.dimmed)},t=function(e){e.target==r[0]&&(r.off(w+p,t),x.remove.animating(),x.remove.transition(),x.remove.bodyCSS(),("scale down"==o||T.returnScroll&&x.is.mobile())&&x.scrollBack(),i.call(M))},r.off(w+p),r.on(w+p,t),h(n)},legacyPushPage:function(i){var n=D.width(),t=x.get.direction(),o={};n=n||D.width(),i=e.isFunction(i)?i:function(){},o[t]=n,x.debug("Using javascript to push context",o),x.set.visible(),x.set.transition(),x.set.animating(),T.dimPage&&z.addClass(S.dimmed),H.css("position","relative").animate(o,T.duration,T.easing,function(){x.remove.animating(),x.bind.clickaway(),i.call(M)})},legacyPullPage:function(i){var n=0,t=x.get.direction(),o={};n=n||D.width(),i=e.isFunction(i)?i:function(){},o[t]="0px",x.debug("Using javascript to pull context",o),x.unbind.clickaway(),x.set.animating(),x.remove.visible(),T.dimPage&&!x.othersActive()&&z.removeClass(S.dimmed),H.css("position","relative").animate(o,T.duration,T.easing,function(){x.remove.animating(),i.call(M)})},scrollToTop:function(){x.verbose("Scrolling to top of page to avoid animation issues"),k=e(i).scrollTop(),D.scrollTop(0),i.scrollTo(0,0)},scrollBack:function(){x.verbose("Scrolling back to original page position"),i.scrollTo(0,k)},set:{ios:function(){c.addClass(S.ios)},pushed:function(){H.addClass(S.pushed)},pushable:function(){H.addClass(S.pushable)},active:function(){D.addClass(S.active)},animating:function(){D.addClass(S.animating)},transition:function(e){e=e||x.get.transition(),D.addClass(e)},direction:function(e){e=e||x.get.direction(),D.addClass(S[e])},visible:function(){D.addClass(S.visible)},overlay:function(){D.addClass(S.overlay)}},remove:{bodyCSS:function(){x.debug("Removing body css styles",s),s&&s.length>0&&s.remove()},pushed:function(){H.removeClass(S.pushed)},pushable:function(){H.removeClass(S.pushable)},active:function(){D.removeClass(S.active)},animating:function(){D.removeClass(S.animating)},transition:function(e){e=e||x.get.transition(),D.removeClass(e)},direction:function(e){e=e||x.get.direction(),D.removeClass(S[e])},visible:function(){D.removeClass(S.visible)},overlay:function(){D.removeClass(S.overlay)}},get:{direction:function(){return D.hasClass(S.top)?S.top:D.hasClass(S.right)?S.right:D.hasClass(S.bottom)?S.bottom:S.left},transition:function(){var e,i=x.get.direction();return e=x.is.mobile()?"auto"==T.mobileTransition?T.defaultTransition.mobile[i]:T.mobileTransition:"auto"==T.transition?T.defaultTransition.computer[i]:T.transition,x.verbose("Determined transition",e),e},transitionEvent:function(){var e,i=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(i.style[e]!==t)return o[e]},uniqueID:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},is:{ie:function(){var e=!i.ActiveXObject&&"ActiveXObject"in i,n="ActiveXObject"in i;return e||n},legacy:function(){var e,o=n.createElement("div"),r={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(o,null);for(var s in r)o.style[s]!==t&&(o.style[s]="translate3d(1px,1px,1px)",e=i.getComputedStyle(o).getPropertyValue(r[s]));return n.body.removeChild(o),!(e!==t&&e.length>0&&"none"!==e)},ios:function(){var e=navigator.userAgent,i=e.match(P.ios);return i?(x.verbose("Browser was found to be iOS",e),!0):!1},mobile:function(){var e=navigator.userAgent,i=e.match(P.mobile);return i?(x.verbose("Browser was found to be mobile",e),!0):(x.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!x.is.visible()},visible:function(){return D.hasClass(S.visible)},open:function(){return x.is.visible()},closed:function(){return x.is.hidden()},vertical:function(){return D.hasClass(S.top)},animating:function(){return H.hasClass(S.animating)},rtl:function(){return"rtl"==D.css("direction")}},setting:function(i,n){if(x.debug("Changing setting",i,n),e.isPlainObject(i))e.extend(!0,T,i);else{if(n===t)return T[i];T[i]=n}},internal:function(i,n){if(e.isPlainObject(i))e.extend(!0,x,i);else{if(n===t)return x[i];x[i]=n}},debug:function(){T.debug&&(T.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,T.name+":"),x.debug.apply(console,arguments)))},verbose:function(){T.verbose&&T.debug&&(T.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,T.name+":"),x.verbose.apply(console,arguments)))},error:function(){x.error=Function.prototype.bind.call(console.error,console,T.name+":"),x.error.apply(console,arguments)},performance:{log:function(e){var i,n,t;T.performance&&(i=(new Date).getTime(),t=f||i,n=i-t,f=i,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:M,"Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,100)},display:function(){var i=T.name+":",n=0;f=!1,clearTimeout(x.performance.timer),e.each(m,function(e,i){n+=i["Execution Time"]}),i+=" "+n+"ms",d&&(i+=" '"+d+"'"),(console.group!==t||console.table!==t)&&m.length>0&&(console.groupCollapsed(i),console.table?console.table(m):e.each(m,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(i,n,o){var s,a,l,c=R;return n=n||v,o=M||o,"string"==typeof i&&c!==t&&(i=i.split(/[\. ]/),s=i.length-1,e.each(i,function(n,o){var r=n!=s?o+i[n+1].charAt(0).toUpperCase()+i[n+1].slice(1):i;if(e.isPlainObject(c[r])&&n!=s)c=c[r];else{if(c[r]!==t)return a=c[r],!1;if(!e.isPlainObject(c[o])||n==s)return c[o]!==t?(a=c[o],!1):(x.error(F.method,i),!1);c=c[o]}})),e.isFunction(a)?l=a.apply(o,n):a!==t&&(l=a),e.isArray(r)?r.push(l):r!==t?r=[r,l]:l!==t&&(r=l),a}},g?(R===t&&x.initialize(),x.invoke(b)):(R!==t&&x.invoke("destroy"),x.initialize())}),r!==t?r:this},e.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",debug:!1,verbose:!0,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,useLegacy:"auto",duration:500,easing:"easeInOutQuint",onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{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,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"}},e.extend(e.easing,{easeInOutQuint:function(e,i,n,t,o){return(i/=o/2)<1?t/2*i*i*i*i*i+n:t/2*((i-=2)*i*i*i*i+2)+n}})}(jQuery,window,document); | ||
!function(e,i,n,t){"use strict";e.fn.sidebar=function(o){var r,s=e(this),a=e(i),l=e(n),c=e("html"),u=e("head"),d=s.selector||"",f=(new Date).getTime(),m=[],b=arguments[0],g="string"==typeof b,v=[].slice.call(arguments,1),h=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame||function(e){setTimeout(e,0)};return s.each(function(){var s,p,y,w,k,x,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.sidebar.settings,o):e.extend({},e.fn.sidebar.settings),C=T.selector,S=T.className,A=T.namespace,P=T.regExp,F=T.error,O="."+A,E="module-"+A,D=e(this),H=e(T.context),L=D.children(C.sidebar),j=H.children(C.fixed),z=H.children(C.pusher),M=this,R=D.data(E);x={initialize:function(){x.debug("Initializing sidebar",o),x.create.id(),k=x.get.transitionEvent(),("auto"==T.useLegacy&&x.is.legacy()||T.useLegacy===!0)&&(T.transition="overlay",T.useLegacy=!0),x.is.ios()&&x.set.ios(),T.delaySetup?h(x.setup.layout):x.setup.layout(),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),R=x,D.data(E,x)},create:{id:function(){x.verbose("Creating unique id for element"),y=x.get.uniqueID(),p="."+y}},destroy:function(){x.verbose("Destroying previous module for",D),x.remove.direction(),D.off(O).removeData(E),H.off(p),a.off(p),l.off(p)},event:{clickaway:function(e){var i=z.find(e.target).length>0||z.is(e.target),n=H.is(e.target);i&&(x.verbose("User clicked on dimmed page"),x.hide()),n&&(x.verbose("User clicked on dimmable context (scaled out page)"),x.hide())},touch:function(){},containScroll:function(){M.scrollTop<=0&&(M.scrollTop=1),M.scrollTop+M.offsetHeight>=M.scrollHeight&&(M.scrollTop=M.scrollHeight-M.offsetHeight-1)},scroll:function(i){0===e(i.target).closest(C.sidebar).length&&i.preventDefault()}},bind:{clickaway:function(){x.verbose("Adding clickaway events to context",H),T.closable&&H.on("click"+p,x.event.clickaway).on("touchend"+p,x.event.clickaway)},scrollLock:function(){T.scrollLock&&(x.debug("Disabling page scroll"),a.on("DOMMouseScroll"+p,x.event.scroll)),x.verbose("Adding events to contain sidebar scroll"),l.on("touchmove"+p,x.event.touch),D.on("scroll"+O,x.event.containScroll)}},unbind:{clickaway:function(){x.verbose("Removing clickaway events from context",H),H.off(p)},scrollLock:function(){x.verbose("Removing scroll lock from page"),l.off(p),a.off(p),D.off("scroll"+O)}},add:{bodyCSS:function(){var i,n=D.outerWidth(),t=D.outerHeight(),o=x.get.direction(),r={left:n,right:-n,top:t,bottom:-t};x.is.rtl()&&(x.verbose("RTL detected, flipping widths"),r.left=-n,r.right=n),i='<style title="'+A+'">',"left"===o||"right"===o?(x.debug("Adding CSS rules for animation distance",n),i+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { -webkit-transform: translate3d("+r[o]+"px, 0, 0); transform: translate3d("+r[o]+"px, 0, 0); }"):("top"===o||"bottom"==o)&&(i+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+r[o]+"px, 0); transform: translate3d(0, "+r[o]+"px, 0); }"),x.is.ie()&&("left"===o||"right"===o?(x.debug("Adding CSS rules for animation distance",n),i+=" body.pushable > .ui.visible."+o+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+r[o]+"px, 0, 0); transform: translate3d("+r[o]+"px, 0, 0); }"):("top"===o||"bottom"==o)&&(i+=" body.pushable > .ui.visible."+o+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+r[o]+"px, 0); transform: translate3d(0, "+r[o]+"px, 0); }"),i+=" 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(0px, 0, 0); transform: translate3d(0px, 0, 0); }"),i+="</style>",u.append(i),s=e("style[title="+A+"]"),x.debug("Adding sizing css to head",s)}},refresh:function(){x.verbose("Refreshing selector cache"),H=e(T.context),L=H.children(C.sidebar),z=H.children(C.pusher),j=H.children(C.fixed)},refreshSidebars:function(){x.verbose("Refreshing other sidebars"),L=H.children(C.sidebar)},repaint:function(){x.verbose("Forcing repaint event"),M.style.display="none",M.offsetHeight,M.scrollTop=M.scrollTop,M.style.display=""},setup:{layout:function(){0===H.children(C.pusher).length&&(x.debug("Adding wrapper element for sidebar"),x.error(F.pusher),z=e('<div class="pusher" />'),H.children().not(C.omitted).not(L).wrapAll(z),x.refresh()),(0===D.nextAll(C.pusher).length||D.nextAll(C.pusher)[0]!==z[0])&&(x.debug("Moved sidebar to correct parent element"),x.error(F.movedSidebar,M),D.detach().prependTo(H),x.refresh()),x.set.pushable(),x.set.direction()}},attachEvents:function(i,n){var t=e(i);n=e.isFunction(x[n])?x[n]:x.toggle,t.length>0?(x.debug("Attaching sidebar events to element",i,n),t.on("click"+O,n)):x.error(F.notFound,i)},show:function(i){var n=T.useLegacy===!0?x.legacyPushPage:x.pushPage;if(i=e.isFunction(i)?i:function(){},x.is.hidden()){if(x.refreshSidebars(),T.overlay&&(x.error(F.overlay),T.transition="overlay"),x.refresh(),x.othersActive())if(x.debug("Other sidebars currently visible"),T.exclusive){if("overlay"!=T.transition)return void x.hideOthers(x.show);x.hideOthers()}else T.transition="overlay";n(function(){i.call(M),T.onShow.call(M)}),T.onChange.call(M),T.onVisible.call(M)}else x.debug("Sidebar is already visible")},hide:function(i){var n=T.useLegacy===!0?x.legacyPullPage:x.pullPage;i=e.isFunction(i)?i:function(){},(x.is.visible()||x.is.animating())&&(x.debug("Hiding sidebar",i),x.refreshSidebars(),n(function(){i.call(M),T.onHidden.call(M)}),T.onChange.call(M),T.onHide.call(M))},othersAnimating:function(){return L.not(D).filter("."+S.animating).length>0},othersVisible:function(){return L.not(D).filter("."+S.visible).length>0},othersActive:function(){return x.othersVisible()||x.othersAnimating()},hideOthers:function(e){var i=L.not(D).filter("."+S.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){t++,t==n&&e()})},toggle:function(){x.verbose("Determining toggled direction"),x.is.hidden()?x.show():x.hide()},pushPage:function(i){var n,t,o=x.get.transition(),r="safe"==o?H:"overlay"===o||x.othersActive()?D:z;i=e.isFunction(i)?i:function(){},"scale down"==T.transition&&x.scrollToTop(),x.set.transition(o),x.repaint(),n=function(){x.bind.clickaway(),x.add.bodyCSS(),x.set.animating(),x.set.visible(),x.othersVisible()||T.dimPage&&z.addClass(S.dimmed)},t=function(e){e.target==r[0]&&(r.off(k+p,t),x.remove.animating(),x.bind.scrollLock(),i.call(M))},r.off(k+p),r.on(k+p,t),h(n)},pullPage:function(i){var n,t,o=x.get.transition(),r="safe"==o?H:"overlay"==o||x.othersActive()?D:z;i=e.isFunction(i)?i:function(){},x.verbose("Removing context push state",x.get.direction()),x.set.transition(o),x.unbind.clickaway(),x.unbind.scrollLock(),n=function(){x.set.animating(),x.remove.visible(),T.dimPage&&!x.othersVisible()&&z.removeClass(S.dimmed)},t=function(e){e.target==r[0]&&(r.off(k+p,t),x.remove.animating(),x.remove.transition(),x.remove.bodyCSS(),("scale down"==o||T.returnScroll&&x.is.mobile())&&x.scrollBack(),i.call(M))},r.off(k+p),r.on(k+p,t),h(n)},legacyPushPage:function(i){var n=D.width(),t=x.get.direction(),o={};n=n||D.width(),i=e.isFunction(i)?i:function(){},o[t]=n,x.debug("Using javascript to push context",o),x.set.visible(),x.set.transition(),x.set.animating(),T.dimPage&&z.addClass(S.dimmed),H.css("position","relative").animate(o,T.duration,T.easing,function(){x.remove.animating(),x.bind.clickaway(),i.call(M)})},legacyPullPage:function(i){var n=0,t=x.get.direction(),o={};n=n||D.width(),i=e.isFunction(i)?i:function(){},o[t]="0px",x.debug("Using javascript to pull context",o),x.unbind.clickaway(),x.set.animating(),x.remove.visible(),T.dimPage&&!x.othersActive()&&z.removeClass(S.dimmed),H.css("position","relative").animate(o,T.duration,T.easing,function(){x.remove.animating(),i.call(M)})},scrollToTop:function(){x.verbose("Scrolling to top of page to avoid animation issues"),w=e(i).scrollTop(),D.scrollTop(0),i.scrollTo(0,0)},scrollBack:function(){x.verbose("Scrolling back to original page position"),i.scrollTo(0,w)},set:{ios:function(){c.addClass(S.ios)},pushed:function(){H.addClass(S.pushed)},pushable:function(){H.addClass(S.pushable)},active:function(){D.addClass(S.active)},animating:function(){D.addClass(S.animating)},transition:function(e){e=e||x.get.transition(),D.addClass(e)},direction:function(e){e=e||x.get.direction(),D.addClass(S[e])},visible:function(){D.addClass(S.visible)},overlay:function(){D.addClass(S.overlay)}},remove:{bodyCSS:function(){x.debug("Removing body css styles",s),s&&s.length>0&&s.remove()},pushed:function(){H.removeClass(S.pushed)},pushable:function(){H.removeClass(S.pushable)},active:function(){D.removeClass(S.active)},animating:function(){D.removeClass(S.animating)},transition:function(e){e=e||x.get.transition(),D.removeClass(e)},direction:function(e){e=e||x.get.direction(),D.removeClass(S[e])},visible:function(){D.removeClass(S.visible)},overlay:function(){D.removeClass(S.overlay)}},get:{direction:function(){return D.hasClass(S.top)?S.top:D.hasClass(S.right)?S.right:D.hasClass(S.bottom)?S.bottom:S.left},transition:function(){var e,i=x.get.direction();return e=x.is.mobile()?"auto"==T.mobileTransition?T.defaultTransition.mobile[i]:T.mobileTransition:"auto"==T.transition?T.defaultTransition.computer[i]:T.transition,x.verbose("Determined transition",e),e},transitionEvent:function(){var e,i=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(i.style[e]!==t)return o[e]},uniqueID:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},is:{ie:function(){var e=!i.ActiveXObject&&"ActiveXObject"in i,n="ActiveXObject"in i;return e||n},legacy:function(){var e,o=n.createElement("div"),r={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(o,null);for(var s in r)o.style[s]!==t&&(o.style[s]="translate3d(1px,1px,1px)",e=i.getComputedStyle(o).getPropertyValue(r[s]));return n.body.removeChild(o),!(e!==t&&e.length>0&&"none"!==e)},ios:function(){var e=navigator.userAgent,i=e.match(P.ios);return i?(x.verbose("Browser was found to be iOS",e),!0):!1},mobile:function(){var e=navigator.userAgent,i=e.match(P.mobile);return i?(x.verbose("Browser was found to be mobile",e),!0):(x.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!x.is.visible()},visible:function(){return D.hasClass(S.visible)},open:function(){return x.is.visible()},closed:function(){return x.is.hidden()},vertical:function(){return D.hasClass(S.top)},animating:function(){return H.hasClass(S.animating)},rtl:function(){return"rtl"==D.css("direction")}},setting:function(i,n){if(x.debug("Changing setting",i,n),e.isPlainObject(i))e.extend(!0,T,i);else{if(n===t)return T[i];T[i]=n}},internal:function(i,n){if(e.isPlainObject(i))e.extend(!0,x,i);else{if(n===t)return x[i];x[i]=n}},debug:function(){T.debug&&(T.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,T.name+":"),x.debug.apply(console,arguments)))},verbose:function(){T.verbose&&T.debug&&(T.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,T.name+":"),x.verbose.apply(console,arguments)))},error:function(){x.error=Function.prototype.bind.call(console.error,console,T.name+":"),x.error.apply(console,arguments)},performance:{log:function(e){var i,n,t;T.performance&&(i=(new Date).getTime(),t=f||i,n=i-t,f=i,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:M,"Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,100)},display:function(){var i=T.name+":",n=0;f=!1,clearTimeout(x.performance.timer),e.each(m,function(e,i){n+=i["Execution Time"]}),i+=" "+n+"ms",d&&(i+=" '"+d+"'"),(console.group!==t||console.table!==t)&&m.length>0&&(console.groupCollapsed(i),console.table?console.table(m):e.each(m,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(i,n,o){var s,a,l,c=R;return n=n||v,o=M||o,"string"==typeof i&&c!==t&&(i=i.split(/[\. ]/),s=i.length-1,e.each(i,function(n,o){var r=n!=s?o+i[n+1].charAt(0).toUpperCase()+i[n+1].slice(1):i;if(e.isPlainObject(c[r])&&n!=s)c=c[r];else{if(c[r]!==t)return a=c[r],!1;if(!e.isPlainObject(c[o])||n==s)return c[o]!==t?(a=c[o],!1):(x.error(F.method,i),!1);c=c[o]}})),e.isFunction(a)?l=a.apply(o,n):a!==t&&(l=a),e.isArray(r)?r.push(l):r!==t?r=[r,l]:l!==t&&(r=l),a}},g?(R===t&&x.initialize(),x.invoke(b)):(R!==t&&x.invoke("destroy"),x.initialize())}),r!==t?r:this},e.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",debug:!1,verbose:!0,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,useLegacy:"auto",duration:500,easing:"easeInOutQuint",onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{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,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"}},e.extend(e.easing,{easeInOutQuint:function(e,i,n,t,o){return(i/=o/2)<1?t/2*i*i*i*i*i+n:t/2*((i-=2)*i*i*i*i+2)+n}})}(jQuery,window,document); |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
@@ -195,3 +195,4 @@ /* | ||
var | ||
apiRequest | ||
apiRequest, | ||
requestCancelled | ||
; | ||
@@ -201,4 +202,10 @@ if( module.allows('active') && module.is.enabled() ) { | ||
if($.fn.api !== undefined) { | ||
apiRequest = $module.api('get request'); | ||
if(apiRequest) { | ||
apiRequest = $module.api('get request'); | ||
requestCancelled = $module.api('was cancelled'); | ||
if( requestCancelled ) { | ||
module.debug('API Request cancelled by beforesend'); | ||
settings.activateTest = function(){ return false; }; | ||
settings.deactivateTest = function(){ return false; }; | ||
} | ||
else if(apiRequest) { | ||
module.listenTo(apiRequest); | ||
@@ -235,7 +242,2 @@ return; | ||
} | ||
// xhr exists but set to false, beforeSend killed the xhr | ||
else { | ||
settings.activateTest = function(){ return false; }; | ||
settings.deactivateTest = function(){ return false; }; | ||
} | ||
}, | ||
@@ -400,3 +402,3 @@ | ||
else { | ||
module.debug('Text is already sane, ignoring update', text); | ||
module.debug('Text is already set, ignoring update', text); | ||
} | ||
@@ -586,20 +588,20 @@ } | ||
// module info | ||
name : 'State', | ||
name : 'State', | ||
// debug output | ||
debug : false, | ||
debug : false, | ||
// verbose debug output | ||
verbose : true, | ||
verbose : true, | ||
// namespace for events | ||
namespace : 'state', | ||
namespace : 'state', | ||
// debug data includes performance | ||
performance: true, | ||
performance : true, | ||
// callback occurs on state change | ||
onActivate : function() {}, | ||
onDeactivate : function() {}, | ||
onChange : function() {}, | ||
onActivate : function() {}, | ||
onDeactivate : function() {}, | ||
onChange : function() {}, | ||
@@ -611,9 +613,9 @@ // state test functions | ||
// whether to automatically map default states | ||
automatic : true, | ||
automatic : true, | ||
// activate / deactivate changes all elements instantiated at same time | ||
sync : false, | ||
sync : false, | ||
// default flash text duration, used for temporarily changing text of an element | ||
flashDuration : 1000, | ||
flashDuration : 1000, | ||
@@ -630,3 +632,4 @@ // selector filter | ||
error: { | ||
method : 'The method you called is not defined.' | ||
beforeSend : 'The before send function has cancelled state change', | ||
method : 'The method you called is not defined.' | ||
}, | ||
@@ -633,0 +636,0 @@ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -11,2 +11,2 @@ * http://www.semantic-ui.com/ | ||
*/ | ||
!function(e,t,n,a){e.fn.state=function(t){var i,o=e(this),s=o.selector||"",r=("ontouchstart"in n.documentElement,(new Date).getTime()),c=[],u=arguments[0],l="string"==typeof u,d=[].slice.call(arguments,1);return o.each(function(){var n,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.state.settings,t):e.extend({},e.fn.state.settings),g=f.error,v=f.metadata,m=f.className,b=f.namespace,x=f.states,p=f.text,h="."+b,T=b+"-module",y=e(this),C=this,w=y.data(T);n={initialize:function(){n.verbose("Initializing module"),f.automatic&&n.add.defaults(),f.context&&""!==s?e(f.context).on(s,"mouseenter"+h,n.change.text).on(s,"mouseleave"+h,n.reset.text).on(s,"click"+h,n.toggle.state):y.on("mouseenter"+h,n.change.text).on("mouseleave"+h,n.reset.text).on("click"+h,n.toggle.state),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),w=n,y.data(T,n)},destroy:function(){n.verbose("Destroying previous module",w),y.off(h).removeData(T)},refresh:function(){n.verbose("Refreshing selector cache"),y=e(C)},add:{defaults:function(){var i=t&&e.isPlainObject(t.states)?t.states:{};e.each(f.defaults,function(t,o){n.is[t]!==a&&n.is[t]()&&(n.verbose("Adding default states",t,C),e.extend(f.states,o,i))})}},is:{active:function(){return y.hasClass(m.active)},loading:function(){return y.hasClass(m.loading)},inactive:function(){return!y.hasClass(m.active)},state:function(e){return m[e]===a?!1:y.hasClass(m[e])},enabled:function(){return!y.is(f.filter.active)},disabled:function(){return y.is(f.filter.active)},textEnabled:function(){return!y.is(f.filter.text)},button:function(){return y.is(".button:not(a, .submit)")},input:function(){return y.is("input")},progress:function(){return y.is(".ui.progress")}},allow:function(e){n.debug("Now allowing state",e),x[e]=!0},disallow:function(e){n.debug("No longer allowing",e),x[e]=!1},allows:function(e){return x[e]||!1},enable:function(){y.removeClass(m.disabled)},disable:function(){y.addClass(m.disabled)},setState:function(e){n.allows(e)&&y.addClass(m[e])},removeState:function(e){n.allows(e)&&y.removeClass(m[e])},toggle:{state:function(){var t;if(n.allows("active")&&n.is.enabled()){if(n.refresh(),e.fn.api!==a&&(t=y.api("get request")))return void n.listenTo(t);n.change.state()}}},listenTo:function(t){n.debug("API request detected, waiting for state signal",t),t?(p.loading&&n.update.text(p.loading),e.when(t).then(function(){"resolved"==t.state()?(n.debug("API request succeeded"),f.activateTest=function(){return!0},f.deactivateTest=function(){return!0}):(n.debug("API request failed"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1}),n.change.state()})):(f.activateTest=function(){return!1},f.deactivateTest=function(){return!1})},change:{state:function(){n.debug("Determining state change direction"),n.is.inactive()?n.activate():n.deactivate(),f.sync&&n.sync(),f.onChange.call(C)},text:function(){n.is.textEnabled()&&(n.is.disabled()?(n.verbose("Changing text to disabled text",p.hover),n.update.text(p.disabled)):n.is.active()?p.hover?(n.verbose("Changing text to hover text",p.hover),n.update.text(p.hover)):p.deactivate&&(n.verbose("Changing text to deactivating text",p.deactivate),n.update.text(p.deactivate)):p.hover?(n.verbose("Changing text to hover text",p.hover),n.update.text(p.hover)):p.activate&&(n.verbose("Changing text to activating text",p.activate),n.update.text(p.activate)))}},activate:function(){f.activateTest.call(C)&&(n.debug("Setting state to active"),y.addClass(m.active),n.update.text(p.active),f.onActivate.call(C))},deactivate:function(){f.deactivateTest.call(C)&&(n.debug("Setting state to inactive"),y.removeClass(m.active),n.update.text(p.inactive),f.onDeactivate.call(C))},sync:function(){n.verbose("Syncing other buttons to current state"),o.not(y).state(n.is.active()?"activate":"deactivate")},get:{text:function(){return f.selector.text?y.find(f.selector.text).text():y.html()},textFor:function(e){return p[e]||!1}},flash:{text:function(e,t,a){var i=n.get.text();n.debug("Flashing text message",e,t),e=e||f.text.flash,t=t||f.flashDuration,a=a||function(){},n.update.text(e),setTimeout(function(){n.update.text(i),a.call(C)},t)}},reset:{text:function(){var e=p.active||y.data(v.storedText),t=p.inactive||y.data(v.storedText);n.is.textEnabled()&&(n.is.active()&&e?(n.verbose("Resetting active text",e),n.update.text(e)):t&&(n.verbose("Resetting inactive text",e),n.update.text(t)))}},update:{text:function(e){var t=n.get.text();e&&e!==t?(n.debug("Updating text",e),f.selector.text?y.data(v.storedText,e).find(f.selector.text).text(e):y.data(v.storedText,e).html(e)):n.debug("Text is already sane, ignoring update",e)}},setting:function(t,i){if(n.debug("Changing setting",t,i),e.isPlainObject(t))e.extend(!0,f,t);else{if(i===a)return f[t];f[t]=i}},internal:function(t,i){if(e.isPlainObject(t))e.extend(!0,n,t);else{if(i===a)return n[t];n[t]=i}},debug:function(){f.debug&&(f.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,f.name+":"),n.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),n.verbose.apply(console,arguments)))},error:function(){n.error=Function.prototype.bind.call(console.error,console,f.name+":"),n.error.apply(console,arguments)},performance:{log:function(e){var t,a,i;f.performance&&(t=(new Date).getTime(),i=r||t,a=t-i,r=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":a})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,100)},display:function(){var t=f.name+":",i=0;r=!1,clearTimeout(n.performance.timer),e.each(c,function(e,t){i+=t["Execution Time"]}),t+=" "+i+"ms",s&&(t+=" '"+s+"'"),(console.group!==a||console.table!==a)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,o,s){var r,c,u,l=w;return o=o||d,s=C||s,"string"==typeof t&&l!==a&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(i,o){var s=i!=r?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(l[s])&&i!=r)l=l[s];else{if(l[s]!==a)return c=l[s],!1;if(!e.isPlainObject(l[o])||i==r)return l[o]!==a?(c=l[o],!1):(n.error(g.method,t),!1);l=l[o]}})),e.isFunction(c)?u=c.apply(s,o):c!==a&&(u=c),e.isArray(i)?i.push(u):i!==a?i=[i,u]:u!==a&&(i=u),c}},l?(w===a&&n.initialize(),n.invoke(u)):(w!==a&&w.invoke("destroy"),n.initialize())}),i!==a?i:this},e.fn.state.settings={name:"State",debug:!1,verbose:!0,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:{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); | ||
!function(e,t,n,a){e.fn.state=function(t){var i,o=e(this),s=o.selector||"",r=("ontouchstart"in n.documentElement,(new Date).getTime()),c=[],u=arguments[0],l="string"==typeof u,d=[].slice.call(arguments,1);return o.each(function(){var n,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.state.settings,t):e.extend({},e.fn.state.settings),g=f.error,v=f.metadata,b=f.className,m=f.namespace,x=f.states,p=f.text,h="."+m,T=m+"-module",y=e(this),w=this,C=y.data(T);n={initialize:function(){n.verbose("Initializing module"),f.automatic&&n.add.defaults(),f.context&&""!==s?e(f.context).on(s,"mouseenter"+h,n.change.text).on(s,"mouseleave"+h,n.reset.text).on(s,"click"+h,n.toggle.state):y.on("mouseenter"+h,n.change.text).on("mouseleave"+h,n.reset.text).on("click"+h,n.toggle.state),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),C=n,y.data(T,n)},destroy:function(){n.verbose("Destroying previous module",C),y.off(h).removeData(T)},refresh:function(){n.verbose("Refreshing selector cache"),y=e(w)},add:{defaults:function(){var i=t&&e.isPlainObject(t.states)?t.states:{};e.each(f.defaults,function(t,o){n.is[t]!==a&&n.is[t]()&&(n.verbose("Adding default states",t,w),e.extend(f.states,o,i))})}},is:{active:function(){return y.hasClass(b.active)},loading:function(){return y.hasClass(b.loading)},inactive:function(){return!y.hasClass(b.active)},state:function(e){return b[e]===a?!1:y.hasClass(b[e])},enabled:function(){return!y.is(f.filter.active)},disabled:function(){return y.is(f.filter.active)},textEnabled:function(){return!y.is(f.filter.text)},button:function(){return y.is(".button:not(a, .submit)")},input:function(){return y.is("input")},progress:function(){return y.is(".ui.progress")}},allow:function(e){n.debug("Now allowing state",e),x[e]=!0},disallow:function(e){n.debug("No longer allowing",e),x[e]=!1},allows:function(e){return x[e]||!1},enable:function(){y.removeClass(b.disabled)},disable:function(){y.addClass(b.disabled)},setState:function(e){n.allows(e)&&y.addClass(b[e])},removeState:function(e){n.allows(e)&&y.removeClass(b[e])},toggle:{state:function(){var t,i;if(n.allows("active")&&n.is.enabled()){if(n.refresh(),e.fn.api!==a)if(t=y.api("get request"),i=y.api("was cancelled"))n.debug("API Request cancelled by beforesend"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1};else if(t)return void n.listenTo(t);n.change.state()}}},listenTo:function(t){n.debug("API request detected, waiting for state signal",t),t&&(p.loading&&n.update.text(p.loading),e.when(t).then(function(){"resolved"==t.state()?(n.debug("API request succeeded"),f.activateTest=function(){return!0},f.deactivateTest=function(){return!0}):(n.debug("API request failed"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1}),n.change.state()}))},change:{state:function(){n.debug("Determining state change direction"),n.is.inactive()?n.activate():n.deactivate(),f.sync&&n.sync(),f.onChange.call(w)},text:function(){n.is.textEnabled()&&(n.is.disabled()?(n.verbose("Changing text to disabled text",p.hover),n.update.text(p.disabled)):n.is.active()?p.hover?(n.verbose("Changing text to hover text",p.hover),n.update.text(p.hover)):p.deactivate&&(n.verbose("Changing text to deactivating text",p.deactivate),n.update.text(p.deactivate)):p.hover?(n.verbose("Changing text to hover text",p.hover),n.update.text(p.hover)):p.activate&&(n.verbose("Changing text to activating text",p.activate),n.update.text(p.activate)))}},activate:function(){f.activateTest.call(w)&&(n.debug("Setting state to active"),y.addClass(b.active),n.update.text(p.active),f.onActivate.call(w))},deactivate:function(){f.deactivateTest.call(w)&&(n.debug("Setting state to inactive"),y.removeClass(b.active),n.update.text(p.inactive),f.onDeactivate.call(w))},sync:function(){n.verbose("Syncing other buttons to current state"),o.not(y).state(n.is.active()?"activate":"deactivate")},get:{text:function(){return f.selector.text?y.find(f.selector.text).text():y.html()},textFor:function(e){return p[e]||!1}},flash:{text:function(e,t,a){var i=n.get.text();n.debug("Flashing text message",e,t),e=e||f.text.flash,t=t||f.flashDuration,a=a||function(){},n.update.text(e),setTimeout(function(){n.update.text(i),a.call(w)},t)}},reset:{text:function(){var e=p.active||y.data(v.storedText),t=p.inactive||y.data(v.storedText);n.is.textEnabled()&&(n.is.active()&&e?(n.verbose("Resetting active text",e),n.update.text(e)):t&&(n.verbose("Resetting inactive text",e),n.update.text(t)))}},update:{text:function(e){var t=n.get.text();e&&e!==t?(n.debug("Updating text",e),f.selector.text?y.data(v.storedText,e).find(f.selector.text).text(e):y.data(v.storedText,e).html(e)):n.debug("Text is already set, ignoring update",e)}},setting:function(t,i){if(n.debug("Changing setting",t,i),e.isPlainObject(t))e.extend(!0,f,t);else{if(i===a)return f[t];f[t]=i}},internal:function(t,i){if(e.isPlainObject(t))e.extend(!0,n,t);else{if(i===a)return n[t];n[t]=i}},debug:function(){f.debug&&(f.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,f.name+":"),n.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),n.verbose.apply(console,arguments)))},error:function(){n.error=Function.prototype.bind.call(console.error,console,f.name+":"),n.error.apply(console,arguments)},performance:{log:function(e){var t,a,i;f.performance&&(t=(new Date).getTime(),i=r||t,a=t-i,r=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":a})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,100)},display:function(){var t=f.name+":",i=0;r=!1,clearTimeout(n.performance.timer),e.each(c,function(e,t){i+=t["Execution Time"]}),t+=" "+i+"ms",s&&(t+=" '"+s+"'"),(console.group!==a||console.table!==a)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,o,s){var r,c,u,l=C;return o=o||d,s=w||s,"string"==typeof t&&l!==a&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(i,o){var s=i!=r?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(l[s])&&i!=r)l=l[s];else{if(l[s]!==a)return c=l[s],!1;if(!e.isPlainObject(l[o])||i==r)return l[o]!==a?(c=l[o],!1):(n.error(g.method,t),!1);l=l[o]}})),e.isFunction(c)?u=c.apply(s,o):c!==a&&(u=c),e.isArray(i)?i.push(u):i!==a?i=[i,u]:u!==a&&(i=u),c}},l?(C===a&&n.initialize(),n.invoke(u)):(C!==a&&C.invoke("destroy"),n.initialize())}),i!==a?i:this},e.fn.state.settings={name:"State",debug:!1,verbose:!0,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); |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
@@ -38,3 +38,3 @@ /* | ||
$allModules | ||
.each(function() { | ||
.each(function(index) { | ||
var | ||
@@ -90,3 +90,8 @@ $module = $(this), | ||
module.verbose('Converted arguments into settings object', settings); | ||
module.animate(); | ||
if(settings.interval) { | ||
module.delay(settings.animate); | ||
} | ||
else { | ||
module.animate(); | ||
} | ||
module.instantiate(); | ||
@@ -137,2 +142,20 @@ } | ||
delay: function(interval) { | ||
var | ||
isReverse = (settings.reverse === true), | ||
shouldReverse = (settings.reverse == 'auto' && module.get.direction() == className.outward), | ||
delay | ||
; | ||
interval = (typeof interval !== undefined) | ||
? interval | ||
: settings.interval | ||
; | ||
delay = (isReverse || shouldReverse) | ||
? ($allModules.length - index) * settings.interval | ||
: index * settings.interval | ||
; | ||
module.debug('Delaying animation by', delay); | ||
setTimeout(module.animate, delay); | ||
}, | ||
animate: function(overrideSettings) { | ||
@@ -187,3 +210,3 @@ settings = overrideSettings || settings; | ||
complete: function () { | ||
complete: function (event) { | ||
module.verbose('CSS animation complete', settings.animation); | ||
@@ -326,9 +349,9 @@ module.remove.animationEndCallback(); | ||
; | ||
if($module.css('display') !== 'none') { | ||
module.verbose('Overriding default display to hide element'); | ||
$module | ||
.css('display', 'none') | ||
; | ||
} | ||
} | ||
if($module.css('display') !== 'none') { | ||
module.verbose('Overriding default display to hide element'); | ||
$module | ||
.css('display', 'none') | ||
; | ||
} | ||
}, | ||
@@ -354,3 +377,3 @@ visible: function() { | ||
clasName = $module.attr('class') || false, | ||
style = $module.attr('style') || '' | ||
style = $module.attr('style') || '' | ||
; | ||
@@ -380,2 +403,3 @@ $module.removeClass(settings.animation); | ||
module.verbose('Restoring original style attribute', module.cache.style); | ||
console.log('restoring cache', module.cache.style); | ||
$module.attr('style', module.cache.style); | ||
@@ -395,3 +419,5 @@ } | ||
; | ||
module.timer = setTimeout(module.complete, duration + 100); | ||
module.timer = setTimeout(function() { | ||
$module.trigger(animationEnd); | ||
}, duration + settings.failSafeDelay); | ||
module.verbose('Adding fail safe timer', module.timer); | ||
@@ -496,2 +522,27 @@ } | ||
}, | ||
direction: function(animation) { | ||
// quickest manually specified direction | ||
animation = animation || settings.animation; | ||
if(typeof animation === 'string') { | ||
animation = animation.split(' '); | ||
$.each(animation, function(index, word){ | ||
if(word === className.inward) { | ||
return className.inward; | ||
} | ||
else if(word === className.outward) { | ||
return className.outward; | ||
} | ||
}); | ||
} | ||
// slower backup | ||
if( !module.can.transition() ) { | ||
return 'static'; | ||
} | ||
if($module.is(':visible') && !module.is.hidden()) { | ||
return className.outward; | ||
} | ||
else { | ||
return className.inward; | ||
} | ||
}, | ||
duration: function(duration) { | ||
@@ -888,37 +939,46 @@ duration = duration || settings.duration; | ||
// module info | ||
name : 'Transition', | ||
name : 'Transition', | ||
// debug content outputted to console | ||
debug : false, | ||
debug : false, | ||
// verbose debug output | ||
verbose : true, | ||
verbose : true, | ||
// performance data output | ||
performance : true, | ||
performance : true, | ||
// event namespace | ||
namespace : 'transition', | ||
namespace : 'transition', | ||
// animation complete event | ||
onStart : function() {}, | ||
onComplete : function() {}, | ||
onShow : function() {}, | ||
onHide : function() {}, | ||
// delay between animations in group | ||
interval : 0, | ||
// whether group animations should be reversed | ||
reverse : 'auto', | ||
// animation callback event | ||
onStart : function() {}, | ||
onComplete : function() {}, | ||
onShow : function() {}, | ||
onHide : function() {}, | ||
// whether timeout should be used to ensure callback fires in cases animationend does not | ||
useFailSafe : true, | ||
useFailSafe : true, | ||
// delay in ms for fail safe | ||
failSafeDelay : 100, | ||
// whether EXACT animation can occur twice in a row | ||
allowRepeats : false, | ||
allowRepeats : false, | ||
// Override final display type on visible | ||
displayType : false, | ||
displayType : false, | ||
// animation duration | ||
animation : 'fade', | ||
duration : false, | ||
animation : 'fade', | ||
duration : false, | ||
// new animations will occur after previous ones | ||
queue : true, | ||
queue : true, | ||
@@ -925,0 +985,0 @@ metadata : { |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -11,2 +11,2 @@ * http://www.semantic-ui.com/ | ||
*/ | ||
!function(n,i,e,t){"use strict";n.fn.transition=function(){{var a,o=n(this),s=o.selector||"",r=(new Date).getTime(),l=[],m=arguments,d=m[0],c=[].slice.call(arguments,1),u="string"==typeof d;i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame||function(n){setTimeout(n,0)}}return o.each(function(){var i,f,p,g,v,b,y,h,C,w,A,T=n(this),S=this;A={initialize:function(){i=A.get.settings.apply(S,m),g=i.className,p=i.error,v=i.metadata,w="."+i.namespace,C="module-"+i.namespace,f=T.data(C)||A,y=A.get.animationEndEvent(),h=A.get.animationName(),b=A.get.animationStartEvent(),u&&(u=A.invoke(d)),u===!1&&(A.verbose("Converted arguments into settings object",i),A.animate(),A.instantiate())},instantiate:function(){A.verbose("Storing instance of module",A),f=A,T.data(C,f)},destroy:function(){A.verbose("Destroying previous module for",S),T.removeData(C)},refresh:function(){A.verbose("Refreshing display type on next animation"),delete A.displayType},forceRepaint:function(){A.verbose("Forcing element repaint");var n=T.parent(),i=T.next();0===i.length?T.detach().appendTo(n):T.detach().insertBefore(i)},repaint:function(){A.verbose("Repainting element");S.offsetWidth},animate:function(n){if(i=n||i,!A.is.supported())return A.error(p.support),!1;if(A.debug("Preparing animation",i.animation),A.is.animating()){if(i.queue)return!i.allowRepeats&&A.has.direction()&&A.is.occurring()&&A.queuing!==!0?A.debug("Animation is currently occurring, preventing queueing same animation",i.animation):A.queue(i.animation),!1;if(!i.allowRepeats&&A.is.occurring())return A.debug("Animation is already occurring, will not execute repeated animation",i.animation),!1}A.can.animate()?A.set.animating(i.animation):A.error(p.noAnimation,i.animation,S)},reset:function(){A.debug("Resetting animation to beginning conditions"),A.remove.animationEndCallback(),A.restore.conditions(),A.remove.animating()},queue:function(n){A.debug("Queueing animation of",n),A.queuing=!0,T.one(y+w,function(){A.queuing=!1,A.repaint(),A.animate.apply(this,i)})},complete:function(){A.verbose("CSS animation complete",i.animation),A.remove.animationEndCallback(),A.remove.failSafe(),A.is.looping()||(A.is.outward()?(A.verbose("Animation is outward, hiding element"),A.restore.conditions(),A.hide(),i.onHide.call(this)):A.is.inward()?(A.verbose("Animation is outward, showing element"),A.restore.conditions(),A.show(),A.set.display(),i.onShow.call(this)):A.restore.conditions(),A.remove.animation(),A.remove.animating()),i.onComplete.call(this)},has:{direction:function(e){var t=!1;return e=e||i.animation,"string"==typeof e&&(e=e.split(" "),n.each(e,function(n,i){(i===g.inward||i===g.outward)&&(t=!0)})),t},inlineDisplay:function(){var i=T.attr("style")||"";return n.isArray(i.match(/display.*?;/,""))}},set:{animating:function(n){n=n||i.animation,A.is.animating()||A.save.conditions(),A.remove.direction(),A.remove.animationEndCallback(),A.can.transition()&&!A.has.direction()&&A.set.direction(),A.remove.hidden(),A.set.display(),T.addClass(g.animating+" "+g.transition+" "+n).addClass(n).one(y+".complete"+w,A.complete),i.useFailSafe&&A.add.failSafe(),A.set.duration(i.duration),i.onStart.call(this),A.debug("Starting tween",n,T.attr("class"))},duration:function(n,e){e=e||i.duration,e="number"==typeof e?e+"ms":e,A.verbose("Setting animation duration",e),(e||0===e)&&T.css({"-webkit-animation-duration":e,"-moz-animation-duration":e,"-ms-animation-duration":e,"-o-animation-duration":e,"animation-duration":e})},display:function(){var n=A.get.style(),i=A.get.displayType(),e=n+"display: "+i+" !important;";T.css("display",""),A.refresh(),T.css("display")!==i&&(A.verbose("Setting inline visibility to",i),T.attr("style",e))},direction:function(){T.is(":visible")&&!A.is.hidden()?(A.debug("Automatically determining the direction of animation","Outward"),T.removeClass(g.inward).addClass(g.outward)):(A.debug("Automatically determining the direction of animation","Inward"),T.removeClass(g.outward).addClass(g.inward))},looping:function(){A.debug("Transition set to loop"),T.addClass(g.looping)},hidden:function(){A.is.hidden()||(T.addClass(g.transition).addClass(g.hidden),"none"!==T.css("display")&&(A.verbose("Overriding default display to hide element"),T.css("display","none")))},visible:function(){T.addClass(g.transition).addClass(g.visible)}},save:{displayType:function(n){T.data(v.displayType,n)},transitionExists:function(i,e){n.fn.transition.exists[i]=e,A.verbose("Saving existence of transition",i,e)},conditions:function(){T.attr("class")||!1,T.attr("style")||"";T.removeClass(i.animation),A.remove.direction(),A.cache={className:T.attr("class"),style:A.get.style()},A.verbose("Saving original attributes",A.cache)}},restore:{conditions:function(){return A.cache===t?!1:(A.cache.className?T.attr("class",A.cache.className):T.removeAttr("class"),A.cache.style&&(A.verbose("Restoring original style attribute",A.cache.style),T.attr("style",A.cache.style)),A.is.looping()&&A.remove.looping(),void A.verbose("Restoring original attributes",A.cache))}},add:{failSafe:function(){var n=A.get.duration();A.timer=setTimeout(A.complete,n+100),A.verbose("Adding fail safe timer",A.timer)}},remove:{animating:function(){T.removeClass(g.animating)},animation:function(){T.css({"-webkit-animation":"","-moz-animation":"","-ms-animation":"","-o-animation":"",animation:""})},animationEndCallback:function(){T.off(".complete")},display:function(){T.css("display","")},direction:function(){T.removeClass(g.inward).removeClass(g.outward)},failSafe:function(){A.verbose("Removing fail safe timer",A.timer),A.timer&&clearTimeout(A.timer)},hidden:function(){T.removeClass(g.hidden)},visible:function(){T.removeClass(g.visible)},looping:function(){A.debug("Transitions are no longer looping"),T.removeClass(g.looping),A.forceRepaint()},transition:function(){T.removeClass(g.visible).removeClass(g.hidden)}},get:{settings:function(i,e,t){return"object"==typeof i?n.extend(!0,{},n.fn.transition.settings,i):"function"==typeof t?n.extend({},n.fn.transition.settings,{animation:i,onComplete:t,duration:e}):"string"==typeof e||"number"==typeof e?n.extend({},n.fn.transition.settings,{animation:i,duration:e}):"object"==typeof e?n.extend({},n.fn.transition.settings,e,{animation:i}):"function"==typeof e?n.extend({},n.fn.transition.settings,{animation:i,onComplete:e}):n.extend({},n.fn.transition.settings,{animation:i})},duration:function(n){return n=n||i.duration,n===!1&&(n=T.css("animation-duration")||0),"string"==typeof n?n.indexOf("ms")>-1?parseFloat(n):1e3*parseFloat(n):n},displayType:function(){return i.displayType?i.displayType:(T.data(v.displayType)===t&&A.can.transition(!0),T.data(v.displayType))},style:function(){var n=T.attr("style")||"";return n.replace(/display.*?;/,"")},transitionExists:function(i){return n.fn.transition.exists[i]},animationName:function(){var n,i=e.createElement("div"),a={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(n in a)if(i.style[n]!==t)return a[n];return!1},animationStartEvent:function(){var n,i=e.createElement("div"),a={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in a)if(i.style[n]!==t)return a[n];return!1},animationEndEvent:function(){var n,i=e.createElement("div"),a={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in a)if(i.style[n]!==t)return a[n];return!1}},can:{transition:function(e){var a,o,s,r,l,m=T.attr("class"),d=T.prop("tagName"),c=i.animation,u=A.get.transitionExists(c);if(u===t||e){if(A.verbose("Determining whether animation exists"),a=n("<"+d+" />").addClass(m).insertAfter(T),o=a.addClass(c).removeClass(g.inward).removeClass(g.outward).addClass(g.animating).addClass(g.transition).css(h),s=a.addClass(g.inward).css(h),l=a.attr("class",m).removeAttr("style").removeClass(g.hidden).removeClass(g.visible).show().css("display"),A.verbose("Determining final display state",l),a.remove(),o!=s)A.debug("Direction exists for animation",c),r=!0;else{if("none"==o||!o)return void A.debug("No animation defined in css",c);A.debug("Static animation found",c,l),r=!1}A.save.displayType(l),A.save.transitionExists(c,r)}return u!==t?u:r},animate:function(){return A.can.transition()!==t}},is:{animating:function(){return T.hasClass(g.animating)},inward:function(){return T.hasClass(g.inward)},outward:function(){return T.hasClass(g.outward)},looping:function(){return T.hasClass(g.looping)},occurring:function(n){return n=n||i.animation,n="."+n.replace(" ","."),T.filter(n).length>0},visible:function(){return T.is(":visible")},hidden:function(){return"hidden"===T.css("visibility")},supported:function(){return h!==!1&&y!==!1}},hide:function(){A.verbose("Hiding element"),A.is.animating()&&A.reset(),A.remove.display(),A.remove.visible(),A.set.hidden(),A.repaint()},show:function(n){A.verbose("Showing element",n),A.remove.hidden(),A.set.visible(),A.repaint()},start:function(){A.verbose("Starting animation"),T.removeClass(g.disabled)},stop:function(){A.debug("Stopping animation"),T.addClass(g.disabled)},toggle:function(){A.debug("Toggling play status"),T.toggleClass(g.disabled)},setting:function(e,a){if(A.debug("Changing setting",e,a),n.isPlainObject(e))n.extend(!0,i,e);else{if(a===t)return i[e];i[e]=a}},internal:function(i,e){if(n.isPlainObject(i))n.extend(!0,A,i);else{if(e===t)return A[i];A[i]=e}},debug:function(){i.debug&&(i.performance?A.performance.log(arguments):(A.debug=Function.prototype.bind.call(console.info,console,i.name+":"),A.debug.apply(console,arguments)))},verbose:function(){i.verbose&&i.debug&&(i.performance?A.performance.log(arguments):(A.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),A.verbose.apply(console,arguments)))},error:function(){A.error=Function.prototype.bind.call(console.error,console,i.name+":"),A.error.apply(console,arguments)},performance:{log:function(n){var e,t,a;i.performance&&(e=(new Date).getTime(),a=r||e,t=e-a,r=e,l.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:S,"Execution Time":t})),clearTimeout(A.performance.timer),A.performance.timer=setTimeout(A.performance.display,600)},display:function(){var e=i.name+":",a=0;r=!1,clearTimeout(A.performance.timer),n.each(l,function(n,i){a+=i["Execution Time"]}),e+=" "+a+"ms",s&&(e+=" '"+s+"'"),o.length>1&&(e+=" ("+o.length+")"),(console.group!==t||console.table!==t)&&l.length>0&&(console.groupCollapsed(e),console.table?console.table(l):n.each(l,function(n,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(i,e,o){var s,r,l,m=f;return e=e||c,o=S||o,"string"==typeof i&&m!==t&&(i=i.split(/[\. ]/),s=i.length-1,n.each(i,function(e,a){var o=e!=s?a+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(n.isPlainObject(m[o])&&e!=s)m=m[o];else{if(m[o]!==t)return r=m[o],!1;if(!n.isPlainObject(m[a])||e==s)return m[a]!==t?(r=m[a],!1):!1;m=m[a]}})),n.isFunction(r)?l=r.apply(o,e):r!==t&&(l=r),n.isArray(a)?a.push(l):a!==t?a=[a,l]:l!==t&&(a=l),r!==t?r:!1}},A.initialize()}),a!==t?a:this},n.fn.transition.exists={},n.fn.transition.settings={name:"Transition",debug:!1,verbose:!0,performance:!0,namespace:"transition",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"There is no css animation matching the one you specified.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document); | ||
!function(n,i,e,t){"use strict";n.fn.transition=function(){{var a,o=n(this),s=o.selector||"",r=(new Date).getTime(),l=[],d=arguments,m=d[0],c=[].slice.call(arguments,1),u="string"==typeof m;i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||i.msRequestAnimationFrame||function(n){setTimeout(n,0)}}return o.each(function(i){var f,g,p,v,y,b,h,w,C,A,T,S=n(this),x=this;T={initialize:function(){f=T.get.settings.apply(x,d),v=f.className,p=f.error,y=f.metadata,A="."+f.namespace,C="module-"+f.namespace,g=S.data(C)||T,h=T.get.animationEndEvent(),w=T.get.animationName(),b=T.get.animationStartEvent(),u&&(u=T.invoke(m)),u===!1&&(T.verbose("Converted arguments into settings object",f),f.interval?T.delay(f.animate):T.animate(),T.instantiate())},instantiate:function(){T.verbose("Storing instance of module",T),g=T,S.data(C,g)},destroy:function(){T.verbose("Destroying previous module for",x),S.removeData(C)},refresh:function(){T.verbose("Refreshing display type on next animation"),delete T.displayType},forceRepaint:function(){T.verbose("Forcing element repaint");var n=S.parent(),i=S.next();0===i.length?S.detach().appendTo(n):S.detach().insertBefore(i)},repaint:function(){T.verbose("Repainting element");x.offsetWidth},delay:function(n){var e,a=f.reverse===!0,s="auto"==f.reverse&&T.get.direction()==v.outward;n=typeof n!==t?n:f.interval,e=a||s?(o.length-i)*f.interval:i*f.interval,T.debug("Delaying animation by",e),setTimeout(T.animate,e)},animate:function(n){if(f=n||f,!T.is.supported())return T.error(p.support),!1;if(T.debug("Preparing animation",f.animation),T.is.animating()){if(f.queue)return!f.allowRepeats&&T.has.direction()&&T.is.occurring()&&T.queuing!==!0?T.debug("Animation is currently occurring, preventing queueing same animation",f.animation):T.queue(f.animation),!1;if(!f.allowRepeats&&T.is.occurring())return T.debug("Animation is already occurring, will not execute repeated animation",f.animation),!1}T.can.animate()?T.set.animating(f.animation):T.error(p.noAnimation,f.animation,x)},reset:function(){T.debug("Resetting animation to beginning conditions"),T.remove.animationEndCallback(),T.restore.conditions(),T.remove.animating()},queue:function(n){T.debug("Queueing animation of",n),T.queuing=!0,S.one(h+A,function(){T.queuing=!1,T.repaint(),T.animate.apply(this,f)})},complete:function(){T.verbose("CSS animation complete",f.animation),T.remove.animationEndCallback(),T.remove.failSafe(),T.is.looping()||(T.is.outward()?(T.verbose("Animation is outward, hiding element"),T.restore.conditions(),T.hide(),f.onHide.call(this)):T.is.inward()?(T.verbose("Animation is outward, showing element"),T.restore.conditions(),T.show(),T.set.display(),f.onShow.call(this)):T.restore.conditions(),T.remove.animation(),T.remove.animating()),f.onComplete.call(this)},has:{direction:function(i){var e=!1;return i=i||f.animation,"string"==typeof i&&(i=i.split(" "),n.each(i,function(n,i){(i===v.inward||i===v.outward)&&(e=!0)})),e},inlineDisplay:function(){var i=S.attr("style")||"";return n.isArray(i.match(/display.*?;/,""))}},set:{animating:function(n){n=n||f.animation,T.is.animating()||T.save.conditions(),T.remove.direction(),T.remove.animationEndCallback(),T.can.transition()&&!T.has.direction()&&T.set.direction(),T.remove.hidden(),T.set.display(),S.addClass(v.animating+" "+v.transition+" "+n).addClass(n).one(h+".complete"+A,T.complete),f.useFailSafe&&T.add.failSafe(),T.set.duration(f.duration),f.onStart.call(this),T.debug("Starting tween",n,S.attr("class"))},duration:function(n,i){i=i||f.duration,i="number"==typeof i?i+"ms":i,T.verbose("Setting animation duration",i),(i||0===i)&&S.css({"-webkit-animation-duration":i,"-moz-animation-duration":i,"-ms-animation-duration":i,"-o-animation-duration":i,"animation-duration":i})},display:function(){var n=T.get.style(),i=T.get.displayType(),e=n+"display: "+i+" !important;";S.css("display",""),T.refresh(),S.css("display")!==i&&(T.verbose("Setting inline visibility to",i),S.attr("style",e))},direction:function(){S.is(":visible")&&!T.is.hidden()?(T.debug("Automatically determining the direction of animation","Outward"),S.removeClass(v.inward).addClass(v.outward)):(T.debug("Automatically determining the direction of animation","Inward"),S.removeClass(v.outward).addClass(v.inward))},looping:function(){T.debug("Transition set to loop"),S.addClass(v.looping)},hidden:function(){T.is.hidden()||S.addClass(v.transition).addClass(v.hidden),"none"!==S.css("display")&&(T.verbose("Overriding default display to hide element"),S.css("display","none"))},visible:function(){S.addClass(v.transition).addClass(v.visible)}},save:{displayType:function(n){S.data(y.displayType,n)},transitionExists:function(i,e){n.fn.transition.exists[i]=e,T.verbose("Saving existence of transition",i,e)},conditions:function(){S.attr("class")||!1,S.attr("style")||"";S.removeClass(f.animation),T.remove.direction(),T.cache={className:S.attr("class"),style:T.get.style()},T.verbose("Saving original attributes",T.cache)}},restore:{conditions:function(){return T.cache===t?!1:(T.cache.className?S.attr("class",T.cache.className):S.removeAttr("class"),T.cache.style&&(T.verbose("Restoring original style attribute",T.cache.style),console.log("restoring cache",T.cache.style),S.attr("style",T.cache.style)),T.is.looping()&&T.remove.looping(),void T.verbose("Restoring original attributes",T.cache))}},add:{failSafe:function(){var n=T.get.duration();T.timer=setTimeout(function(){S.trigger(h)},n+f.failSafeDelay),T.verbose("Adding fail safe timer",T.timer)}},remove:{animating:function(){S.removeClass(v.animating)},animation:function(){S.css({"-webkit-animation":"","-moz-animation":"","-ms-animation":"","-o-animation":"",animation:""})},animationEndCallback:function(){S.off(".complete")},display:function(){S.css("display","")},direction:function(){S.removeClass(v.inward).removeClass(v.outward)},failSafe:function(){T.verbose("Removing fail safe timer",T.timer),T.timer&&clearTimeout(T.timer)},hidden:function(){S.removeClass(v.hidden)},visible:function(){S.removeClass(v.visible)},looping:function(){T.debug("Transitions are no longer looping"),S.removeClass(v.looping),T.forceRepaint()},transition:function(){S.removeClass(v.visible).removeClass(v.hidden)}},get:{settings:function(i,e,t){return"object"==typeof i?n.extend(!0,{},n.fn.transition.settings,i):"function"==typeof t?n.extend({},n.fn.transition.settings,{animation:i,onComplete:t,duration:e}):"string"==typeof e||"number"==typeof e?n.extend({},n.fn.transition.settings,{animation:i,duration:e}):"object"==typeof e?n.extend({},n.fn.transition.settings,e,{animation:i}):"function"==typeof e?n.extend({},n.fn.transition.settings,{animation:i,onComplete:e}):n.extend({},n.fn.transition.settings,{animation:i})},direction:function(i){return i=i||f.animation,"string"==typeof i&&(i=i.split(" "),n.each(i,function(n,i){return i===v.inward?v.inward:i===v.outward?v.outward:void 0})),T.can.transition()?S.is(":visible")&&!T.is.hidden()?v.outward:v.inward:"static"},duration:function(n){return n=n||f.duration,n===!1&&(n=S.css("animation-duration")||0),"string"==typeof n?n.indexOf("ms")>-1?parseFloat(n):1e3*parseFloat(n):n},displayType:function(){return f.displayType?f.displayType:(S.data(y.displayType)===t&&T.can.transition(!0),S.data(y.displayType))},style:function(){var n=S.attr("style")||"";return n.replace(/display.*?;/,"")},transitionExists:function(i){return n.fn.transition.exists[i]},animationName:function(){var n,i=e.createElement("div"),a={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(n in a)if(i.style[n]!==t)return a[n];return!1},animationStartEvent:function(){var n,i=e.createElement("div"),a={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in a)if(i.style[n]!==t)return a[n];return!1},animationEndEvent:function(){var n,i=e.createElement("div"),a={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in a)if(i.style[n]!==t)return a[n];return!1}},can:{transition:function(i){var e,a,o,s,r,l=S.attr("class"),d=S.prop("tagName"),m=f.animation,c=T.get.transitionExists(m);if(c===t||i){if(T.verbose("Determining whether animation exists"),e=n("<"+d+" />").addClass(l).insertAfter(S),a=e.addClass(m).removeClass(v.inward).removeClass(v.outward).addClass(v.animating).addClass(v.transition).css(w),o=e.addClass(v.inward).css(w),r=e.attr("class",l).removeAttr("style").removeClass(v.hidden).removeClass(v.visible).show().css("display"),T.verbose("Determining final display state",r),e.remove(),a!=o)T.debug("Direction exists for animation",m),s=!0;else{if("none"==a||!a)return void T.debug("No animation defined in css",m);T.debug("Static animation found",m,r),s=!1}T.save.displayType(r),T.save.transitionExists(m,s)}return c!==t?c:s},animate:function(){return T.can.transition()!==t}},is:{animating:function(){return S.hasClass(v.animating)},inward:function(){return S.hasClass(v.inward)},outward:function(){return S.hasClass(v.outward)},looping:function(){return S.hasClass(v.looping)},occurring:function(n){return n=n||f.animation,n="."+n.replace(" ","."),S.filter(n).length>0},visible:function(){return S.is(":visible")},hidden:function(){return"hidden"===S.css("visibility")},supported:function(){return w!==!1&&h!==!1}},hide:function(){T.verbose("Hiding element"),T.is.animating()&&T.reset(),T.remove.display(),T.remove.visible(),T.set.hidden(),T.repaint()},show:function(n){T.verbose("Showing element",n),T.remove.hidden(),T.set.visible(),T.repaint()},start:function(){T.verbose("Starting animation"),S.removeClass(v.disabled)},stop:function(){T.debug("Stopping animation"),S.addClass(v.disabled)},toggle:function(){T.debug("Toggling play status"),S.toggleClass(v.disabled)},setting:function(i,e){if(T.debug("Changing setting",i,e),n.isPlainObject(i))n.extend(!0,f,i);else{if(e===t)return f[i];f[i]=e}},internal:function(i,e){if(n.isPlainObject(i))n.extend(!0,T,i);else{if(e===t)return T[i];T[i]=e}},debug:function(){f.debug&&(f.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,f.name+":"),T.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),T.verbose.apply(console,arguments)))},error:function(){T.error=Function.prototype.bind.call(console.error,console,f.name+":"),T.error.apply(console,arguments)},performance:{log:function(n){var i,e,t;f.performance&&(i=(new Date).getTime(),t=r||i,e=i-t,r=i,l.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:x,"Execution Time":e})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,600)},display:function(){var i=f.name+":",e=0;r=!1,clearTimeout(T.performance.timer),n.each(l,function(n,i){e+=i["Execution Time"]}),i+=" "+e+"ms",s&&(i+=" '"+s+"'"),o.length>1&&(i+=" ("+o.length+")"),(console.group!==t||console.table!==t)&&l.length>0&&(console.groupCollapsed(i),console.table?console.table(l):n.each(l,function(n,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(i,e,o){var s,r,l,d=g;return e=e||c,o=x||o,"string"==typeof i&&d!==t&&(i=i.split(/[\. ]/),s=i.length-1,n.each(i,function(e,a){var o=e!=s?a+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(n.isPlainObject(d[o])&&e!=s)d=d[o];else{if(d[o]!==t)return r=d[o],!1;if(!n.isPlainObject(d[a])||e==s)return d[a]!==t?(r=d[a],!1):!1;d=d[a]}})),n.isFunction(r)?l=r.apply(o,e):r!==t&&(l=r),n.isArray(a)?a.push(l):a!==t?a=[a,l]:l!==t&&(a=l),r!==t?r:!1}},T.initialize()}),a!==t?a:this},n.fn.transition.exists={},n.fn.transition.settings={name:"Transition",debug:!1,verbose:!0,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"There is no css animation matching the one you specified.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document); |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
/* | ||
* # Semantic UI - 1.9.3 | ||
* # Semantic UI - 1.10.1 | ||
* https://github.com/Semantic-Org/Semantic-UI | ||
@@ -4,0 +4,0 @@ * http://www.semantic-ui.com/ |
148
package.js
@@ -8,3 +8,3 @@ var | ||
summary : 'Semantic UI - CSS Release of Semantic UI', | ||
version : '1.9.3', | ||
version : '1.10.1', | ||
git : 'git://github.com/Semantic-Org/Semantic-UI-CSS.git', | ||
@@ -18,138 +18,3 @@ }); | ||
api.addFiles([ | ||
'LICENSE', | ||
'README.md', | ||
'components/accordion.css', | ||
'components/accordion.js', | ||
'components/accordion.min.css', | ||
'components/accordion.min.js', | ||
'components/ad.css', | ||
'components/ad.min.css', | ||
'components/api.js', | ||
'components/api.min.js', | ||
'components/breadcrumb.css', | ||
'components/breadcrumb.min.css', | ||
'components/button.css', | ||
'components/button.min.css', | ||
'components/card.css', | ||
'components/card.min.css', | ||
'components/checkbox.css', | ||
'components/checkbox.js', | ||
'components/checkbox.min.css', | ||
'components/checkbox.min.js', | ||
'components/comment.css', | ||
'components/comment.min.css', | ||
'components/dimmer.css', | ||
'components/dimmer.js', | ||
'components/dimmer.min.css', | ||
'components/dimmer.min.js', | ||
'components/divider.css', | ||
'components/divider.min.css', | ||
'components/dropdown.css', | ||
'components/dropdown.js', | ||
'components/dropdown.min.css', | ||
'components/dropdown.min.js', | ||
'components/feed.css', | ||
'components/feed.min.css', | ||
'components/flag.css', | ||
'components/flag.min.css', | ||
'components/form.css', | ||
'components/form.js', | ||
'components/form.min.css', | ||
'components/form.min.js', | ||
'components/grid.css', | ||
'components/grid.min.css', | ||
'components/header.css', | ||
'components/header.min.css', | ||
'components/icon.css', | ||
'components/icon.min.css', | ||
'components/image.css', | ||
'components/image.min.css', | ||
'components/input.css', | ||
'components/input.min.css', | ||
'components/item.css', | ||
'components/item.min.css', | ||
'components/label.css', | ||
'components/label.min.css', | ||
'components/list.css', | ||
'components/list.min.css', | ||
'components/loader.css', | ||
'components/loader.min.css', | ||
'components/menu.css', | ||
'components/menu.min.css', | ||
'components/message.css', | ||
'components/message.min.css', | ||
'components/modal.css', | ||
'components/modal.js', | ||
'components/modal.min.css', | ||
'components/modal.min.js', | ||
'components/nag.css', | ||
'components/nag.js', | ||
'components/nag.min.css', | ||
'components/nag.min.js', | ||
'components/popup.css', | ||
'components/popup.js', | ||
'components/popup.min.css', | ||
'components/popup.min.js', | ||
'components/progress.css', | ||
'components/progress.js', | ||
'components/progress.min.css', | ||
'components/progress.min.js', | ||
'components/rail.css', | ||
'components/rail.min.css', | ||
'components/rating.css', | ||
'components/rating.js', | ||
'components/rating.min.css', | ||
'components/rating.min.js', | ||
'components/reset.css', | ||
'components/reset.min.css', | ||
'components/reveal.css', | ||
'components/reveal.min.css', | ||
'components/search.css', | ||
'components/search.js', | ||
'components/search.min.css', | ||
'components/search.min.js', | ||
'components/segment.css', | ||
'components/segment.min.css', | ||
'components/shape.css', | ||
'components/shape.js', | ||
'components/shape.min.css', | ||
'components/shape.min.js', | ||
'components/sidebar.css', | ||
'components/sidebar.js', | ||
'components/sidebar.min.css', | ||
'components/sidebar.min.js', | ||
'components/site.css', | ||
'components/site.js', | ||
'components/site.min.css', | ||
'components/site.min.js', | ||
'components/state.js', | ||
'components/state.min.js', | ||
'components/statistic.css', | ||
'components/statistic.min.css', | ||
'components/step.css', | ||
'components/step.min.css', | ||
'components/sticky.css', | ||
'components/sticky.js', | ||
'components/sticky.min.css', | ||
'components/sticky.min.js', | ||
'components/tab.css', | ||
'components/tab.js', | ||
'components/tab.min.css', | ||
'components/tab.min.js', | ||
'components/table.css', | ||
'components/table.min.css', | ||
'components/transition.css', | ||
'components/transition.js', | ||
'components/transition.min.css', | ||
'components/transition.min.js', | ||
'components/video.css', | ||
'components/video.js', | ||
'components/video.min.css', | ||
'components/video.min.js', | ||
'components/visibility.js', | ||
'components/visibility.min.js', | ||
'semantic.css', | ||
'semantic.js', | ||
'semantic.min.css', | ||
'semantic.min.js', | ||
// icons | ||
'themes/default/assets/fonts/icons.eot', | ||
@@ -161,5 +26,12 @@ 'themes/default/assets/fonts/icons.otf', | ||
'themes/default/assets/fonts/icons.woff2', | ||
'themes/default/assets/images/flags.png' | ||
'themes/default/assets/fonts/icons.woff2', | ||
// flags | ||
'themes/default/assets/images/flags.png', | ||
// release | ||
'semantic.css', | ||
'semantic.js' | ||
], 'client'); | ||
}); |
{ | ||
"name": "semantic-ui-css", | ||
"version": "1.9.3", | ||
"version": "1.10.1", | ||
"title": "Semantic UI", | ||
@@ -5,0 +5,0 @@ "description": "CSS Only distribution of Semantic UI", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4517964
85936