Browse Source

Iterating on module design pattern. Fixes to performance logging. Much work on dimmer class, new thoughts on fusion of dimmer and modal

Former-commit-id: 55b4cdeeda312ae73878773c380aa5d779c5544b
Former-commit-id: 2c84a3dd30603466f61abba5205dcd593ea29238
beta
Jack Lukic 12 years ago
parent
commit
a4332c6095
  1. 2
      build/minified/elements/progress.min.css
  2. 9
      build/minified/modules/behavior/form.js
  3. 2
      build/minified/modules/behavior/form.min.js
  4. 2
      build/minified/modules/carousel.js
  5. 2
      build/minified/modules/carousel.min.js
  6. 2
      build/minified/modules/checkbox.js
  7. 2
      build/minified/modules/checkbox.min.js
  8. 249
      build/minified/modules/dimmer.js
  9. 2
      build/minified/modules/dimmer.min.css
  10. 2
      build/minified/modules/dimmer.min.js
  11. 6
      build/minified/modules/dropdown.js
  12. 2
      build/minified/modules/dropdown.min.js
  13. 2
      build/minified/modules/modal.min.css
  14. 2
      build/minified/modules/modal.min.js
  15. 108
      build/minified/modules/popup.js
  16. 2
      build/minified/modules/popup.min.js
  17. 8
      build/minified/modules/shape.js
  18. 2
      build/minified/modules/shape.min.js
  19. 2
      build/minified/modules/tab.min.js
  20. 9
      build/packaged/modules/behavior/form.js
  21. 2
      build/packaged/modules/carousel.js
  22. 2
      build/packaged/modules/checkbox.js
  23. 249
      build/packaged/modules/dimmer.js
  24. 6
      build/packaged/modules/dropdown.js
  25. 108
      build/packaged/modules/popup.js
  26. 8
      build/packaged/modules/shape.js
  27. 2
      build/packaged/semantic.min.css.REMOVED.git-id
  28. 2
      build/packaged/semantic.min.js.REMOVED.git-id
  29. 26
      build/uncompressed/elements/progress.css
  30. 9
      build/uncompressed/modules/behavior/form.js
  31. 2
      build/uncompressed/modules/carousel.js
  32. 2
      build/uncompressed/modules/checkbox.js
  33. 137
      build/uncompressed/modules/dimmer.css
  34. 249
      build/uncompressed/modules/dimmer.js
  35. 6
      build/uncompressed/modules/dropdown.js
  36. 51
      build/uncompressed/modules/modal.css
  37. 108
      build/uncompressed/modules/popup.js
  38. 8
      build/uncompressed/modules/shape.js
  39. 2
      node/docpad.coffee
  40. 103
      node/src/documents/modules/dimmer.html
  41. 8
      node/src/documents/modules/dropdown.html
  42. 26
      node/src/files/components/semantic/elements/progress.css
  43. 9
      node/src/files/components/semantic/modules/behavior/form.js
  44. 2
      node/src/files/components/semantic/modules/carousel.js
  45. 2
      node/src/files/components/semantic/modules/checkbox.js
  46. 137
      node/src/files/components/semantic/modules/dimmer.css
  47. 249
      node/src/files/components/semantic/modules/dimmer.js
  48. 6
      node/src/files/components/semantic/modules/dropdown.js
  49. 51
      node/src/files/components/semantic/modules/modal.css
  50. 108
      node/src/files/components/semantic/modules/popup.js
  51. 8
      node/src/files/components/semantic/modules/shape.js
  52. 19
      node/src/files/javascript/dimmer.js
  53. 2
      node/src/files/javascript/semantic.js
  54. 3
      node/src/files/stylesheets/semantic.css
  55. 3
      node/src/layouts/default.html.eco
  56. 26
      spec/modules/module.commented.js
  57. 11
      spec/modules/module.js
  58. 26
      src/elements/progress.less
  59. 9
      src/modules/behavior/form.js
  60. 2
      src/modules/carousel.js
  61. 2
      src/modules/checkbox.js
  62. 249
      src/modules/dimmer.js
  63. 152
      src/modules/dimmer.less
  64. 6
      src/modules/dropdown.js
  65. 59
      src/modules/modal.less
  66. 108
      src/modules/popup.js
  67. 8
      src/modules/shape.js

2
build/minified/elements/progress.min.css

@ -1 +1 @@
.ui.progress{border:1px solid rgba(0,0,0,.1);width:100%;height:35px;background-color:#FAFAFA;padding:5px;-webkit-border-radius:.3125em;-moz-border-radius:.3125em;border-radius:.3125em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui.progress .bar{display:inline-block;height:100%;background-color:#CCC;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:width 1s ease-in-out,background-color 1s ease-out;-moz-transition:width 1s ease-in-out,background-color 1s ease-out;-ms-transition:width 1s ease-in-out,background-color 1s ease-out;-o-transition:width 1s ease-in-out,background-color 1s ease-out;transition:width 1s ease-in-out,background-color 1s ease-out}.ui.successful.progress .bar{background-color:#73E064!important}.ui.successful.progress .bar,.ui.successful.progress .bar::after{-webkit-animation:none!important;-moz-animation:none!important}.ui.failed.progress .bar{background-color:#DF9BA4!important}.ui.failed.progress .bar,.ui.failed.progress .bar::after{-webkit-animation:none!important;-moz-animation:none!important}.ui.active.progress .bar{position:relative}.ui.active.progress .bar::after{content:'';opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;background:#FFF;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-animation:animate-emphasis 2s ease-out infinite;-moz-animation:animate-emphasis 2s ease-out infinite;animation:animate-emphasis 2s ease-out infinite}@-webkit-keyframes animate-emphasis{0%{opacity:0;width:0}50%{opacity:.3}100%{opacity:0;width:95%}}@-moz-keyframes animate-emphasis{0%{opacity:0;width:0}50%{opacity:.3}100%{opacity:0;width:100%}}@keyframes animate-emphasis{0%{opacity:0;width:0}50%{opacity:.3}100%{opacity:0;width:100%}}.ui.disabled.progress{opacity:.35}.ui.disabled.progress .bar,.ui.disabled.progress .bar::after{-webkit-animation:none!important;-moz-animation:none!important}.ui.blue.progress .bar{background-color:#6ECFF5}.ui.black.progress .bar{background-color:#5C6166}.ui.green.progress .bar{background-color:#A1CF64}.ui.red.progress .bar{background-color:#EF4D6D}.ui.purple.progress .bar{background-color:#564F8A}.ui.teal.progress .bar{background-color:#00B5AD}.ui.progress.striped .bar{-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;background-image:-webkit-gradient(linear,left top,right bottom,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.ui.progress.active.striped .bar{-webkit-animation:animate-striped 3s linear infinite;-moz-animation:animate-striped 3s linear infinite}@-webkit-keyframes animate-striped{0%{background-position:0 0}100%{background-position:60px 0}}@-moz-keyframes animate-striped{0%{background-position:0 0}100%{background-position:60px 0}}@keyframes animate-striped{0%{background-position:0 0}100%{background-position:60px 0}} .ui.progress{border:1px solid rgba(0,0,0,.1);width:100%;height:35px;background-color:#FAFAFA;padding:5px;-webkit-border-radius:.3125em;-moz-border-radius:.3125em;border-radius:.3125em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.ui.progress .bar{display:inline-block;height:100%;background-color:#CCC;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:width 1s ease-in-out,background-color 1s ease-out;-moz-transition:width 1s ease-in-out,background-color 1s ease-out;-ms-transition:width 1s ease-in-out,background-color 1s ease-out;-o-transition:width 1s ease-in-out,background-color 1s ease-out;transition:width 1s ease-in-out,background-color 1s ease-out}.ui.successful.progress .bar{background-color:#73E064!important}.ui.successful.progress .bar,.ui.successful.progress .bar::after{-webkit-animation:none!important;-moz-animation:none!important;animation:none!important}.ui.failed.progress .bar{background-color:#DF9BA4!important}.ui.failed.progress .bar,.ui.failed.progress .bar::after{-webkit-animation:none!important;-moz-animation:none!important;animation:none!important}.ui.active.progress .bar{position:relative}.ui.active.progress .bar::after{content:'';opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;background:#FFF;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-animation:progress-active 2s ease-out infinite;-moz-animation:progress-active 2s ease-out infinite;animation:progress-active 2s ease-out infinite}@-webkit-keyframes progress-active{0%{opacity:0;width:0}50%{opacity:.3}100%{opacity:0;width:95%}}@-moz-keyframes progress-active{0%{opacity:0;width:0}50%{opacity:.3}100%{opacity:0;width:100%}}@keyframes progress-active{0%{opacity:0;width:0}50%{opacity:.3}100%{opacity:0;width:100%}}.ui.disabled.progress{opacity:.35}.ui.disabled.progress .bar,.ui.disabled.progress .bar::after{-webkit-animation:none!important;-moz-animation:none!important;animation:none!important}.ui.blue.progress .bar{background-color:#6ECFF5}.ui.black.progress .bar{background-color:#5C6166}.ui.green.progress .bar{background-color:#A1CF64}.ui.red.progress .bar{background-color:#EF4D6D}.ui.purple.progress .bar{background-color:#564F8A}.ui.teal.progress .bar{background-color:#00B5AD}.ui.progress.striped .bar{-webkit-background-size:30px 30px;-moz-background-size:30px 30px;background-size:30px 30px;background-image:-webkit-gradient(linear,left top,right bottom,color-stop(0.25,rgba(255,255,255,.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,.15)),color-stop(0.75,rgba(255,255,255,.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(135deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.ui.progress.active.striped .bar{-webkit-animation:progress-striped 3s linear infinite;-moz-animation:progress-striped 3s linear infinite;animation:progress-striped 3s linear infinite}@-webkit-keyframes progress-striped{0%{background-position:0 0}100%{background-position:60px 0}}@-moz-keyframes progress-striped{0%{background-position:0 0}100%{background-position:60px 0}}@keyframes progress-striped{0%{background-position:0 0}100%{background-position:60px 0}}

9
build/minified/modules/behavior/form.js

@ -443,18 +443,17 @@ $.fn.form = function(fields, parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/minified/modules/behavior/form.min.js

File diff suppressed because one or more lines are too long

2
build/minified/modules/carousel.js

@ -264,7 +264,7 @@ $.fn.carousel = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/minified/modules/carousel.min.js

@ -1 +1 @@
(function(e,t,n,o){e.fn.carousel=function(t){var n,i=e(this),a=e.extend(!0,{},e.fn.carousel.settings,t),r=("."+a.namespace,"module-"+a.namespace,i.selector||""),s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return i.each(function(){var t,f=e(this),m=(e(a.selector.arrows),e(a.selector.leftArrow)),g=e(a.selector.rightArrow),p=e(a.selector.content),v=(e(a.selector.navigation),e(a.selector.navItem)),h=(f.selector||"",this),b=f.data("module-"+a.namespace),x=a.className,y=a.namespace,w=a.errors;t={initialize:function(){t.openingAnimation(),t.marquee.autoAdvance(),m.on("click",t.marquee.left),g.on("click",t.marquee.right),v.on("click",t.marquee.change)},destroy:function(){t.verbose("Destroying previous module for",f),f.off(y)},left:function(){var e=p.filter("."+x.active),t=p.index(e),n=p.size(),o=-1!=t-1?t-1:n-1;v.eq(o).trigger("click")},right:function(){var e=p.filter("."+x.active),t=p.index(e),n=p.size(),o=t+1!=n?t+1:0;v.eq(o).trigger("click")},change:function(){var n=e(this),o=v.index(n),i=p.eq(o);t.marquee.autoAdvance(),n.addClass("active").siblings().removeClass("active"),i.addClass("active animated fadeIn").siblings("."+x.active).removeClass("animated fadeIn scaleIn").animate({opacity:0},500,function(){e(this).removeClass("active").removeAttr("style")})},autoAdvance:function(){clearInterval(t.timer),t.timer=setInterval(t.marquee.right,a.duration)},setting:function(n,i){return i===o?a[n]:(e.isPlainObject(n)?(t.verbose("Modifying settings object",n,i),e.extend(!0,a,n)):(t.verbose("Modifying setting",n,i),a[n]=i),o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?(t.verbose("Modifying internal property",n,i),e.extend(!0,t,n)):(t.verbose("Changing internal method to",i),t[n]=i),o)},debug:function(){a.debug&&(a.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},verbose:function(){a.verbose&&a.debug&&(a.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,a.moduleName+":")},performance:{log:function(e){var n,o,i;a.performance&&(n=(new Date).getTime(),i=s||n,o=n-i,s=n,c.push({Element:h,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=a.moduleName,n=(a.moduleName+": "+r+"("+i.size()+" elements)",0);r&&(t+=" Performance ("+r+")"),(console.group!==o||console.table!==o)&&c.length>0&&(console.groupCollapsed(t),console.table?(e.each(c,function(e,t){n+=t["Execution Time"]}),console.table(c)):e.each(c,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),c=[],s=!1)}},invoke:function(n,i,a){var r,s;return i=i||d,a=h||a,"string"==typeof n&&b!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(b[i])&&n!=r?(b=b[i],!0):b[i]!==o?(s=b[i],!0):(t.error(w.method),!1)})),e.isFunction(s)?(t.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},u?(b===o&&t.initialize(),n=t.invoke(l)):(b!==o&&t.destroy(),t.initialize())}),n?n:this},e.fn.carousel.settings={moduleName:"Carousel Module",namespace:"carousel",verbose:!0,debug:!0,performance:!0,duration:5e3,errors:{method:"The method you called is not defined."},selector:{arrows:".arrow",leftArrow:".left.arrow",rightArrow:".right.arrow",content:".content",navigation:".navigation",navItem:".navigation .icon"},className:{active:"active"}}})(jQuery,window,document); (function(e,t,n,o){e.fn.carousel=function(t){var n,i=e(this),a=e.extend(!0,{},e.fn.carousel.settings,t),r=("."+a.namespace,"module-"+a.namespace,i.selector||""),s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return i.each(function(){var t,f=e(this),m=(e(a.selector.arrows),e(a.selector.leftArrow)),g=e(a.selector.rightArrow),p=e(a.selector.content),v=(e(a.selector.navigation),e(a.selector.navItem)),h=(f.selector||"",this),b=f.data("module-"+a.namespace),x=a.className,y=a.namespace,w=a.errors;t={initialize:function(){t.openingAnimation(),t.marquee.autoAdvance(),m.on("click",t.marquee.left),g.on("click",t.marquee.right),v.on("click",t.marquee.change)},destroy:function(){t.verbose("Destroying previous module for",f),f.off(y)},left:function(){var e=p.filter("."+x.active),t=p.index(e),n=p.size(),o=-1!=t-1?t-1:n-1;v.eq(o).trigger("click")},right:function(){var e=p.filter("."+x.active),t=p.index(e),n=p.size(),o=t+1!=n?t+1:0;v.eq(o).trigger("click")},change:function(){var n=e(this),o=v.index(n),i=p.eq(o);t.marquee.autoAdvance(),n.addClass("active").siblings().removeClass("active"),i.addClass("active animated fadeIn").siblings("."+x.active).removeClass("animated fadeIn scaleIn").animate({opacity:0},500,function(){e(this).removeClass("active").removeAttr("style")})},autoAdvance:function(){clearInterval(t.timer),t.timer=setInterval(t.marquee.right,a.duration)},setting:function(n,i){return i===o?a[n]:(e.isPlainObject(n)?(t.verbose("Modifying settings object",n,i),e.extend(!0,a,n)):(t.verbose("Modifying setting",n,i),a[n]=i),o)},internal:function(n,i){return i===o?t[n]:(e.isPlainObject(n)?(t.verbose("Modifying internal property",n,i),e.extend(!0,t,n)):(t.verbose("Changing internal method to",i),t[n]=i),o)},debug:function(){a.debug&&(a.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},verbose:function(){a.verbose&&a.debug&&(a.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,a.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,a.moduleName+":")},performance:{log:function(e){var n,o,i;a.performance&&(n=(new Date).getTime(),i=s||n,o=n-i,s=n,c.push({Element:h,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=a.moduleName,n=(a.moduleName+": "+r+"("+i.size()+" elements)",0);r&&(t+=" Performance ("+r+")"),(console.group!==o||console.table!==o)&&c.length>0&&(console.groupCollapsed(t),console.table?(e.each(c,function(e,t){n+=t["Execution Time"]}),console.table(c)):e.each(c,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),c=[],s=!1)}},invoke:function(n,i,a){var r,s;return i=i||d,a=h||a,"string"==typeof n&&b!==o&&(n=n.split("."),r=n.length-1,e.each(n,function(n,i){return e.isPlainObject(b[i])&&n!=r?(b=b[i],!0):b[i]!==o?(s=b[i],!0):(t.error(w.method),!1)})),e.isFunction(s)?(b.verbose("Executing invoked function",s),s.apply(a,i)):s||!1}},u?(b===o&&t.initialize(),n=t.invoke(l)):(b!==o&&t.destroy(),t.initialize())}),n?n:this},e.fn.carousel.settings={moduleName:"Carousel Module",namespace:"carousel",verbose:!0,debug:!0,performance:!0,duration:5e3,errors:{method:"The method you called is not defined."},selector:{arrows:".arrow",leftArrow:".left.arrow",rightArrow:".right.arrow",content:".content",navigation:".navigation",navItem:".navigation .icon"},className:{active:"active"}}})(jQuery,window,document);

2
build/minified/modules/checkbox.js

@ -253,7 +253,7 @@ $.fn.checkbox = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/minified/modules/checkbox.min.js

@ -1 +1 @@
(function(e,t,n,o){e.fn.checkbox=function(t){var n,a=e(this),i=e.extend(!0,{},e.fn.checkbox.settings,t),s="."+i.namespace,r="module-"+i.namespace,c=a.selector||"",l=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return a.each(function(){var t,p=e(this),g=e(this).find(i.selector.input),h=p.selector||"",v=this,b=p.data("module-"+i.namespace),y=i.className,x=i.namespace,C=i.errors;t={initialize:function(){i.context&&""!==h?(t.verbose("Initializing checkbox with delegated events",p),e(v,i.context).on(h,"click"+s,t.toggle).data(r,t)):(t.verbose("Initializing checkbox with bound events",p),p.on("click"+s,t.toggle).data(r,t))},destroy:function(){t.verbose("Destroying previous module for",p),p.off(x)},is:{radio:function(){return p.hasClass(y.radio)}},can:{disable:function(){return"boolean"==typeof i.required?i.required:!t.is.radio()}},enable:function(){t.debug("Enabling checkbox"),p.addClass(y.active),g.prop("checked",!0),e.proxy(i.onChange,g.get())(),e.proxy(i.onEnable,g.get())()},disable:function(){t.debug("Disabling checkbox"),p.removeClass(y.active),g.prop("checked",!1),e.proxy(i.onChange,g.get())(),e.proxy(i.onDisable,g.get())()},toggle:function(){t.verbose("Toggling checkbox state"),g.prop("checked")!==o&&g.prop("checked")?t.can.disable()&&t.disable():t.enable()},setting:function(n,a){return a===o?i[n]:(e.isPlainObject(n)?(t.verbose("Modifying settings object",n,a),e.extend(!0,i,n)):(t.verbose("Modifying setting",n,a),i[n]=a),o)},internal:function(n,a){return a===o?t[n]:(e.isPlainObject(n)?(t.verbose("Modifying internal property",n,a),e.extend(!0,t,n)):(t.verbose("Changing internal method to",a),t[n]=a),o)},debug:function(){i.debug&&(i.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,i.moduleName+":"))},verbose:function(){i.verbose&&i.debug&&(i.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,i.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,i.moduleName+":")},performance:{log:function(e){var n,o,a;i.performance&&(n=(new Date).getTime(),a=l||n,o=n-a,l=n,u.push({Element:v,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=i.moduleName,n=(i.moduleName+": "+c+"("+a.size()+" elements)",0);c&&(t+=" Performance ("+c+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],l=!1)}},invoke:function(n,a,i){var s,r;return a=a||m,i=v||i,"string"==typeof n&&b!==o&&(n=n.split("."),s=n.length-1,e.each(n,function(n,a){return e.isPlainObject(b[a])&&n!=s?(b=b[a],!0):b[a]!==o?(r=b[a],!0):(t.error(C.method),!1)})),e.isFunction(r)?(t.verbose("Executing invoked function",r),r.apply(i,a)):r||!1}},f?(b===o&&t.initialize(),n=t.invoke(d)):(b!==o&&t.destroy(),t.initialize())}),n?n:this},e.fn.checkbox.settings={moduleName:"Checkbox Module",namespace:"checkbox",verbose:!0,debug:!0,performance:!0,context:!1,required:"auto",onChange:function(){},onEnable:function(){},onDisable:function(){},errors:{method:"The method you called is not defined."},selector:{input:"input"},className:{active:"active",radio:"radio"}}})(jQuery,window,document); (function(e,t,n,o){e.fn.checkbox=function(t){var n,a=e(this),i=e.extend(!0,{},e.fn.checkbox.settings,t),s="."+i.namespace,r="module-"+i.namespace,c=a.selector||"",l=(new Date).getTime(),u=[],d=arguments[0],f="string"==typeof d,m=[].slice.call(arguments,1);return a.each(function(){var t,p=e(this),g=e(this).find(i.selector.input),h=p.selector||"",v=this,b=p.data("module-"+i.namespace),y=i.className,x=i.namespace,C=i.errors;t={initialize:function(){i.context&&""!==h?(t.verbose("Initializing checkbox with delegated events",p),e(v,i.context).on(h,"click"+s,t.toggle).data(r,t)):(t.verbose("Initializing checkbox with bound events",p),p.on("click"+s,t.toggle).data(r,t))},destroy:function(){t.verbose("Destroying previous module for",p),p.off(x)},is:{radio:function(){return p.hasClass(y.radio)}},can:{disable:function(){return"boolean"==typeof i.required?i.required:!t.is.radio()}},enable:function(){t.debug("Enabling checkbox"),p.addClass(y.active),g.prop("checked",!0),e.proxy(i.onChange,g.get())(),e.proxy(i.onEnable,g.get())()},disable:function(){t.debug("Disabling checkbox"),p.removeClass(y.active),g.prop("checked",!1),e.proxy(i.onChange,g.get())(),e.proxy(i.onDisable,g.get())()},toggle:function(){t.verbose("Toggling checkbox state"),g.prop("checked")!==o&&g.prop("checked")?t.can.disable()&&t.disable():t.enable()},setting:function(n,a){return a===o?i[n]:(e.isPlainObject(n)?(t.verbose("Modifying settings object",n,a),e.extend(!0,i,n)):(t.verbose("Modifying setting",n,a),i[n]=a),o)},internal:function(n,a){return a===o?t[n]:(e.isPlainObject(n)?(t.verbose("Modifying internal property",n,a),e.extend(!0,t,n)):(t.verbose("Changing internal method to",a),t[n]=a),o)},debug:function(){i.debug&&(i.performance?t.performance.log(arguments):t.debug=Function.prototype.bind.call(console.info,console,i.moduleName+":"))},verbose:function(){i.verbose&&i.debug&&(i.performance?t.performance.log(arguments):t.verbose=Function.prototype.bind.call(console.info,console,i.moduleName+":"))},error:function(){t.error=Function.prototype.bind.call(console.log,console,i.moduleName+":")},performance:{log:function(e){var n,o,a;i.performance&&(n=(new Date).getTime(),a=l||n,o=n-a,l=n,u.push({Element:v,Name:e[0],Arguments:e[1]||"None","Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=i.moduleName,n=(i.moduleName+": "+c+"("+a.size()+" elements)",0);c&&(t+=" Performance ("+c+")"),(console.group!==o||console.table!==o)&&u.length>0&&(console.groupCollapsed(t),console.table?(e.each(u,function(e,t){n+=t["Execution Time"]}),console.table(u)):e.each(u,function(e,t){n+=t["Execution Time"],console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),u=[],l=!1)}},invoke:function(n,a,i){var s,r;return a=a||m,i=v||i,"string"==typeof n&&b!==o&&(n=n.split("."),s=n.length-1,e.each(n,function(n,a){return e.isPlainObject(b[a])&&n!=s?(b=b[a],!0):b[a]!==o?(r=b[a],!0):(t.error(C.method),!1)})),e.isFunction(r)?(b.verbose("Executing invoked function",r),r.apply(i,a)):r||!1}},f?(b===o&&t.initialize(),n=t.invoke(d)):(b!==o&&t.destroy(),t.initialize())}),n?n:this},e.fn.checkbox.settings={moduleName:"Checkbox Module",namespace:"checkbox",verbose:!0,debug:!0,performance:!0,context:!1,required:"auto",onChange:function(){},onEnable:function(){},onDisable:function(){},errors:{method:"The method you called is not defined."},selector:{input:"input"},className:{active:"active",radio:"radio"}}})(jQuery,window,document);

249
build/minified/modules/dimmer.js

@ -12,53 +12,84 @@
$.fn.dimmer = function(parameters) { $.fn.dimmer = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
$document = $(document),
settings = $.extend(true, {}, $.fn.dimmer.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dimmer.settings, parameters)
: $.fn.dimmer.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
selector = $allModules.selector || '',
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
namespace = settings.namespace,
className = settings.className,
errors = settings.errors,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse,
allModules selector = settings.selector,
namespace = settings.namespace,
className = settings.className,
error = settings.error,
invokedResponse
; ;
$allModules $allModules
.each(function() { .each(function() {
var var
$module = $(this), $module = $(this),
$dimmer = $module.children(selector.dimmer), $dimmer = $module.children(selector.dimmer).first(),
animationEnd = 'animationend msAnimationEnd oAnimationEnd webkitAnimationEnd',
element = this, element = this,
instance = $module.data('module-' + namespace), instance = $dimmer.data('module-' + namespace),
module module
; ;
module = { module = {
initialize: function() { initialize: function() {
if( $module.is(settings.selector.dimmer) ) { if( module.is.dimmer() ) {
$dimmer = $module; $dimmer = $module;
$module = $dimmer.parent();
module.debug('Module initialized as dimmer', $dimmer);
}
else if( module.is.pageDimmer() ) {
$dimmer = $module;
$module = $('body');
module.debug('Initializing page dimmer', $dimmer);
} }
else { else {
if($dimmer.size() === 0) { if( module.has.dimmer() ) {
module.create(); $dimmer = $module.find(selector.dimmer);
module.debug('Module initialized with found dimmer', $dimmer);
} }
$dimmer = $module.find(selector.dimmer); else {
$dimmer = settings.template.dimmer();
$dimmer
.appendTo($module)
;
module.debug('Module initialized with created dimmer', $dimmer);
}
}
if(settings.closable) {
$dimmer
.on('click', module.event.click)
;
} }
module.debug('Module initialized with dimmer', $dimmer); module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$dimmer
.data('module-' + namespace, instance)
;
}, },
destroy: function() { destroy: function() {
@ -68,28 +99,63 @@ $.fn.dimmer = function(parameters) {
; ;
}, },
event: {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
module.hide();
}
}
},
animate: { animate: {
show: function() { show: function() {
module.set.dimmed();
if(settings.animation.show == 'css') { if(settings.animation.show == 'css') {
module.verbose('Showing dimmer animation with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
})
.addClass(className.show)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.show == 'fade') {
module.verbose('Showing dimmer animation with javascript');
$dimmer $dimmer
.fadeTo(settings.duration, settings.opacity) .stop()
.css({
opacity : 0,
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
; ;
} }
}, },
hide: function() { hide: function() {
if(settings.animation.show == 'css') { module.remove.dimmed();
if(settings.animation.hide == 'css') {
module.verbose('Hiding dimmer with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function(){
module.remove.active();
$dimmer.removeClass(className.hide);
})
.addClass(className.hide)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.hide == 'fade') {
module.verbose('Hiding dimmer with javascript');
$dimmer $dimmer
.fadeOut(settings.duration) .stop()
.fadeOut(settings.duration, function() {
$dimmer.removeAttr('style');
module.remove.active();
})
; ;
} }
else if( $.isFunction(settings.animation.hide) ) { else if( $.isFunction(settings.animation.hide) ) {
@ -98,18 +164,34 @@ $.fn.dimmer = function(parameters) {
} }
}, },
has: {
dimmer: function() {
return ( $module.children(selector.dimmer).size() > 0 );
}
},
is: { is: {
animating: function() {
return ( $dimmer.hasClass(className.show) || $dimmer.hasClass(className.hide) || $dimmer.is(':animated') );
},
dimmer: function() {
return $module.is(selector.dimmer);
},
dimmable: function() {
return $module.is(selector.dimmable);
},
enabled: function() { enabled: function() {
return !$module.hasClass(className.disabled); return !$module.hasClass(className.disabled);
}, },
disabled: function() { disabled: function() {
return $module.hasClass(className.disabled); return $module.hasClass(className.disabled);
}, },
visible: function() { active: function() {
return $dimmer.is(':visible'); return $dimmer.hasClass(className.active);
}, },
hidden: function() { pageDimmer: function() {
return $dimmer.is(':not(:visible)'); return $dimmer.is(selector.pageDimmer);
} }
}, },
@ -119,21 +201,51 @@ $.fn.dimmer = function(parameters) {
} }
}, },
set: {
active: function() {
$dimmer.addClass(className.active);
},
dimmed: function() {
$module.addClass(className.dimmed);
},
disabled: function() {
$dimmer.addClass(className.disabled);
}
},
remove: {
active: function() {
$dimmer.removeClass(className.active);
},
dimmed: function() {
$module.removeClass(className.dimmed);
},
disabled: function() {
$dimmer.removeClass(className.disabled);
}
},
show: function() { show: function() {
module.debug('Showing dimmer', $dimmer); module.debug('Showing dimmer', $dimmer);
if( !module.is.visible() && module.is.enabled() ) { if( !module.is.active() && module.is.enabled() ) {
module.animate.show(); module.animate.show();
$.proxy(settings.onShow, $module.get())(); $.proxy(settings.onShow, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is already shown or disabled');
} }
}, },
hide: function() { hide: function() {
if( !module.is.hidden() ) { if( module.is.active() ) {
module.debug('Hiding dimmer', $dimmer); module.debug('Hiding dimmer', $dimmer);
module.animate.hide(); module.animate.hide();
$.proxy(settings.onHide, $module.get())(); $.proxy(settings.onHide, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is not visible');
} }
}, },
@ -146,7 +258,7 @@ $.fn.dimmer = function(parameters) {
module.hide(); module.hide();
} }
}, },
setting: function(name, value) { setting: function(name, value) {
if(value !== undefined) { if(value !== undefined) {
if( $.isPlainObject(name) ) { if( $.isPlainObject(name) ) {
@ -211,41 +323,39 @@ $.fn.dimmer = function(parameters) {
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -261,18 +371,17 @@ $.fn.dimmer = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(errors.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
@ -293,6 +402,7 @@ $.fn.dimmer = function(parameters) {
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -301,37 +411,48 @@ $.fn.dimmer = function(parameters) {
$.fn.dimmer.settings = { $.fn.dimmer.settings = {
moduleName : 'Dimmer Module', moduleName : 'Dimmer',
namespace : 'dimmer', namespace : 'dimmer',
verbose : true, verbose : true,
debug : true, debug : true,
performance : false, performance : true,
animation : { animation : {
show: 'css', show: 'fade',
hide: 'css' hide: 'fade'
}, },
closable : true,
duration : 500, duration : 500,
opacity : 0.85,
onChange : function(){}, onChange : function(){},
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
errors : { error : {
method : 'The method you called is not defined.' method : 'The method you called is not defined.'
}, },
selector: { selector: {
dimmer : '.ui.dimmer' dimmable : '.ui.dimmable',
dimmer : '.ui.dimmer',
pageDimmer : '.ui.page.dimmer'
},
template: {
dimmer: function() {
return $('<div />').attr('class', 'ui dimmer');
}
}, },
className : { className : {
dimmed : 'dimmed', active : 'active',
active : 'active', dimmed : 'dimmed',
disabled : 'disabled' disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
} }
}; };

2
build/minified/modules/dimmer.min.css

@ -1 +1 @@
.ui.dimmer{display:none;position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;opacity:0;line-height:1;-webkit-transition:background-color .5s ease;-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease;z-index:100}body>.ui.dimmer{position:fixed}.ui.dimmer.active{opacity:.85;display:block}.ui.disabled.dimmer{display:none!important}.ui.page.dimmer{position:fixed}.ui.inverted.dimmer{background-color:#FFF}.ui.simple.dimmer{display:block;overflow:hidden;opacity:1;height:0;width:0;background-color:rgba(0,0,0,0)}.dimmed>.ui.simple.dimmer{overflow:visible;opacity:1;width:100%;height:100%;background-color:rgba(0,0,0,.85)}.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,0)}.dimmed>.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,.85)} .ui.dimmable{position:relative}.ui.dimmer{position:absolute;top:0!important;left:0!important;background-color:rgba(0,0,0,.85);opacity:0;line-height:1;-webkit-animation-fill-mode:forwards;-moz-animation-fill-mode:forwards;-o-animation-fill-mode:forwards;-ms-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-transition:background-color .5s ease;-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease;z-index:100}body.dimmable>.ui.dimmer{position:fixed}.ui.segment>.ui.dimmer{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.ui.horizontal.segment>.ui.dimmer,.ui.vertical.segment>.ui.dimmer{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.ui.dimmable.dimmed :not(.dimmer){-webkit-filter:blur(10px) grayscale(0.7);-moz-filter:blur(10px) grayscale(0.7);filter:blur(10px) grayscale(0.7)}.ui.dimmable.dimmed>.ui.dimmer,.ui.dimmer.active{width:100%;height:100%;opacity:1}.ui.disabled.dimmer{width:0!important;height:0!important}.ui.page.dimmer{position:fixed}.ui.inverted.dimmer{background-color:rgba(255,255,255,.85)}.ui.simple.dimmer{display:block;overflow:hidden;opacity:1;height:0;width:0;background-color:rgba(0,0,0,0)}.ui.dimmable.dimmed>.ui.simple.dimmer{overflow:visible;opacity:1;width:100%;height:100%;background-color:rgba(0,0,0,.85)}.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,0)}.ui.dimmable.dimmed>.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,.85)}.ui.dimmer.show{width:100%;height:100%;-webkit-animation:dimmer-show .5s;-moz-animation:dimmer-show .5s;animation:dimmer-show .5s}@-webkit-keyframes dimmer-show{0%{opacity:0}100%{opacity:1}}@-moz-keyframes dimmer-show{0%{opacity:0}100%{opacity:1}}@keyframes dimmer-show{0%{opacity:0}100%{opacity:1}}.ui.dimmer.hide{-webkit-animation:dimmer-hide .5s;-moz-animation:dimmer-hide .5s;animation:dimmer-hide .5s}@-webkit-keyframes dimmer-hide{0%{opacity:1}99%{width:100%;height:100%;opacity:0}100%{opacity:0;height:0;width:0}}@-moz-keyframes dimmer-hide{0%{opacity:1}99%{width:100%;height:100%;opacity:0}100%{opacity:0;height:0;width:0}}@keyframes dimmer-hide{0%{opacity:1}99%{width:100%;height:100%;opacity:0}100%{opacity:0;height:0;width:0}}

2
build/minified/modules/dimmer.min.js

File diff suppressed because one or more lines are too long

6
build/minified/modules/dropdown.js

@ -14,7 +14,9 @@ $.fn.dropdown = function(parameters) {
$allModules = $(this), $allModules = $(this),
$document = $(document), $document = $(document),
settings = $.extend(true, {}, $.fn.dropdown.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dropdown.settings, parameters)
: $.fn.dropdown.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
@ -506,7 +508,7 @@ $.fn.dropdown = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/minified/modules/dropdown.min.js

File diff suppressed because one or more lines are too long

2
build/minified/modules/modal.min.css

@ -1 +1 @@
#dimmer{position:absolute;visibility:hidden;top:0;left:0;z-index:999;margin:0;width:100%;height:100%;padding:0}#dimmer .content{position:fixed;top:0;left:0;margin:0;width:100%;height:100%;padding:0;visibility:hidden;background-color:#000;opacity:0}.dimmer{display:none;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;background-color:#000;z-index:999}.white.dimmer{background-color:#FFF}.loading .dimmer{display:block;opacity:.8;-webkit-transition:opacity .5s linear;-moz-transition:opacity .5s linear;-o-transition:opacity .5s linear;-ms-transition:opacity .5s linear;transition:opacity .5s linear}.modal{display:none;position:fixed;z-index:1000;top:50%;left:50%;margin-left:-400px;width:800px;-webkit-box-shadow:5px 5px 15px rgba(0,0,0,.8);-moz-box-shadow:5px 5px 15px rgba(0,0,0,.8);box-shadow:5px 5px 15px rgba(0,0,0,.8);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.modal.absolute{position:absolute}.modal.fixed{position:fixed}.modal>.close{cursor:pointer;position:absolute;font-size:14px;color:#FFF;top:-18px;right:-18px;opacity:.8}.modal>.close:hover{opacity:1}.modal>hgroup{background-color:#442359;padding:15px 20px;-webkit-border-radius:10px 10px 0 0;-moz-border-radius:10px 10px 0 0;border-radius:10px 10px 0 0}.modal>hgroup h2{margin:0;font-size:22px;font-weight:700;color:#FFF;text-shadow:0 1px 0 rgba(0,0,0,.75)}.modal>hgroup h3{font-size:18px;color:#FFF}.modal>.content{position:relative;overflow:hidden;padding:20px 20px 40px;background-color:#FAFAFA;-webkit-border-radius:0 0 10px 10px;-moz-border-radius:0 0 10px 10px;border-radius:0 0 10px 10px}.modal>.content .left{float:left;width:50%}.modal>.content .right{float:right;width:50%}.modal.static{display:block;position:relative;overflow:hidden;top:0;left:0;border:1px solid #CCC;width:auto;height:auto;margin:0 auto;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;color:#555;z-index:2;-moz-box-shadow:0 0 2px rgba(0,0,0,.2);-webkit-box-shadow:0 0 2px rgba(0,0,0,.2);box-shadow:0 0 2px rgba(0,0,0,.2)}.modal.static>hgroup,.modal.static>.content{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0} .modal{display:none;position:fixed;z-index:1000;top:50%;left:50%;margin-left:-400px;width:800px;-webkit-box-shadow:5px 5px 15px rgba(0,0,0,.8);-moz-box-shadow:5px 5px 15px rgba(0,0,0,.8);box-shadow:5px 5px 15px rgba(0,0,0,.8);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.modal.absolute{position:absolute}.modal.fixed{position:fixed}.modal>.close{cursor:pointer;position:absolute;font-size:14px;color:#FFF;top:-18px;right:-18px;opacity:.8}.modal>.close:hover{opacity:1}.modal>hgroup{background-color:#442359;padding:15px 20px;-webkit-border-radius:10px 10px 0 0;-moz-border-radius:10px 10px 0 0;border-radius:10px 10px 0 0}.modal>hgroup h2{margin:0;font-size:22px;font-weight:700;color:#FFF;text-shadow:0 1px 0 rgba(0,0,0,.75)}.modal>hgroup h3{font-size:18px;color:#FFF}.modal>.content{position:relative;overflow:hidden;padding:20px 20px 40px;background-color:#FAFAFA;-webkit-border-radius:0 0 10px 10px;-moz-border-radius:0 0 10px 10px;border-radius:0 0 10px 10px}.modal>.content .left{float:left;width:50%}.modal>.content .right{float:right;width:50%}.modal.static{display:block;position:relative;overflow:hidden;top:0;left:0;border:1px solid #CCC;width:auto;height:auto;margin:0 auto;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;color:#555;z-index:2;-moz-box-shadow:0 0 2px rgba(0,0,0,.2);-webkit-box-shadow:0 0 2px rgba(0,0,0,.2);box-shadow:0 0 2px rgba(0,0,0,.2)}.modal.static>hgroup,.modal.static>.content{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}

2
build/minified/modules/modal.min.js

@ -1 +1 @@
(function(e,t,n,o){e.dimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{dim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0,r=i.css("opacity");return a||(i=e("<div/>").attr("id","dimmer").html('<div class="content"></div>'),o.append(i)),r!=n.opacity&&(i.one("click",function(){n.unDim(),e.unDimScreen()}),0===n.duration?i.css({visibility:"visible"}).find(".content").css({opacity:n.opacity,visibility:"visible"}):i.css({visibility:"visible"}).find(".content").css({opacity:0,visibility:"visible"}).fadeTo(n.duration,n.opacity,n.dim)),this},e.unDimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{unDim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0;return a&&(n.unDim(),0===n.duration?i.css({visibility:"hidden"}).remove():i.find(".content").fadeTo(n.duration,0,function(){i.remove()})),this},e.fn.modal=function(i){var a,r=e.extend(!0,{},e.fn.modal.settings,i),s=arguments[0],c=[].slice.call(arguments,1);return e(this).each(function(){var i,l=e(this),u=l.find(r.selector.closeButton),d=(e(r.context).find(r.selector.dimmer),e(r.context).children(r.selector.modal)),m=d.not(l),f=l.data("module-"+r.namespace),p="string"==typeof s,g=(r.className,r.namespace);i={initialize:function(){l.on("modalShow."+g,i.show).on("modalHide."+g,i.hide).data("module-"+g,i)},show:function(){var i=l.outerHeight(),a=e(t).height(),s=i>a,c=s?"absolute":"fixed",d=s?"0":"50%",f=s?a/8:-((i-r.closeSpacing)/2),p="absolute"==l.css("position")?f+e(t).prop("pageYOffset"):f,h=p+r.animationOffset;e.fn.popIn!==o?l.addClass(c).css({display:"block",opacity:0,top:d,marginTop:p+"px"}).popIn():l.addClass(c).css({display:"block",opacity:0,top:d,marginTop:h+"px"}).animate({opacity:1,marginTop:p+"px"},r.duration+300,r.easing),m.is(":visible")&&m.filter(":visible").hide(),e.dimScreen({context:r.context,duration:0,dim:function(){e(n).on("keyup."+g,function(e){var t=e.which,n=27;switch(t){case n:l.trigger("modalHide"),e.preventDefault()}}),u.one("click",function(){l.trigger("modalHide")}),r.dim()},unDim:function(){l.trigger("modalHide"),u.unbind("click")}})},hide:function(){e(n).off("keyup."+g),e.unDimScreen({duration:0,unDim:function(){l.popOut(200),r.unDim()}})},setting:function(e,t){return t===o?r[e]:(r[e]=t,o)},debug:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};r.debug&&(e.push(t),o.apply(console,e.concat(n)))},error:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.warn||console.log||function(){};r.debug&&(e.push(t),e.concat(n),o.apply(console,e.concat(n)))},invoke:function(t,n,a){var s,c;return a=a||[].slice.call(arguments,2),"string"==typeof t&&f!==o&&(t=t.split("."),s=t.length-1,e.each(t,function(t,n){return e.isPlainObject(f[n])&&t!=s?(f=f[n],!0):f[n]!==o?(c=f[n],!0):(i.error(r.errors.method),!1)})),e.isFunction(c)?c.apply(n,a):c}},p?a=i.invoke(s,this,c):i.initialize()}),a!==o?a:this},e.fn.modal.settings={moduleName:"Modal",debug:!1,namespace:"modal",errors:{method:"The method you called is not defined"},dim:function(){},unDim:function(){},hide:function(){},show:function(){},context:"body",opacity:.8,closeSpacing:25,animationOffset:15,duration:400,easing:"easeOutExpo",selector:{dimmer:"#dimmer",modal:".modal",closeButton:".close"}}})(jQuery,window,document); (function(e,t,n,o){e.dimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{dim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0,r=i.css("opacity");return a||(i=e("<div/>").attr("id","dimmer").html('<div class="content"></div>'),o.append(i)),r!=n.opacity&&(i.one("click",function(){n.unDim(),e.unDimScreen()}),0===n.duration?i.css({visibility:"visible"}).find(".content").css({opacity:n.opacity,visibility:"visible"}):i.css({visibility:"visible"}).find(".content").css({opacity:0,visibility:"visible"}).fadeTo(n.duration,n.opacity,n.dim)),this},e.unDimScreen=function(t){var n="function"==typeof t?e.extend({},e.fn.modal.settings,{unDim:t}):e.extend({},e.fn.modal.settings,t),o=e(n.context),i=o.children(n.selector.dimmer),a=i.size()>0;return a&&(n.unDim(),0===n.duration?i.css({visibility:"hidden"}).remove():i.find(".content").fadeTo(n.duration,0,function(){i.remove()})),this},e.fn.modal=function(i){var a,r=e.extend(!0,{},e.fn.modal.settings,i),s=arguments[0],c=[].slice.call(arguments,1);return e(this).each(function(){var i,l=e(this),d=l.find(r.selector.closeButton),u=(e(r.context).find(r.selector.dimmer),e(r.context).children(r.selector.modal)),m=u.not(l),f=l.data("module-"+r.namespace),p="string"==typeof s,g=(r.className,r.namespace);i={initialize:function(){l.on("modalShow."+g,i.show).on("modalHide."+g,i.hide).data("module-"+g,i)},show:function(){var i=l.outerHeight(),a=e(t).height(),s=i>a,c=s?"absolute":"fixed",u=s?"0":"50%",f=s?a/8:-((i-r.closeSpacing)/2),p="absolute"==l.css("position")?f+e(t).prop("pageYOffset"):f,h=p+r.animationOffset;e.fn.popIn!==o?l.addClass(c).css({display:"block",opacity:0,top:u,marginTop:p+"px"}).popIn():l.addClass(c).css({display:"block",opacity:0,top:u,marginTop:h+"px"}).animate({opacity:1,marginTop:p+"px"},r.duration+300,r.easing),m.is(":visible")&&m.filter(":visible").hide(),e.dimScreen({context:r.context,duration:0,dim:function(){e(n).on("keyup."+g,function(e){var t=e.which,n=27;switch(t){case n:l.trigger("modalHide"),e.preventDefault()}}),d.one("click",function(){l.trigger("modalHide")}),r.dim()},unDim:function(){l.trigger("modalHide"),d.unbind("click")}})},hide:function(){e(n).off("keyup."+g),e.unDimScreen({duration:0,unDim:function(){l.popOut(200),r.unDim()}})},setting:function(e,t){return t===o?r[e]:(r[e]=t,o)},debug:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.info||console.log||function(){};r.debug&&(e.push(t),o.apply(console,e.concat(n)))},error:function(){var e=[],t=r.moduleName+": "+arguments[0],n=[].slice.call(arguments,1),o=console.warn||console.log||function(){};r.debug&&(e.push(t),e.concat(n),o.apply(console,e.concat(n)))},invoke:function(t,n,a){var s,c;return a=a||[].slice.call(arguments,2),"string"==typeof t&&f!==o&&(t=t.split("."),s=t.length-1,e.each(t,function(t,n){return e.isPlainObject(f[n])&&t!=s?(f=f[n],!0):f[n]!==o?(c=f[n],!0):(i.error(r.errors.method),!1)})),e.isFunction(c)?c.apply(n,a):c}},p?a=i.invoke(s,this,c):i.initialize()}),a!==o?a:this},e.fn.modal.settings={moduleName:"Modal",debug:!1,namespace:"modal",errors:{method:"The method you called is not defined"},dim:function(){},unDim:function(){},hide:function(){},show:function(){},context:"body",opacity:.8,closeSpacing:25,animationOffset:15,duration:400,easing:"easeOutExpo",selector:{dimmer:"#dimmer",modal:".modal",closeButton:".close"}}})(jQuery,window,document);

108
build/minified/modules/popup.js

@ -1,7 +1,10 @@
/* ****************************** /* ******************************
Tooltip / Popup Semantic Module: Popup
Author: Jack Lukic Author: Jack Lukic
Notes: First Commit Sep 07, 2012 Notes: May 30, 2013
Simple plug-in to display popups
****************************** */ ****************************** */
;(function ($, window, document, undefined) { ;(function ($, window, document, undefined) {
@ -9,19 +12,29 @@
$.fn.popup = function(parameters) { $.fn.popup = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
settings = $.extend(true, {}, $.fn.popup.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.popup.settings, parameters)
: $.fn.popup.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse invokedResponse
; ;
$allModules $allModules
@ -31,19 +44,13 @@ $.fn.popup = function(parameters) {
$window = $(window), $window = $(window),
$offsetParent = $module.offsetParent(), $offsetParent = $module.offsetParent(),
$popup = (settings.inline) $popup = (settings.inline)
? $module.next(settings.selector.popup) ? $module.next(selector.popup)
: $window.children(settings.selector.popup).last(), : $window.children(selector.popup).last(),
searchDepth = 0, searchDepth = 0,
element = this, element = this,
instance = $module.data('module-' + settings.namespace), instance = $module.data('module-' + settings.namespace),
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
module module
; ;
@ -51,6 +58,7 @@ $.fn.popup = function(parameters) {
// binds events // binds events
initialize: function() { initialize: function() {
module.debug('Initializing module', $module);
if(settings.on == 'hover') { if(settings.on == 'hover') {
$module $module
.on('mouseenter.' + namespace, module.event.mouseenter) .on('mouseenter.' + namespace, module.event.mouseenter)
@ -65,8 +73,14 @@ $.fn.popup = function(parameters) {
$window $window
.on('resize.' + namespace, module.event.resize) .on('resize.' + namespace, module.event.resize)
; ;
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$module $module
.data('module-' + namespace, module) .data('module-' + namespace, instance)
; ;
}, },
@ -508,44 +522,42 @@ $.fn.popup = function(parameters) {
previousTime = time || currentTime, previousTime = time || currentTime,
executionTime = currentTime - previousTime; executionTime = currentTime - previousTime;
time = currentTime; time = currentTime;
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -561,24 +573,23 @@ $.fn.popup = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
} }
}; };
if(methodInvoked) { if(methodInvoked) {
if(instance === undefined) { if(instance === undefined) {
module.initialize(); module.initialize();
@ -586,13 +597,14 @@ $.fn.popup = function(parameters) {
invokedResponse = module.invoke(query); invokedResponse = module.invoke(query);
} }
else { else {
if(instance !== undefined) { if(instance === undefined) {
module.destroy(); module.destroy();
} }
module.initialize(); module.initialize();
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -600,31 +612,31 @@ $.fn.popup = function(parameters) {
}; };
$.fn.popup.settings = { $.fn.popup.settings = {
moduleName : 'Pop-up Module', moduleName : 'Popup',
debug : true, debug : true,
verbose : true, verbose : true,
performance : true, performance : true,
namespace : 'popup', namespace : 'popup',
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
content : false, content : false,
html : false, html : false,
title : false, title : false,
on : 'hover', on : 'hover',
clicktoClose : true, clicktoClose : true,
position : 'top center', position : 'top center',
delay : 0, delay : 0,
inline : true, inline : true,
duration : 250, duration : 250,
easing : 'easeOutQuint', easing : 'easeOutQuint',
animation : 'pop', animation : 'pop',
distanceAway : 2, distanceAway : 2,
arrowOffset : 0, arrowOffset : 0,
maxSearchDepth : 10, maxSearchDepth : 10,

2
build/minified/modules/popup.min.js

File diff suppressed because one or more lines are too long

8
build/minified/modules/shape.js

@ -40,7 +40,7 @@ $.fn.shape = function(parameters) {
// private variables // private variables
$activeSide, $activeSide,
$nextSide, $nextSide,
endTransition = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd', transitionEnd = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd',
// standard module // standard module
element = this, element = this,
@ -111,7 +111,7 @@ $.fn.shape = function(parameters) {
; ;
$sides $sides
.css(propertyObject) .css(propertyObject)
.one(endTransition, callback) .one(transitionEnd, callback)
; ;
} }
else { else {
@ -137,7 +137,7 @@ $.fn.shape = function(parameters) {
queue: function(method) { queue: function(method) {
module.debug('Queueing animation of', method); module.debug('Queueing animation of', method);
$sides $sides
.one(endTransition, function() { .one(transitionEnd, function() {
module.debug('Executing queued animation'); module.debug('Executing queued animation');
$module.shape(method); $module.shape(method);
}) })
@ -614,7 +614,7 @@ $.fn.shape = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/minified/modules/shape.min.js

File diff suppressed because one or more lines are too long

2
build/minified/modules/tab.min.js

File diff suppressed because one or more lines are too long

9
build/packaged/modules/behavior/form.js

@ -443,18 +443,17 @@ $.fn.form = function(fields, parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/packaged/modules/carousel.js

@ -264,7 +264,7 @@ $.fn.carousel = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/packaged/modules/checkbox.js

@ -253,7 +253,7 @@ $.fn.checkbox = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

249
build/packaged/modules/dimmer.js

@ -12,53 +12,84 @@
$.fn.dimmer = function(parameters) { $.fn.dimmer = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
$document = $(document),
settings = $.extend(true, {}, $.fn.dimmer.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dimmer.settings, parameters)
: $.fn.dimmer.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
selector = $allModules.selector || '',
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
namespace = settings.namespace,
className = settings.className,
errors = settings.errors,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse,
allModules selector = settings.selector,
namespace = settings.namespace,
className = settings.className,
error = settings.error,
invokedResponse
; ;
$allModules $allModules
.each(function() { .each(function() {
var var
$module = $(this), $module = $(this),
$dimmer = $module.children(selector.dimmer), $dimmer = $module.children(selector.dimmer).first(),
animationEnd = 'animationend msAnimationEnd oAnimationEnd webkitAnimationEnd',
element = this, element = this,
instance = $module.data('module-' + namespace), instance = $dimmer.data('module-' + namespace),
module module
; ;
module = { module = {
initialize: function() { initialize: function() {
if( $module.is(settings.selector.dimmer) ) { if( module.is.dimmer() ) {
$dimmer = $module; $dimmer = $module;
$module = $dimmer.parent();
module.debug('Module initialized as dimmer', $dimmer);
}
else if( module.is.pageDimmer() ) {
$dimmer = $module;
$module = $('body');
module.debug('Initializing page dimmer', $dimmer);
} }
else { else {
if($dimmer.size() === 0) { if( module.has.dimmer() ) {
module.create(); $dimmer = $module.find(selector.dimmer);
module.debug('Module initialized with found dimmer', $dimmer);
} }
$dimmer = $module.find(selector.dimmer); else {
$dimmer = settings.template.dimmer();
$dimmer
.appendTo($module)
;
module.debug('Module initialized with created dimmer', $dimmer);
}
}
if(settings.closable) {
$dimmer
.on('click', module.event.click)
;
} }
module.debug('Module initialized with dimmer', $dimmer); module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$dimmer
.data('module-' + namespace, instance)
;
}, },
destroy: function() { destroy: function() {
@ -68,28 +99,63 @@ $.fn.dimmer = function(parameters) {
; ;
}, },
event: {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
module.hide();
}
}
},
animate: { animate: {
show: function() { show: function() {
module.set.dimmed();
if(settings.animation.show == 'css') { if(settings.animation.show == 'css') {
module.verbose('Showing dimmer animation with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
})
.addClass(className.show)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.show == 'fade') {
module.verbose('Showing dimmer animation with javascript');
$dimmer $dimmer
.fadeTo(settings.duration, settings.opacity) .stop()
.css({
opacity : 0,
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
; ;
} }
}, },
hide: function() { hide: function() {
if(settings.animation.show == 'css') { module.remove.dimmed();
if(settings.animation.hide == 'css') {
module.verbose('Hiding dimmer with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function(){
module.remove.active();
$dimmer.removeClass(className.hide);
})
.addClass(className.hide)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.hide == 'fade') {
module.verbose('Hiding dimmer with javascript');
$dimmer $dimmer
.fadeOut(settings.duration) .stop()
.fadeOut(settings.duration, function() {
$dimmer.removeAttr('style');
module.remove.active();
})
; ;
} }
else if( $.isFunction(settings.animation.hide) ) { else if( $.isFunction(settings.animation.hide) ) {
@ -98,18 +164,34 @@ $.fn.dimmer = function(parameters) {
} }
}, },
has: {
dimmer: function() {
return ( $module.children(selector.dimmer).size() > 0 );
}
},
is: { is: {
animating: function() {
return ( $dimmer.hasClass(className.show) || $dimmer.hasClass(className.hide) || $dimmer.is(':animated') );
},
dimmer: function() {
return $module.is(selector.dimmer);
},
dimmable: function() {
return $module.is(selector.dimmable);
},
enabled: function() { enabled: function() {
return !$module.hasClass(className.disabled); return !$module.hasClass(className.disabled);
}, },
disabled: function() { disabled: function() {
return $module.hasClass(className.disabled); return $module.hasClass(className.disabled);
}, },
visible: function() { active: function() {
return $dimmer.is(':visible'); return $dimmer.hasClass(className.active);
}, },
hidden: function() { pageDimmer: function() {
return $dimmer.is(':not(:visible)'); return $dimmer.is(selector.pageDimmer);
} }
}, },
@ -119,21 +201,51 @@ $.fn.dimmer = function(parameters) {
} }
}, },
set: {
active: function() {
$dimmer.addClass(className.active);
},
dimmed: function() {
$module.addClass(className.dimmed);
},
disabled: function() {
$dimmer.addClass(className.disabled);
}
},
remove: {
active: function() {
$dimmer.removeClass(className.active);
},
dimmed: function() {
$module.removeClass(className.dimmed);
},
disabled: function() {
$dimmer.removeClass(className.disabled);
}
},
show: function() { show: function() {
module.debug('Showing dimmer', $dimmer); module.debug('Showing dimmer', $dimmer);
if( !module.is.visible() && module.is.enabled() ) { if( !module.is.active() && module.is.enabled() ) {
module.animate.show(); module.animate.show();
$.proxy(settings.onShow, $module.get())(); $.proxy(settings.onShow, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is already shown or disabled');
} }
}, },
hide: function() { hide: function() {
if( !module.is.hidden() ) { if( module.is.active() ) {
module.debug('Hiding dimmer', $dimmer); module.debug('Hiding dimmer', $dimmer);
module.animate.hide(); module.animate.hide();
$.proxy(settings.onHide, $module.get())(); $.proxy(settings.onHide, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is not visible');
} }
}, },
@ -146,7 +258,7 @@ $.fn.dimmer = function(parameters) {
module.hide(); module.hide();
} }
}, },
setting: function(name, value) { setting: function(name, value) {
if(value !== undefined) { if(value !== undefined) {
if( $.isPlainObject(name) ) { if( $.isPlainObject(name) ) {
@ -211,41 +323,39 @@ $.fn.dimmer = function(parameters) {
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -261,18 +371,17 @@ $.fn.dimmer = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(errors.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
@ -293,6 +402,7 @@ $.fn.dimmer = function(parameters) {
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -301,37 +411,48 @@ $.fn.dimmer = function(parameters) {
$.fn.dimmer.settings = { $.fn.dimmer.settings = {
moduleName : 'Dimmer Module', moduleName : 'Dimmer',
namespace : 'dimmer', namespace : 'dimmer',
verbose : true, verbose : true,
debug : true, debug : true,
performance : false, performance : true,
animation : { animation : {
show: 'css', show: 'fade',
hide: 'css' hide: 'fade'
}, },
closable : true,
duration : 500, duration : 500,
opacity : 0.85,
onChange : function(){}, onChange : function(){},
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
errors : { error : {
method : 'The method you called is not defined.' method : 'The method you called is not defined.'
}, },
selector: { selector: {
dimmer : '.ui.dimmer' dimmable : '.ui.dimmable',
dimmer : '.ui.dimmer',
pageDimmer : '.ui.page.dimmer'
},
template: {
dimmer: function() {
return $('<div />').attr('class', 'ui dimmer');
}
}, },
className : { className : {
dimmed : 'dimmed', active : 'active',
active : 'active', dimmed : 'dimmed',
disabled : 'disabled' disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
} }
}; };

6
build/packaged/modules/dropdown.js

@ -14,7 +14,9 @@ $.fn.dropdown = function(parameters) {
$allModules = $(this), $allModules = $(this),
$document = $(document), $document = $(document),
settings = $.extend(true, {}, $.fn.dropdown.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dropdown.settings, parameters)
: $.fn.dropdown.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
@ -506,7 +508,7 @@ $.fn.dropdown = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

108
build/packaged/modules/popup.js

@ -1,7 +1,10 @@
/* ****************************** /* ******************************
Tooltip / Popup Semantic Module: Popup
Author: Jack Lukic Author: Jack Lukic
Notes: First Commit Sep 07, 2012 Notes: May 30, 2013
Simple plug-in to display popups
****************************** */ ****************************** */
;(function ($, window, document, undefined) { ;(function ($, window, document, undefined) {
@ -9,19 +12,29 @@
$.fn.popup = function(parameters) { $.fn.popup = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
settings = $.extend(true, {}, $.fn.popup.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.popup.settings, parameters)
: $.fn.popup.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse invokedResponse
; ;
$allModules $allModules
@ -31,19 +44,13 @@ $.fn.popup = function(parameters) {
$window = $(window), $window = $(window),
$offsetParent = $module.offsetParent(), $offsetParent = $module.offsetParent(),
$popup = (settings.inline) $popup = (settings.inline)
? $module.next(settings.selector.popup) ? $module.next(selector.popup)
: $window.children(settings.selector.popup).last(), : $window.children(selector.popup).last(),
searchDepth = 0, searchDepth = 0,
element = this, element = this,
instance = $module.data('module-' + settings.namespace), instance = $module.data('module-' + settings.namespace),
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
module module
; ;
@ -51,6 +58,7 @@ $.fn.popup = function(parameters) {
// binds events // binds events
initialize: function() { initialize: function() {
module.debug('Initializing module', $module);
if(settings.on == 'hover') { if(settings.on == 'hover') {
$module $module
.on('mouseenter.' + namespace, module.event.mouseenter) .on('mouseenter.' + namespace, module.event.mouseenter)
@ -65,8 +73,14 @@ $.fn.popup = function(parameters) {
$window $window
.on('resize.' + namespace, module.event.resize) .on('resize.' + namespace, module.event.resize)
; ;
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$module $module
.data('module-' + namespace, module) .data('module-' + namespace, instance)
; ;
}, },
@ -508,44 +522,42 @@ $.fn.popup = function(parameters) {
previousTime = time || currentTime, previousTime = time || currentTime,
executionTime = currentTime - previousTime; executionTime = currentTime - previousTime;
time = currentTime; time = currentTime;
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -561,24 +573,23 @@ $.fn.popup = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
} }
}; };
if(methodInvoked) { if(methodInvoked) {
if(instance === undefined) { if(instance === undefined) {
module.initialize(); module.initialize();
@ -586,13 +597,14 @@ $.fn.popup = function(parameters) {
invokedResponse = module.invoke(query); invokedResponse = module.invoke(query);
} }
else { else {
if(instance !== undefined) { if(instance === undefined) {
module.destroy(); module.destroy();
} }
module.initialize(); module.initialize();
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -600,31 +612,31 @@ $.fn.popup = function(parameters) {
}; };
$.fn.popup.settings = { $.fn.popup.settings = {
moduleName : 'Pop-up Module', moduleName : 'Popup',
debug : true, debug : true,
verbose : true, verbose : true,
performance : true, performance : true,
namespace : 'popup', namespace : 'popup',
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
content : false, content : false,
html : false, html : false,
title : false, title : false,
on : 'hover', on : 'hover',
clicktoClose : true, clicktoClose : true,
position : 'top center', position : 'top center',
delay : 0, delay : 0,
inline : true, inline : true,
duration : 250, duration : 250,
easing : 'easeOutQuint', easing : 'easeOutQuint',
animation : 'pop', animation : 'pop',
distanceAway : 2, distanceAway : 2,
arrowOffset : 0, arrowOffset : 0,
maxSearchDepth : 10, maxSearchDepth : 10,

8
build/packaged/modules/shape.js

@ -40,7 +40,7 @@ $.fn.shape = function(parameters) {
// private variables // private variables
$activeSide, $activeSide,
$nextSide, $nextSide,
endTransition = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd', transitionEnd = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd',
// standard module // standard module
element = this, element = this,
@ -111,7 +111,7 @@ $.fn.shape = function(parameters) {
; ;
$sides $sides
.css(propertyObject) .css(propertyObject)
.one(endTransition, callback) .one(transitionEnd, callback)
; ;
} }
else { else {
@ -137,7 +137,7 @@ $.fn.shape = function(parameters) {
queue: function(method) { queue: function(method) {
module.debug('Queueing animation of', method); module.debug('Queueing animation of', method);
$sides $sides
.one(endTransition, function() { .one(transitionEnd, function() {
module.debug('Executing queued animation'); module.debug('Executing queued animation');
$module.shape(method); $module.shape(method);
}) })
@ -614,7 +614,7 @@ $.fn.shape = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/packaged/semantic.min.css.REMOVED.git-id

@ -1 +1 @@
8330aa92143bdf65d9e545aa114127ad5da19fba 9e6f6cf6a8b07c39de44b1f9d9237c2c858599d9

2
build/packaged/semantic.min.js.REMOVED.git-id

@ -1 +1 @@
46f95e52fb6ce7bcdc26f7ff75617f8ad17493ec 9cdab95e993a45b7b1ee790f44757d8acc6cd475

26
build/uncompressed/elements/progress.css

@ -52,6 +52,7 @@
.ui.successful.progress .bar::after { .ui.successful.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/*-------------- /*--------------
Failed Failed
@ -63,6 +64,7 @@
.ui.failed.progress .bar::after { .ui.failed.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/*-------------- /*--------------
Active Active
@ -82,11 +84,11 @@
-moz-border-radius: 3px; -moz-border-radius: 3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
-webkit-animation: animate-emphasis 2s ease-out infinite; -webkit-animation: progress-active 2s ease-out infinite;
-moz-animation: animate-emphasis 2s ease-out infinite; -moz-animation: progress-active 2s ease-out infinite;
animation: animate-emphasis 2s ease-out infinite; animation: progress-active 2s ease-out infinite;
} }
@-webkit-keyframes animate-emphasis { @-webkit-keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -99,7 +101,7 @@
width: 95%; width: 95%;
} }
} }
@-moz-keyframes animate-emphasis { @-moz-keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -112,7 +114,7 @@
width: 100%; width: 100%;
} }
} }
@keyframes animate-emphasis { @keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -135,6 +137,7 @@
.ui.disabled.progress .bar::after { .ui.disabled.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/******************************* /*******************************
Variations Variations
@ -178,10 +181,11 @@
background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
} }
.ui.progress.active.striped .bar { .ui.progress.active.striped .bar {
-webkit-animation: animate-striped 3s linear infinite; -webkit-animation: progress-striped 3s linear infinite;
-moz-animation: animate-striped 3s linear infinite; -moz-animation: progress-striped 3s linear infinite;
animation: progress-striped 3s linear infinite;
} }
@-webkit-keyframes animate-striped { @-webkit-keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }
@ -189,7 +193,7 @@
background-position: 60px 0; background-position: 60px 0;
} }
} }
@-moz-keyframes animate-striped { @-moz-keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }
@ -197,7 +201,7 @@
background-position: 60px 0; background-position: 60px 0;
} }
} }
@keyframes animate-striped { @keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }

9
build/uncompressed/modules/behavior/form.js

@ -443,18 +443,17 @@ $.fn.form = function(fields, parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/uncompressed/modules/carousel.js

@ -264,7 +264,7 @@ $.fn.carousel = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
build/uncompressed/modules/checkbox.js

@ -253,7 +253,7 @@ $.fn.checkbox = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

137
build/uncompressed/modules/dimmer.css

@ -12,16 +12,21 @@
/******************************* /*******************************
Dimmer Dimmer
*******************************/ *******************************/
.ui.dimmable {
position: relative;
}
.ui.dimmer { .ui.dimmer {
display: none;
position: absolute; position: absolute;
top: 0em; top: 0em !important;
left: 0em; left: 0em !important;
width: 100%; background-color: rgba(0, 0, 0, 0.85);
height: 100%;
background-color: #000000;
opacity: 0; opacity: 0;
line-height: 1; line-height: 1;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
-ms-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-transition: background-color 0.5s ease; -webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease; -moz-transition: background-color 0.5s ease;
-o-transition: background-color 0.5s ease; -o-transition: background-color 0.5s ease;
@ -29,24 +34,44 @@
transition: background-color 0.5s ease; transition: background-color 0.5s ease;
z-index: 100; z-index: 100;
} }
body > .ui.dimmer { body.dimmable > .ui.dimmer {
position: fixed; position: fixed;
} }
/* Loose Coupling */
.ui.segment > .ui.dimmer {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.ui.horizontal.segment > .ui.dimmer,
.ui.vertical.segment > .ui.dimmer {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/******************************* /*******************************
States States
*******************************/ *******************************/
.ui.dimmable.dimmed :not(.dimmer) {
-webkit-filter: blur(10px) grayscale(0.7);;
-moz-filter: blur(10px) grayscale(0.7);;
filter: blur(10px) grayscale(0.7);;
}
.ui.dimmable.dimmed > .ui.dimmer,
.ui.dimmer.active { .ui.dimmer.active {
opacity: 0.85; width: 100%;
display: block; height: 100%;
opacity: 1;
} }
.ui.disabled.dimmer { .ui.disabled.dimmer {
display: none !important; width: 0em !important;
height: 0em !important;
} }
/******************************* /*******************************
Variations Variations
*******************************/ *******************************/
/*-------------- /*--------------
Page Page
---------------*/ ---------------*/
.ui.page.dimmer { .ui.page.dimmer {
position: fixed; position: fixed;
@ -55,7 +80,7 @@ body > .ui.dimmer {
Inverted Inverted
---------------*/ ---------------*/
.ui.inverted.dimmer { .ui.inverted.dimmer {
background-color: #FFFFFF; background-color: rgba(255, 255, 255, 0.85);
} }
/*-------------- /*--------------
Simple Simple
@ -69,7 +94,7 @@ body > .ui.dimmer {
width: 0px; width: 0px;
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
.dimmed > .ui.simple.dimmer { .ui.dimmable.dimmed > .ui.simple.dimmer {
overflow: visible; overflow: visible;
opacity: 1; opacity: 1;
width: 100%; width: 100%;
@ -79,6 +104,90 @@ body > .ui.dimmer {
.ui.simple.inverted.dimmer { .ui.simple.inverted.dimmer {
background-color: rgba(255, 255, 255, 0); background-color: rgba(255, 255, 255, 0);
} }
.dimmed > .ui.simple.inverted.dimmer { .ui.dimmable.dimmed > .ui.simple.inverted.dimmer {
background-color: rgba(255, 255, 255, 0.85); background-color: rgba(255, 255, 255, 0.85);
} }
/*******************************
Animations
*******************************/
.ui.dimmer.show {
width: 100%;
height: 100%;
-webkit-animation: dimmer-show 0.5s;
-moz-animation: dimmer-show 0.5s;
animation: dimmer-show 0.5s;
}
@-webkit-keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-moz-keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.ui.dimmer.hide {
-webkit-animation: dimmer-hide 0.5s;
-moz-animation: dimmer-hide 0.5s;
animation: dimmer-hide 0.5s;
}
@-webkit-keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}
@-moz-keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}
@keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}

249
build/uncompressed/modules/dimmer.js

@ -12,53 +12,84 @@
$.fn.dimmer = function(parameters) { $.fn.dimmer = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
$document = $(document),
settings = $.extend(true, {}, $.fn.dimmer.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dimmer.settings, parameters)
: $.fn.dimmer.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
selector = $allModules.selector || '',
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
namespace = settings.namespace,
className = settings.className,
errors = settings.errors,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse,
allModules selector = settings.selector,
namespace = settings.namespace,
className = settings.className,
error = settings.error,
invokedResponse
; ;
$allModules $allModules
.each(function() { .each(function() {
var var
$module = $(this), $module = $(this),
$dimmer = $module.children(selector.dimmer), $dimmer = $module.children(selector.dimmer).first(),
animationEnd = 'animationend msAnimationEnd oAnimationEnd webkitAnimationEnd',
element = this, element = this,
instance = $module.data('module-' + namespace), instance = $dimmer.data('module-' + namespace),
module module
; ;
module = { module = {
initialize: function() { initialize: function() {
if( $module.is(settings.selector.dimmer) ) { if( module.is.dimmer() ) {
$dimmer = $module; $dimmer = $module;
$module = $dimmer.parent();
module.debug('Module initialized as dimmer', $dimmer);
}
else if( module.is.pageDimmer() ) {
$dimmer = $module;
$module = $('body');
module.debug('Initializing page dimmer', $dimmer);
} }
else { else {
if($dimmer.size() === 0) { if( module.has.dimmer() ) {
module.create(); $dimmer = $module.find(selector.dimmer);
module.debug('Module initialized with found dimmer', $dimmer);
} }
$dimmer = $module.find(selector.dimmer); else {
$dimmer = settings.template.dimmer();
$dimmer
.appendTo($module)
;
module.debug('Module initialized with created dimmer', $dimmer);
}
}
if(settings.closable) {
$dimmer
.on('click', module.event.click)
;
} }
module.debug('Module initialized with dimmer', $dimmer); module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$dimmer
.data('module-' + namespace, instance)
;
}, },
destroy: function() { destroy: function() {
@ -68,28 +99,63 @@ $.fn.dimmer = function(parameters) {
; ;
}, },
event: {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
module.hide();
}
}
},
animate: { animate: {
show: function() { show: function() {
module.set.dimmed();
if(settings.animation.show == 'css') { if(settings.animation.show == 'css') {
module.verbose('Showing dimmer animation with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
})
.addClass(className.show)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.show == 'fade') {
module.verbose('Showing dimmer animation with javascript');
$dimmer $dimmer
.fadeTo(settings.duration, settings.opacity) .stop()
.css({
opacity : 0,
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
; ;
} }
}, },
hide: function() { hide: function() {
if(settings.animation.show == 'css') { module.remove.dimmed();
if(settings.animation.hide == 'css') {
module.verbose('Hiding dimmer with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function(){
module.remove.active();
$dimmer.removeClass(className.hide);
})
.addClass(className.hide)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.hide == 'fade') {
module.verbose('Hiding dimmer with javascript');
$dimmer $dimmer
.fadeOut(settings.duration) .stop()
.fadeOut(settings.duration, function() {
$dimmer.removeAttr('style');
module.remove.active();
})
; ;
} }
else if( $.isFunction(settings.animation.hide) ) { else if( $.isFunction(settings.animation.hide) ) {
@ -98,18 +164,34 @@ $.fn.dimmer = function(parameters) {
} }
}, },
has: {
dimmer: function() {
return ( $module.children(selector.dimmer).size() > 0 );
}
},
is: { is: {
animating: function() {
return ( $dimmer.hasClass(className.show) || $dimmer.hasClass(className.hide) || $dimmer.is(':animated') );
},
dimmer: function() {
return $module.is(selector.dimmer);
},
dimmable: function() {
return $module.is(selector.dimmable);
},
enabled: function() { enabled: function() {
return !$module.hasClass(className.disabled); return !$module.hasClass(className.disabled);
}, },
disabled: function() { disabled: function() {
return $module.hasClass(className.disabled); return $module.hasClass(className.disabled);
}, },
visible: function() { active: function() {
return $dimmer.is(':visible'); return $dimmer.hasClass(className.active);
}, },
hidden: function() { pageDimmer: function() {
return $dimmer.is(':not(:visible)'); return $dimmer.is(selector.pageDimmer);
} }
}, },
@ -119,21 +201,51 @@ $.fn.dimmer = function(parameters) {
} }
}, },
set: {
active: function() {
$dimmer.addClass(className.active);
},
dimmed: function() {
$module.addClass(className.dimmed);
},
disabled: function() {
$dimmer.addClass(className.disabled);
}
},
remove: {
active: function() {
$dimmer.removeClass(className.active);
},
dimmed: function() {
$module.removeClass(className.dimmed);
},
disabled: function() {
$dimmer.removeClass(className.disabled);
}
},
show: function() { show: function() {
module.debug('Showing dimmer', $dimmer); module.debug('Showing dimmer', $dimmer);
if( !module.is.visible() && module.is.enabled() ) { if( !module.is.active() && module.is.enabled() ) {
module.animate.show(); module.animate.show();
$.proxy(settings.onShow, $module.get())(); $.proxy(settings.onShow, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is already shown or disabled');
} }
}, },
hide: function() { hide: function() {
if( !module.is.hidden() ) { if( module.is.active() ) {
module.debug('Hiding dimmer', $dimmer); module.debug('Hiding dimmer', $dimmer);
module.animate.hide(); module.animate.hide();
$.proxy(settings.onHide, $module.get())(); $.proxy(settings.onHide, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is not visible');
} }
}, },
@ -146,7 +258,7 @@ $.fn.dimmer = function(parameters) {
module.hide(); module.hide();
} }
}, },
setting: function(name, value) { setting: function(name, value) {
if(value !== undefined) { if(value !== undefined) {
if( $.isPlainObject(name) ) { if( $.isPlainObject(name) ) {
@ -211,41 +323,39 @@ $.fn.dimmer = function(parameters) {
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -261,18 +371,17 @@ $.fn.dimmer = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(errors.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
@ -293,6 +402,7 @@ $.fn.dimmer = function(parameters) {
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -301,37 +411,48 @@ $.fn.dimmer = function(parameters) {
$.fn.dimmer.settings = { $.fn.dimmer.settings = {
moduleName : 'Dimmer Module', moduleName : 'Dimmer',
namespace : 'dimmer', namespace : 'dimmer',
verbose : true, verbose : true,
debug : true, debug : true,
performance : false, performance : true,
animation : { animation : {
show: 'css', show: 'fade',
hide: 'css' hide: 'fade'
}, },
closable : true,
duration : 500, duration : 500,
opacity : 0.85,
onChange : function(){}, onChange : function(){},
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
errors : { error : {
method : 'The method you called is not defined.' method : 'The method you called is not defined.'
}, },
selector: { selector: {
dimmer : '.ui.dimmer' dimmable : '.ui.dimmable',
dimmer : '.ui.dimmer',
pageDimmer : '.ui.page.dimmer'
},
template: {
dimmer: function() {
return $('<div />').attr('class', 'ui dimmer');
}
}, },
className : { className : {
dimmed : 'dimmed', active : 'active',
active : 'active', dimmed : 'dimmed',
disabled : 'disabled' disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
} }
}; };

6
build/uncompressed/modules/dropdown.js

@ -14,7 +14,9 @@ $.fn.dropdown = function(parameters) {
$allModules = $(this), $allModules = $(this),
$document = $(document), $document = $(document),
settings = $.extend(true, {}, $.fn.dropdown.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dropdown.settings, parameters)
: $.fn.dropdown.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
@ -506,7 +508,7 @@ $.fn.dropdown = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

51
build/uncompressed/modules/modal.css

@ -1,54 +1,3 @@
/*******************************
Dimmer Styles
*******************************/
/* the one true page dimmer */
#dimmer {
position: absolute;
visibility: hidden;
top: 0px;
left: 0px;
z-index: 999;
margin: 0px;
width: 100%;
height: 100%;
padding: 0px;
}
#dimmer .content {
position: fixed;
top: 0px;
left: 0px;
margin: 0px;
width: 100%;
height: 100%;
padding: 0px;
visibility: hidden;
background-color: #000000;
opacity: 0.0;
}
/* a generic dimmer */
.dimmer {
display: none;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
opacity: 0;
background-color: #000000;
z-index: 999;
}
.white.dimmer {
background-color: #FFFFFF;
}
.loading .dimmer {
display: block;
opacity: 0.8;
-webkit-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
-ms-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
/******************************* /*******************************
Modal Styles Modal Styles
*******************************/ *******************************/

108
build/uncompressed/modules/popup.js

@ -1,7 +1,10 @@
/* ****************************** /* ******************************
Tooltip / Popup Semantic Module: Popup
Author: Jack Lukic Author: Jack Lukic
Notes: First Commit Sep 07, 2012 Notes: May 30, 2013
Simple plug-in to display popups
****************************** */ ****************************** */
;(function ($, window, document, undefined) { ;(function ($, window, document, undefined) {
@ -9,19 +12,29 @@
$.fn.popup = function(parameters) { $.fn.popup = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
settings = $.extend(true, {}, $.fn.popup.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.popup.settings, parameters)
: $.fn.popup.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse invokedResponse
; ;
$allModules $allModules
@ -31,19 +44,13 @@ $.fn.popup = function(parameters) {
$window = $(window), $window = $(window),
$offsetParent = $module.offsetParent(), $offsetParent = $module.offsetParent(),
$popup = (settings.inline) $popup = (settings.inline)
? $module.next(settings.selector.popup) ? $module.next(selector.popup)
: $window.children(settings.selector.popup).last(), : $window.children(selector.popup).last(),
searchDepth = 0, searchDepth = 0,
element = this, element = this,
instance = $module.data('module-' + settings.namespace), instance = $module.data('module-' + settings.namespace),
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
module module
; ;
@ -51,6 +58,7 @@ $.fn.popup = function(parameters) {
// binds events // binds events
initialize: function() { initialize: function() {
module.debug('Initializing module', $module);
if(settings.on == 'hover') { if(settings.on == 'hover') {
$module $module
.on('mouseenter.' + namespace, module.event.mouseenter) .on('mouseenter.' + namespace, module.event.mouseenter)
@ -65,8 +73,14 @@ $.fn.popup = function(parameters) {
$window $window
.on('resize.' + namespace, module.event.resize) .on('resize.' + namespace, module.event.resize)
; ;
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$module $module
.data('module-' + namespace, module) .data('module-' + namespace, instance)
; ;
}, },
@ -508,44 +522,42 @@ $.fn.popup = function(parameters) {
previousTime = time || currentTime, previousTime = time || currentTime,
executionTime = currentTime - previousTime; executionTime = currentTime - previousTime;
time = currentTime; time = currentTime;
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -561,24 +573,23 @@ $.fn.popup = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
} }
}; };
if(methodInvoked) { if(methodInvoked) {
if(instance === undefined) { if(instance === undefined) {
module.initialize(); module.initialize();
@ -586,13 +597,14 @@ $.fn.popup = function(parameters) {
invokedResponse = module.invoke(query); invokedResponse = module.invoke(query);
} }
else { else {
if(instance !== undefined) { if(instance === undefined) {
module.destroy(); module.destroy();
} }
module.initialize(); module.initialize();
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -600,31 +612,31 @@ $.fn.popup = function(parameters) {
}; };
$.fn.popup.settings = { $.fn.popup.settings = {
moduleName : 'Pop-up Module', moduleName : 'Popup',
debug : true, debug : true,
verbose : true, verbose : true,
performance : true, performance : true,
namespace : 'popup', namespace : 'popup',
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
content : false, content : false,
html : false, html : false,
title : false, title : false,
on : 'hover', on : 'hover',
clicktoClose : true, clicktoClose : true,
position : 'top center', position : 'top center',
delay : 0, delay : 0,
inline : true, inline : true,
duration : 250, duration : 250,
easing : 'easeOutQuint', easing : 'easeOutQuint',
animation : 'pop', animation : 'pop',
distanceAway : 2, distanceAway : 2,
arrowOffset : 0, arrowOffset : 0,
maxSearchDepth : 10, maxSearchDepth : 10,

8
build/uncompressed/modules/shape.js

@ -40,7 +40,7 @@ $.fn.shape = function(parameters) {
// private variables // private variables
$activeSide, $activeSide,
$nextSide, $nextSide,
endTransition = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd', transitionEnd = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd',
// standard module // standard module
element = this, element = this,
@ -111,7 +111,7 @@ $.fn.shape = function(parameters) {
; ;
$sides $sides
.css(propertyObject) .css(propertyObject)
.one(endTransition, callback) .one(transitionEnd, callback)
; ;
} }
else { else {
@ -137,7 +137,7 @@ $.fn.shape = function(parameters) {
queue: function(method) { queue: function(method) {
module.debug('Queueing animation of', method); module.debug('Queueing animation of', method);
$sides $sides
.one(endTransition, function() { .one(transitionEnd, function() {
module.debug('Executing queued animation'); module.debug('Executing queued animation');
$module.shape(method); $module.shape(method);
}) })
@ -614,7 +614,7 @@ $.fn.shape = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
node/docpad.coffee

@ -10,7 +10,7 @@ docpadConfig = {
jade: false jade: false
marked: false marked: false
paged: false paged: false
liveReload: false livereload: false
plugins: plugins:
handlebars: handlebars:

103
node/src/documents/modules/dimmer.html

@ -43,22 +43,75 @@ type : 'UI Module'
<h2 class="ui dividing header">Standard</h2> <h2 class="ui dividing header">Standard</h2>
<div class="example"> <div class="example">
<h4 class="ui header">Dimmer:</h4> <h4 class="ui header">Dimmer Content</h4>
<p>A standard dimmer</p> <p>A dimmer can contain content which will display when dimmed</p>
<div class="ui info message">If no UI dimmer exists inside a content segment it will automatically be added on first use</div>
<div class="ui segment"> <div class="ui segment">
<div class="ui dimmer"></div> <h4 class="ui red inverted block header">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> Check out these pictures of dogs
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p> </h4>
<img src="/images/demo/item1.jpg">
<img src="/images/demo/item2.jpg">
<div class="ui dimmer">
<h2 class="ui inverted header">This is a message for you</h2>
</div>
</div> </div>
<div class="ignore ui icon buttons"> <div class="ignore ui icon buttons">
<div class="ui show button"><i class="plus icon"></i></div> <div class="ui show button"><i class="plus icon"></i></div>
<div class="ui hide button"><i class="minus icon"></i></div> <div class="ui hide button"><i class="minus icon"></i></div>
</div> </div>
</div> </div>
<div class="example">
<h4 class="ui header">Page Dimmer</h4>
<p>A dimmer can be formatted to be fixed to the page</p>
<div class="ui page dimmer"></div>
<div class="ui page button"><i class="plus icon"></i> Show</div>
</div>
<div class="example">
<h4 class="ui header">Stand-alone Dimmer</h4>
<p>A dimmer can exist on its own without defining content that is /p>
<div class="ui segment">
<h4 class="ui red inverted block header">
Check out these pictures of dogs
</h4>
<img src="/images/demo/item1.jpg">
<img src="/images/demo/item2.jpg">
<div class="ui dimmer"></div>
</div>
<div class="ignored ui icon buttons">
<div class="ui show button"><i class="plus icon"></i></div>
<div class="ui hide button"><i class="minus icon"></i></div>
</div>
</div>
<h2 class="ui dividing header">Behavior</h2> <h2 class="ui dividing header">Behavior</h2>
<div class="no example">
<h4>Display</h4>
<p>A dimmer can show or hide itself, a can show or hide a dimmer</p>
<div class="ignore code">
// these two are the same
$('.ui.)
.dimmer('show')
;
$('.ui.dimmer')
.dimmer('show')
;
// these two as well
$('.ui.)
.dimmer('hide')
;
$('.ui.dimmer')
.dimmer('hide')
;
</div>
</div>
<h2 class="ui dividing header">States</h2> <h2 class="ui dividing header">States</h2>
<div class="example"> <div class="example">
@ -79,25 +132,51 @@ type : 'UI Module'
<h2 class="ui dividing header">Variations</h2> <h2 class="ui dividing header">Variations</h2>
<h3>Dimmer</h3>
<div class="example"> <div class="example">
<h4 class="ui header">Simple Dimmer</h4> <h4 class="ui header">Simple Dimmer</h4>
<p>A dimmer can be controlled without javascript</p> <p>A dimmer can be controlled without javascript</p>
<div class="ignored ui info message">Having any parent element receive the class "dimmed" will trigger the dimmer to display.</div> <div class="ignored ui info message">Having any parent element receive the class "dimmed" will trigger the dimmer to display.</div>
<div class="ui simple dimmer"></div> <div class="ui dimmed segment">
<div class="ui simple dimmer"></div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div> </div>
<div class="example"> <div class="example">
<h4 class="ui header">Inverted Dimmer</h4> <h4 class="ui header">Inverted Dimmer</h4>
<p>A dimmer can have its colors inverted</p> <p>A dimmer can be formatted to have its colors inverted</p>
<div class="ui inverted dimmer"></div> <div class="ui segment">
<div class="ui inverted dimmer"></div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="ignore ui icon buttons">
<div class="ui show button"><i class="plus icon"></i></div>
<div class="ui hide button"><i class="minus icon"></i></div>
</div>
</div> </div>
<h3>/h3>
<div class="example"> <div class="example">
<h4 class="ui header">Page Dimmer</h4> <h4 class="ui header">Blurred /h4>
<p>A dimmer can be formatted to be fixed to the page</p> <p>A section may have its content blurred when dimmed</p>
<div class="ui page dimmer"></div> <div class="ui red message">CSS Filters are only currently supported in Webkit browsers</div>
<div class="ui blurring segment">
<h4 class="ui red inverted block header">
Check out these pictures of dogs
</h4>
<img src="/images/demo/item1.jpg">
<img src="/images/demo/item2.jpg">
<div class="ui dimmer"></div>
</div>
<div class="ignore ui icon buttons">
<div class="ui show button"><i class="plus icon"></i></div>
<div class="ui hide button"><i class="minus icon"></i></div>
</div>
</div> </div>
</div> </div>
</body> </body>

8
node/src/documents/modules/dropdown.html

@ -180,7 +180,7 @@ type : 'UI Module'
<h2 class="ui dividing header">Behavior</h2> <h2 class="ui dividing header">Behavior</h2>
<div class="example"> <div class="no example">
<h4>Trigger event</h4> <h4>Trigger event</h4>
<p>A dropdown can trigger based on a variety of user events</p> <p>A dropdown can trigger based on a variety of user events</p>
<div class="ignore code"> <div class="ignore code">
@ -198,7 +198,7 @@ type : 'UI Module'
; ;
</div> </div>
</div> </div>
<div class="example"> <div class="no example">
<h4>Dropdown Action</h4> <h4>Dropdown Action</h4>
<p>A dropdown can trigger different behaviors on selection</p> <p>A dropdown can trigger different behaviors on selection</p>
<div class="ignore code"> <div class="ignore code">
@ -239,7 +239,7 @@ type : 'UI Module'
; ;
</div> </div>
</div> </div>
<div class="example"> <div class="no example">
<h4>Display state</h4> <h4>Display state</h4>
<p>A dropdown can show or hide itself</p> <p>A dropdown can show or hide itself</p>
<div class="ignore code"> <div class="ignore code">
@ -251,7 +251,7 @@ type : 'UI Module'
; ;
</div> </div>
</div> </div>
<div class="example"> <div class="no example">
<h4>Toggle</h4> <h4>Toggle</h4>
<p>A dropdown can toggle between states</p> <p>A dropdown can toggle between states</p>
<div class="ignore code"> <div class="ignore code">

26
node/src/files/components/semantic/elements/progress.css

@ -52,6 +52,7 @@
.ui.successful.progress .bar::after { .ui.successful.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/*-------------- /*--------------
Failed Failed
@ -63,6 +64,7 @@
.ui.failed.progress .bar::after { .ui.failed.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/*-------------- /*--------------
Active Active
@ -82,11 +84,11 @@
-moz-border-radius: 3px; -moz-border-radius: 3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
-webkit-animation: animate-emphasis 2s ease-out infinite; -webkit-animation: progress-active 2s ease-out infinite;
-moz-animation: animate-emphasis 2s ease-out infinite; -moz-animation: progress-active 2s ease-out infinite;
animation: animate-emphasis 2s ease-out infinite; animation: progress-active 2s ease-out infinite;
} }
@-webkit-keyframes animate-emphasis { @-webkit-keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -99,7 +101,7 @@
width: 95%; width: 95%;
} }
} }
@-moz-keyframes animate-emphasis { @-moz-keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -112,7 +114,7 @@
width: 100%; width: 100%;
} }
} }
@keyframes animate-emphasis { @keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -135,6 +137,7 @@
.ui.disabled.progress .bar::after { .ui.disabled.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/******************************* /*******************************
Variations Variations
@ -178,10 +181,11 @@
background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
} }
.ui.progress.active.striped .bar { .ui.progress.active.striped .bar {
-webkit-animation: animate-striped 3s linear infinite; -webkit-animation: progress-striped 3s linear infinite;
-moz-animation: animate-striped 3s linear infinite; -moz-animation: progress-striped 3s linear infinite;
animation: progress-striped 3s linear infinite;
} }
@-webkit-keyframes animate-striped { @-webkit-keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }
@ -189,7 +193,7 @@
background-position: 60px 0; background-position: 60px 0;
} }
} }
@-moz-keyframes animate-striped { @-moz-keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }
@ -197,7 +201,7 @@
background-position: 60px 0; background-position: 60px 0;
} }
} }
@keyframes animate-striped { @keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }

9
node/src/files/components/semantic/modules/behavior/form.js

@ -443,18 +443,17 @@ $.fn.form = function(fields, parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
node/src/files/components/semantic/modules/carousel.js

@ -264,7 +264,7 @@ $.fn.carousel = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
node/src/files/components/semantic/modules/checkbox.js

@ -253,7 +253,7 @@ $.fn.checkbox = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

137
node/src/files/components/semantic/modules/dimmer.css

@ -12,16 +12,21 @@
/******************************* /*******************************
Dimmer Dimmer
*******************************/ *******************************/
.ui.dimmable {
position: relative;
}
.ui.dimmer { .ui.dimmer {
display: none;
position: absolute; position: absolute;
top: 0em; top: 0em !important;
left: 0em; left: 0em !important;
width: 100%; background-color: rgba(0, 0, 0, 0.85);
height: 100%;
background-color: #000000;
opacity: 0; opacity: 0;
line-height: 1; line-height: 1;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
-ms-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-transition: background-color 0.5s ease; -webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease; -moz-transition: background-color 0.5s ease;
-o-transition: background-color 0.5s ease; -o-transition: background-color 0.5s ease;
@ -29,24 +34,44 @@
transition: background-color 0.5s ease; transition: background-color 0.5s ease;
z-index: 100; z-index: 100;
} }
body > .ui.dimmer { body.dimmable > .ui.dimmer {
position: fixed; position: fixed;
} }
/* Loose Coupling */
.ui.segment > .ui.dimmer {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.ui.horizontal.segment > .ui.dimmer,
.ui.vertical.segment > .ui.dimmer {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/******************************* /*******************************
States States
*******************************/ *******************************/
.ui.dimmable.dimmed :not(.dimmer) {
-webkit-filter: blur(10px) grayscale(0.7);;
-moz-filter: blur(10px) grayscale(0.7);;
filter: blur(10px) grayscale(0.7);;
}
.ui.dimmable.dimmed > .ui.dimmer,
.ui.dimmer.active { .ui.dimmer.active {
opacity: 0.85; width: 100%;
display: block; height: 100%;
opacity: 1;
} }
.ui.disabled.dimmer { .ui.disabled.dimmer {
display: none !important; width: 0em !important;
height: 0em !important;
} }
/******************************* /*******************************
Variations Variations
*******************************/ *******************************/
/*-------------- /*--------------
Page Page
---------------*/ ---------------*/
.ui.page.dimmer { .ui.page.dimmer {
position: fixed; position: fixed;
@ -55,7 +80,7 @@ body > .ui.dimmer {
Inverted Inverted
---------------*/ ---------------*/
.ui.inverted.dimmer { .ui.inverted.dimmer {
background-color: #FFFFFF; background-color: rgba(255, 255, 255, 0.85);
} }
/*-------------- /*--------------
Simple Simple
@ -69,7 +94,7 @@ body > .ui.dimmer {
width: 0px; width: 0px;
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
.dimmed > .ui.simple.dimmer { .ui.dimmable.dimmed > .ui.simple.dimmer {
overflow: visible; overflow: visible;
opacity: 1; opacity: 1;
width: 100%; width: 100%;
@ -79,6 +104,90 @@ body > .ui.dimmer {
.ui.simple.inverted.dimmer { .ui.simple.inverted.dimmer {
background-color: rgba(255, 255, 255, 0); background-color: rgba(255, 255, 255, 0);
} }
.dimmed > .ui.simple.inverted.dimmer { .ui.dimmable.dimmed > .ui.simple.inverted.dimmer {
background-color: rgba(255, 255, 255, 0.85); background-color: rgba(255, 255, 255, 0.85);
} }
/*******************************
Animations
*******************************/
.ui.dimmer.show {
width: 100%;
height: 100%;
-webkit-animation: dimmer-show 0.5s;
-moz-animation: dimmer-show 0.5s;
animation: dimmer-show 0.5s;
}
@-webkit-keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-moz-keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.ui.dimmer.hide {
-webkit-animation: dimmer-hide 0.5s;
-moz-animation: dimmer-hide 0.5s;
animation: dimmer-hide 0.5s;
}
@-webkit-keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}
@-moz-keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}
@keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}

249
node/src/files/components/semantic/modules/dimmer.js

@ -12,53 +12,84 @@
$.fn.dimmer = function(parameters) { $.fn.dimmer = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
$document = $(document),
settings = $.extend(true, {}, $.fn.dimmer.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dimmer.settings, parameters)
: $.fn.dimmer.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
selector = $allModules.selector || '',
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
namespace = settings.namespace,
className = settings.className,
errors = settings.errors,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse,
allModules selector = settings.selector,
namespace = settings.namespace,
className = settings.className,
error = settings.error,
invokedResponse
; ;
$allModules $allModules
.each(function() { .each(function() {
var var
$module = $(this), $module = $(this),
$dimmer = $module.children(selector.dimmer), $dimmer = $module.children(selector.dimmer).first(),
animationEnd = 'animationend msAnimationEnd oAnimationEnd webkitAnimationEnd',
element = this, element = this,
instance = $module.data('module-' + namespace), instance = $dimmer.data('module-' + namespace),
module module
; ;
module = { module = {
initialize: function() { initialize: function() {
if( $module.is(settings.selector.dimmer) ) { if( module.is.dimmer() ) {
$dimmer = $module; $dimmer = $module;
$module = $dimmer.parent();
module.debug('Module initialized as dimmer', $dimmer);
}
else if( module.is.pageDimmer() ) {
$dimmer = $module;
$module = $('body');
module.debug('Initializing page dimmer', $dimmer);
} }
else { else {
if($dimmer.size() === 0) { if( module.has.dimmer() ) {
module.create(); $dimmer = $module.find(selector.dimmer);
module.debug('Module initialized with found dimmer', $dimmer);
} }
$dimmer = $module.find(selector.dimmer); else {
$dimmer = settings.template.dimmer();
$dimmer
.appendTo($module)
;
module.debug('Module initialized with created dimmer', $dimmer);
}
}
if(settings.closable) {
$dimmer
.on('click', module.event.click)
;
} }
module.debug('Module initialized with dimmer', $dimmer); module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$dimmer
.data('module-' + namespace, instance)
;
}, },
destroy: function() { destroy: function() {
@ -68,28 +99,63 @@ $.fn.dimmer = function(parameters) {
; ;
}, },
event: {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
module.hide();
}
}
},
animate: { animate: {
show: function() { show: function() {
module.set.dimmed();
if(settings.animation.show == 'css') { if(settings.animation.show == 'css') {
module.verbose('Showing dimmer animation with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
})
.addClass(className.show)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.show == 'fade') {
module.verbose('Showing dimmer animation with javascript');
$dimmer $dimmer
.fadeTo(settings.duration, settings.opacity) .stop()
.css({
opacity : 0,
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
; ;
} }
}, },
hide: function() { hide: function() {
if(settings.animation.show == 'css') { module.remove.dimmed();
if(settings.animation.hide == 'css') {
module.verbose('Hiding dimmer with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function(){
module.remove.active();
$dimmer.removeClass(className.hide);
})
.addClass(className.hide)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.hide == 'fade') {
module.verbose('Hiding dimmer with javascript');
$dimmer $dimmer
.fadeOut(settings.duration) .stop()
.fadeOut(settings.duration, function() {
$dimmer.removeAttr('style');
module.remove.active();
})
; ;
} }
else if( $.isFunction(settings.animation.hide) ) { else if( $.isFunction(settings.animation.hide) ) {
@ -98,18 +164,34 @@ $.fn.dimmer = function(parameters) {
} }
}, },
has: {
dimmer: function() {
return ( $module.children(selector.dimmer).size() > 0 );
}
},
is: { is: {
animating: function() {
return ( $dimmer.hasClass(className.show) || $dimmer.hasClass(className.hide) || $dimmer.is(':animated') );
},
dimmer: function() {
return $module.is(selector.dimmer);
},
dimmable: function() {
return $module.is(selector.dimmable);
},
enabled: function() { enabled: function() {
return !$module.hasClass(className.disabled); return !$module.hasClass(className.disabled);
}, },
disabled: function() { disabled: function() {
return $module.hasClass(className.disabled); return $module.hasClass(className.disabled);
}, },
visible: function() { active: function() {
return $dimmer.is(':visible'); return $dimmer.hasClass(className.active);
}, },
hidden: function() { pageDimmer: function() {
return $dimmer.is(':not(:visible)'); return $dimmer.is(selector.pageDimmer);
} }
}, },
@ -119,21 +201,51 @@ $.fn.dimmer = function(parameters) {
} }
}, },
set: {
active: function() {
$dimmer.addClass(className.active);
},
dimmed: function() {
$module.addClass(className.dimmed);
},
disabled: function() {
$dimmer.addClass(className.disabled);
}
},
remove: {
active: function() {
$dimmer.removeClass(className.active);
},
dimmed: function() {
$module.removeClass(className.dimmed);
},
disabled: function() {
$dimmer.removeClass(className.disabled);
}
},
show: function() { show: function() {
module.debug('Showing dimmer', $dimmer); module.debug('Showing dimmer', $dimmer);
if( !module.is.visible() && module.is.enabled() ) { if( !module.is.active() && module.is.enabled() ) {
module.animate.show(); module.animate.show();
$.proxy(settings.onShow, $module.get())(); $.proxy(settings.onShow, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is already shown or disabled');
} }
}, },
hide: function() { hide: function() {
if( !module.is.hidden() ) { if( module.is.active() ) {
module.debug('Hiding dimmer', $dimmer); module.debug('Hiding dimmer', $dimmer);
module.animate.hide(); module.animate.hide();
$.proxy(settings.onHide, $module.get())(); $.proxy(settings.onHide, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is not visible');
} }
}, },
@ -146,7 +258,7 @@ $.fn.dimmer = function(parameters) {
module.hide(); module.hide();
} }
}, },
setting: function(name, value) { setting: function(name, value) {
if(value !== undefined) { if(value !== undefined) {
if( $.isPlainObject(name) ) { if( $.isPlainObject(name) ) {
@ -211,41 +323,39 @@ $.fn.dimmer = function(parameters) {
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -261,18 +371,17 @@ $.fn.dimmer = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(errors.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
@ -293,6 +402,7 @@ $.fn.dimmer = function(parameters) {
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -301,37 +411,48 @@ $.fn.dimmer = function(parameters) {
$.fn.dimmer.settings = { $.fn.dimmer.settings = {
moduleName : 'Dimmer Module', moduleName : 'Dimmer',
namespace : 'dimmer', namespace : 'dimmer',
verbose : true, verbose : true,
debug : true, debug : true,
performance : false, performance : true,
animation : { animation : {
show: 'css', show: 'fade',
hide: 'css' hide: 'fade'
}, },
closable : true,
duration : 500, duration : 500,
opacity : 0.85,
onChange : function(){}, onChange : function(){},
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
errors : { error : {
method : 'The method you called is not defined.' method : 'The method you called is not defined.'
}, },
selector: { selector: {
dimmer : '.ui.dimmer' dimmable : '.ui.dimmable',
dimmer : '.ui.dimmer',
pageDimmer : '.ui.page.dimmer'
},
template: {
dimmer: function() {
return $('<div />').attr('class', 'ui dimmer');
}
}, },
className : { className : {
dimmed : 'dimmed', active : 'active',
active : 'active', dimmed : 'dimmed',
disabled : 'disabled' disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
} }
}; };

6
node/src/files/components/semantic/modules/dropdown.js

@ -14,7 +14,9 @@ $.fn.dropdown = function(parameters) {
$allModules = $(this), $allModules = $(this),
$document = $(document), $document = $(document),
settings = $.extend(true, {}, $.fn.dropdown.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dropdown.settings, parameters)
: $.fn.dropdown.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
@ -506,7 +508,7 @@ $.fn.dropdown = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

51
node/src/files/components/semantic/modules/modal.css

@ -1,54 +1,3 @@
/*******************************
Dimmer Styles
*******************************/
/* the one true page dimmer */
#dimmer {
position: absolute;
visibility: hidden;
top: 0px;
left: 0px;
z-index: 999;
margin: 0px;
width: 100%;
height: 100%;
padding: 0px;
}
#dimmer .content {
position: fixed;
top: 0px;
left: 0px;
margin: 0px;
width: 100%;
height: 100%;
padding: 0px;
visibility: hidden;
background-color: #000000;
opacity: 0.0;
}
/* a generic dimmer */
.dimmer {
display: none;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
opacity: 0;
background-color: #000000;
z-index: 999;
}
.white.dimmer {
background-color: #FFFFFF;
}
.loading .dimmer {
display: block;
opacity: 0.8;
-webkit-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
-ms-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
/******************************* /*******************************
Modal Styles Modal Styles
*******************************/ *******************************/

108
node/src/files/components/semantic/modules/popup.js

@ -1,7 +1,10 @@
/* ****************************** /* ******************************
Tooltip / Popup Semantic Module: Popup
Author: Jack Lukic Author: Jack Lukic
Notes: First Commit Sep 07, 2012 Notes: May 30, 2013
Simple plug-in to display popups
****************************** */ ****************************** */
;(function ($, window, document, undefined) { ;(function ($, window, document, undefined) {
@ -9,19 +12,29 @@
$.fn.popup = function(parameters) { $.fn.popup = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
settings = $.extend(true, {}, $.fn.popup.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.popup.settings, parameters)
: $.fn.popup.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse invokedResponse
; ;
$allModules $allModules
@ -31,19 +44,13 @@ $.fn.popup = function(parameters) {
$window = $(window), $window = $(window),
$offsetParent = $module.offsetParent(), $offsetParent = $module.offsetParent(),
$popup = (settings.inline) $popup = (settings.inline)
? $module.next(settings.selector.popup) ? $module.next(selector.popup)
: $window.children(settings.selector.popup).last(), : $window.children(selector.popup).last(),
searchDepth = 0, searchDepth = 0,
element = this, element = this,
instance = $module.data('module-' + settings.namespace), instance = $module.data('module-' + settings.namespace),
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
module module
; ;
@ -51,6 +58,7 @@ $.fn.popup = function(parameters) {
// binds events // binds events
initialize: function() { initialize: function() {
module.debug('Initializing module', $module);
if(settings.on == 'hover') { if(settings.on == 'hover') {
$module $module
.on('mouseenter.' + namespace, module.event.mouseenter) .on('mouseenter.' + namespace, module.event.mouseenter)
@ -65,8 +73,14 @@ $.fn.popup = function(parameters) {
$window $window
.on('resize.' + namespace, module.event.resize) .on('resize.' + namespace, module.event.resize)
; ;
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$module $module
.data('module-' + namespace, module) .data('module-' + namespace, instance)
; ;
}, },
@ -508,44 +522,42 @@ $.fn.popup = function(parameters) {
previousTime = time || currentTime, previousTime = time || currentTime,
executionTime = currentTime - previousTime; executionTime = currentTime - previousTime;
time = currentTime; time = currentTime;
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -561,24 +573,23 @@ $.fn.popup = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
} }
}; };
if(methodInvoked) { if(methodInvoked) {
if(instance === undefined) { if(instance === undefined) {
module.initialize(); module.initialize();
@ -586,13 +597,14 @@ $.fn.popup = function(parameters) {
invokedResponse = module.invoke(query); invokedResponse = module.invoke(query);
} }
else { else {
if(instance !== undefined) { if(instance === undefined) {
module.destroy(); module.destroy();
} }
module.initialize(); module.initialize();
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -600,31 +612,31 @@ $.fn.popup = function(parameters) {
}; };
$.fn.popup.settings = { $.fn.popup.settings = {
moduleName : 'Pop-up Module', moduleName : 'Popup',
debug : true, debug : true,
verbose : true, verbose : true,
performance : true, performance : true,
namespace : 'popup', namespace : 'popup',
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
content : false, content : false,
html : false, html : false,
title : false, title : false,
on : 'hover', on : 'hover',
clicktoClose : true, clicktoClose : true,
position : 'top center', position : 'top center',
delay : 0, delay : 0,
inline : true, inline : true,
duration : 250, duration : 250,
easing : 'easeOutQuint', easing : 'easeOutQuint',
animation : 'pop', animation : 'pop',
distanceAway : 2, distanceAway : 2,
arrowOffset : 0, arrowOffset : 0,
maxSearchDepth : 10, maxSearchDepth : 10,

8
node/src/files/components/semantic/modules/shape.js

@ -40,7 +40,7 @@ $.fn.shape = function(parameters) {
// private variables // private variables
$activeSide, $activeSide,
$nextSide, $nextSide,
endTransition = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd', transitionEnd = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd',
// standard module // standard module
element = this, element = this,
@ -111,7 +111,7 @@ $.fn.shape = function(parameters) {
; ;
$sides $sides
.css(propertyObject) .css(propertyObject)
.one(endTransition, callback) .one(transitionEnd, callback)
; ;
} }
else { else {
@ -137,7 +137,7 @@ $.fn.shape = function(parameters) {
queue: function(method) { queue: function(method) {
module.debug('Queueing animation of', method); module.debug('Queueing animation of', method);
$sides $sides
.one(endTransition, function() { .one(transitionEnd, function() {
module.debug('Executing queued animation'); module.debug('Executing queued animation');
$module.shape(method); $module.shape(method);
}) })
@ -614,7 +614,7 @@ $.fn.shape = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

19
node/src/files/javascript/dimmer.js

@ -7,6 +7,7 @@ semantic.dimmer.ready = function() {
var var
$examples = $('.example'), $examples = $('.example'),
$showButton = $examples.find('.show.button'), $showButton = $examples.find('.show.button'),
$pageButton = $examples.find('.page.button'),
$hideButton = $examples.find('.hide.button'), $hideButton = $examples.find('.hide.button'),
// alias // alias
handler handler
@ -15,20 +16,30 @@ semantic.dimmer.ready = function() {
// event handlers // event handlers
handler = { handler = {
show: function() { show: function() {
console.log($(this).closest('.example'));
$(this) $(this)
.closest('.example') .closest('.example')
.dimmer('show') .find('.segment')
.dimmer('show')
; ;
}, },
hide: function() { hide: function() {
$(this) $(this)
.closest('.example') .closest('.example')
.dimmer('hide') .find('.segment')
.dimmer('hide')
;
},
page: function() {
$(this)
.prev('.dimmer')
.dimmer('show')
; ;
} }
}; };
$pageButton
.on('click', handler.page)
;
$showButton $showButton
.on('click', handler.show) .on('click', handler.show)
; ;

2
node/src/files/javascript/semantic.js

@ -112,7 +112,7 @@ semantic.ready = function() {
var var
$example = $(this).closest('.example'), $example = $(this).closest('.example'),
$header = $example.children('.ui.header:first-of-type, p:first-of-type'), $header = $example.children('.ui.header:first-of-type, p:first-of-type'),
$demo = $example.children().not($header).not('i.code:first-child, .annotated, br, .ignore'), $demo = $example.children().not($header).not('i.code:first-child, .annotated, br, .ignore, .ignored'),
$annotated = $example.find('.annotated'), $annotated = $example.find('.annotated'),
$code = $annotated.find('.code'), $code = $annotated.find('.code'),
whiteSpace = new RegExp('\\n\\s{4}', 'g'), whiteSpace = new RegExp('\\n\\s{4}', 'g'),

3
node/src/files/stylesheets/semantic.css

@ -758,6 +758,9 @@ a:hover {
/* examples */ /* examples */
#example .no.example i.code {
display: none;
}
#example h2 + .example, #example h2 + .example,
#example h3 + .example, #example h3 + .example,

3
node/src/layouts/default.html.eco

@ -15,7 +15,7 @@
<!-- Standard Meta --> <!-- Standard Meta -->
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!-- Site Properities --> <!-- Site Properities -->
<%- @getBlock('meta').toHTML() %> <%- @getBlock('meta').toHTML() %>
@ -58,7 +58,6 @@
<%- @getBlock('scripts').toHTML() %> <%- @getBlock('scripts').toHTML() %>
<script src="/javascript/library/jquery.js"></script> <script src="/javascript/library/jquery.js"></script>
<script src="/javascript/library/jquery-ui.js"></script>
<script src="/javascript/library/easing.js"></script> <script src="/javascript/library/easing.js"></script>
<script src="/javascript/library/ace/ace.js"></script> <script src="/javascript/library/ace/ace.js"></script>
<script src="/javascript/library/sidr.js"></script> <script src="/javascript/library/sidr.js"></script>

26
spec/modules/module.commented.js

@ -27,7 +27,9 @@ $.fn.example = function(parameters) {
$allModules = $(this), $allModules = $(this),
// Extend settings to merge run-time settings with defaults // Extend settings to merge run-time settings with defaults
settings = $.extend(true, {}, $.fn.example.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.example.settings, parameters)
: $.fn.example.settings,
// Define namespaces for storing module instance and binding events // Define namespaces for storing module instance and binding events
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
@ -80,10 +82,15 @@ $.fn.example = function(parameters) {
// #### Initialize // #### Initialize
// Initialize attaches events and preserves each instance in html metadata // Initialize attaches events and preserves each instance in html metadata
initialize: function() { initialize: function() {
module.verbose('Initializing module for', element); module.debug('Initializing module for', element);
$module $module
.on('click' + eventNamespace, module.exampleBehavior) .on('click' + eventNamespace, module.exampleBehavior)
; ;
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
// The instance is just a copy of the module definition, we store it in metadata so we can use it outside of scope, but also define it for immediate use // The instance is just a copy of the module definition, we store it in metadata so we can use it outside of scope, but also define it for immediate use
instance = module; instance = module;
$module $module
@ -291,18 +298,17 @@ $.fn.example = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
@ -330,6 +336,9 @@ $.fn.example = function(parameters) {
}) })
; ;
// lets performance tracking know this is the end of a single trace through module
time = false;
// If you called invoke, you may have a returned value which shoudl be returned, otherwise allow the call to chain // If you called invoke, you may have a returned value which shoudl be returned, otherwise allow the call to chain
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
@ -360,7 +369,8 @@ $.fn.example.settings = {
}, },
// Error messages returned by the module // Error messages returned by the module
error: { error: {
noText : 'The text you tried to display has not been defined.', method : 'The method you called is not defined.' noText : 'The text you tried to display has not been defined.',
method : 'The method you called is not defined.'
}, },
// Class names which your module refers to // Class names which your module refers to
className : { className : {

11
spec/modules/module.js

@ -204,18 +204,17 @@ $.fn.example = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
@ -238,6 +237,8 @@ $.fn.example = function(parameters) {
}) })
; ;
time = false;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this

26
src/elements/progress.less

@ -83,6 +83,7 @@
.ui.successful.progress .bar::after { .ui.successful.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/*-------------- /*--------------
@ -96,6 +97,7 @@
.ui.failed.progress .bar::after { .ui.failed.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
/*-------------- /*--------------
@ -120,12 +122,12 @@
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
-webkit-animation: animate-emphasis 2s ease-out infinite; -webkit-animation: progress-active 2s ease-out infinite;
-moz-animation: animate-emphasis 2s ease-out infinite; -moz-animation: progress-active 2s ease-out infinite;
animation: animate-emphasis 2s ease-out infinite; animation: progress-active 2s ease-out infinite;
} }
@-webkit-keyframes animate-emphasis { @-webkit-keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -138,7 +140,7 @@
width: 95%; width: 95%;
} }
} }
@-moz-keyframes animate-emphasis { @-moz-keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -151,7 +153,7 @@
width: 100%; width: 100%;
} }
} }
@keyframes animate-emphasis { @keyframes progress-active {
0% { 0% {
opacity: 0; opacity: 0;
width: 0; width: 0;
@ -176,6 +178,7 @@
.ui.disabled.progress .bar::after { .ui.disabled.progress .bar::after {
-webkit-animation: none !important; -webkit-animation: none !important;
-moz-animation: none !important; -moz-animation: none !important;
animation: none !important;
} }
@ -266,11 +269,12 @@
} }
.ui.progress.active.striped .bar { .ui.progress.active.striped .bar {
-webkit-animation: animate-striped 3s linear infinite; -webkit-animation: progress-striped 3s linear infinite;
-moz-animation: animate-striped 3s linear infinite; -moz-animation: progress-striped 3s linear infinite;
animation: progress-striped 3s linear infinite;
} }
@-webkit-keyframes animate-striped { @-webkit-keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }
@ -278,7 +282,7 @@
background-position: 60px 0; background-position: 60px 0;
} }
} }
@-moz-keyframes animate-striped { @-moz-keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }
@ -286,7 +290,7 @@
background-position: 60px 0; background-position: 60px 0;
} }
} }
@keyframes animate-striped { @keyframes progress-striped {
0% { 0% {
background-position: 0px 0; background-position: 0px 0;
} }

9
src/modules/behavior/form.js

@ -443,18 +443,17 @@ $.fn.form = function(fields, parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
src/modules/carousel.js

@ -264,7 +264,7 @@ $.fn.carousel = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

2
src/modules/checkbox.js

@ -253,7 +253,7 @@ $.fn.checkbox = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

249
src/modules/dimmer.js

@ -12,53 +12,84 @@
$.fn.dimmer = function(parameters) { $.fn.dimmer = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
$document = $(document),
settings = $.extend(true, {}, $.fn.dimmer.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dimmer.settings, parameters)
: $.fn.dimmer.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
selector = $allModules.selector || '',
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
namespace = settings.namespace,
className = settings.className,
errors = settings.errors,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse,
allModules selector = settings.selector,
namespace = settings.namespace,
className = settings.className,
error = settings.error,
invokedResponse
; ;
$allModules $allModules
.each(function() { .each(function() {
var var
$module = $(this), $module = $(this),
$dimmer = $module.children(selector.dimmer), $dimmer = $module.children(selector.dimmer).first(),
animationEnd = 'animationend msAnimationEnd oAnimationEnd webkitAnimationEnd',
element = this, element = this,
instance = $module.data('module-' + namespace), instance = $dimmer.data('module-' + namespace),
module module
; ;
module = { module = {
initialize: function() { initialize: function() {
if( $module.is(settings.selector.dimmer) ) { if( module.is.dimmer() ) {
$dimmer = $module; $dimmer = $module;
$module = $dimmer.parent();
module.debug('Module initialized as dimmer', $dimmer);
}
else if( module.is.pageDimmer() ) {
$dimmer = $module;
$module = $('body');
module.debug('Initializing page dimmer', $dimmer);
} }
else { else {
if($dimmer.size() === 0) { if( module.has.dimmer() ) {
module.create(); $dimmer = $module.find(selector.dimmer);
module.debug('Module initialized with found dimmer', $dimmer);
} }
$dimmer = $module.find(selector.dimmer); else {
$dimmer = settings.template.dimmer();
$dimmer
.appendTo($module)
;
module.debug('Module initialized with created dimmer', $dimmer);
}
}
if(settings.closable) {
$dimmer
.on('click', module.event.click)
;
} }
module.debug('Module initialized with dimmer', $dimmer); module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$dimmer
.data('module-' + namespace, instance)
;
}, },
destroy: function() { destroy: function() {
@ -68,28 +99,63 @@ $.fn.dimmer = function(parameters) {
; ;
}, },
event: {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
if( event.target == element ) {
module.hide();
}
}
},
animate: { animate: {
show: function() { show: function() {
module.set.dimmed();
if(settings.animation.show == 'css') { if(settings.animation.show == 'css') {
module.verbose('Showing dimmer animation with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function() {
$dimmer.removeClass(className.show);
module.set.active();
})
.addClass(className.show)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.show == 'fade') {
module.verbose('Showing dimmer animation with javascript');
$dimmer $dimmer
.fadeTo(settings.duration, settings.opacity) .stop()
.css({
opacity : 0,
width : '100%',
height : '100%'
})
.fadeTo(settings.duration, 1, module.set.active)
; ;
} }
}, },
hide: function() { hide: function() {
if(settings.animation.show == 'css') { module.remove.dimmed();
if(settings.animation.hide == 'css') {
module.verbose('Hiding dimmer with css');
$dimmer $dimmer
.addClass(className.active) .one(animationEnd, function(){
module.remove.active();
$dimmer.removeClass(className.hide);
})
.addClass(className.hide)
; ;
} }
else if(settings.animation.show == 'fade') { else if(settings.animation.hide == 'fade') {
module.verbose('Hiding dimmer with javascript');
$dimmer $dimmer
.fadeOut(settings.duration) .stop()
.fadeOut(settings.duration, function() {
$dimmer.removeAttr('style');
module.remove.active();
})
; ;
} }
else if( $.isFunction(settings.animation.hide) ) { else if( $.isFunction(settings.animation.hide) ) {
@ -98,18 +164,34 @@ $.fn.dimmer = function(parameters) {
} }
}, },
has: {
dimmer: function() {
return ( $module.children(selector.dimmer).size() > 0 );
}
},
is: { is: {
animating: function() {
return ( $dimmer.hasClass(className.show) || $dimmer.hasClass(className.hide) || $dimmer.is(':animated') );
},
dimmer: function() {
return $module.is(selector.dimmer);
},
dimmable: function() {
return $module.is(selector.dimmable);
},
enabled: function() { enabled: function() {
return !$module.hasClass(className.disabled); return !$module.hasClass(className.disabled);
}, },
disabled: function() { disabled: function() {
return $module.hasClass(className.disabled); return $module.hasClass(className.disabled);
}, },
visible: function() { active: function() {
return $dimmer.is(':visible'); return $dimmer.hasClass(className.active);
}, },
hidden: function() { pageDimmer: function() {
return $dimmer.is(':not(:visible)'); return $dimmer.is(selector.pageDimmer);
} }
}, },
@ -119,21 +201,51 @@ $.fn.dimmer = function(parameters) {
} }
}, },
set: {
active: function() {
$dimmer.addClass(className.active);
},
dimmed: function() {
$module.addClass(className.dimmed);
},
disabled: function() {
$dimmer.addClass(className.disabled);
}
},
remove: {
active: function() {
$dimmer.removeClass(className.active);
},
dimmed: function() {
$module.removeClass(className.dimmed);
},
disabled: function() {
$dimmer.removeClass(className.disabled);
}
},
show: function() { show: function() {
module.debug('Showing dimmer', $dimmer); module.debug('Showing dimmer', $dimmer);
if( !module.is.visible() && module.is.enabled() ) { if( !module.is.active() && module.is.enabled() ) {
module.animate.show(); module.animate.show();
$.proxy(settings.onShow, $module.get())(); $.proxy(settings.onShow, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is already shown or disabled');
} }
}, },
hide: function() { hide: function() {
if( !module.is.hidden() ) { if( module.is.active() ) {
module.debug('Hiding dimmer', $dimmer); module.debug('Hiding dimmer', $dimmer);
module.animate.hide(); module.animate.hide();
$.proxy(settings.onHide, $module.get())(); $.proxy(settings.onHide, element)();
$.proxy(settings.onChange, $module.get())(); $.proxy(settings.onChange, element)();
}
else {
module.debug('Dimmer is not visible');
} }
}, },
@ -146,7 +258,7 @@ $.fn.dimmer = function(parameters) {
module.hide(); module.hide();
} }
}, },
setting: function(name, value) { setting: function(name, value) {
if(value !== undefined) { if(value !== undefined) {
if( $.isPlainObject(name) ) { if( $.isPlainObject(name) ) {
@ -211,41 +323,39 @@ $.fn.dimmer = function(parameters) {
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -261,18 +371,17 @@ $.fn.dimmer = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(errors.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
@ -293,6 +402,7 @@ $.fn.dimmer = function(parameters) {
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -301,37 +411,48 @@ $.fn.dimmer = function(parameters) {
$.fn.dimmer.settings = { $.fn.dimmer.settings = {
moduleName : 'Dimmer Module', moduleName : 'Dimmer',
namespace : 'dimmer', namespace : 'dimmer',
verbose : true, verbose : true,
debug : true, debug : true,
performance : false, performance : true,
animation : { animation : {
show: 'css', show: 'fade',
hide: 'css' hide: 'fade'
}, },
closable : true,
duration : 500, duration : 500,
opacity : 0.85,
onChange : function(){}, onChange : function(){},
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
errors : { error : {
method : 'The method you called is not defined.' method : 'The method you called is not defined.'
}, },
selector: { selector: {
dimmer : '.ui.dimmer' dimmable : '.ui.dimmable',
dimmer : '.ui.dimmer',
pageDimmer : '.ui.page.dimmer'
},
template: {
dimmer: function() {
return $('<div />').attr('class', 'ui dimmer');
}
}, },
className : { className : {
dimmed : 'dimmed', active : 'active',
active : 'active', dimmed : 'dimmed',
disabled : 'disabled' disabled : 'disabled',
animating : 'animating',
hide : 'hide',
show : 'show'
} }
}; };

152
src/modules/dimmer.less

@ -15,19 +15,25 @@
Dimmer Dimmer
*******************************/ *******************************/
.ui.dimmable {
position: relative;
}
.ui.dimmer { .ui.dimmer {
display: none;
position: absolute; position: absolute;
top: 0em; top: 0em !important;
left: 0em; left: 0em !important;
width: 100%;
height: 100%;
background-color: #000000; background-color: rgba(0, 0, 0, 0.85);
opacity: 0; opacity: 0;
line-height: 1; line-height: 1;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
-ms-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-transition: -webkit-transition:
background-color 0.5s ease background-color 0.5s ease
; ;
@ -46,22 +52,44 @@
z-index: 100; z-index: 100;
} }
body > .ui.dimmer { body.dimmable > .ui.dimmer {
position: fixed; position: fixed;
} }
/* Loose Coupling */
.ui.segment > .ui.dimmer {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.ui.horizontal.segment > .ui.dimmer,
.ui.vertical.segment > .ui.dimmer {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/******************************* /*******************************
States States
*******************************/ *******************************/
.ui.dimmable.dimmed :not(.dimmer){
-webkit-filter: ~"blur(10px) grayscale(0.7);";
-moz-filter: ~"blur(10px) grayscale(0.7);";
filter: ~"blur(10px) grayscale(0.7);";
}
.ui.dimmable.dimmed > .ui.dimmer,
.ui.dimmer.active { .ui.dimmer.active {
opacity: 0.85; width: 100%;
display: block; height: 100%;
opacity: 1;
} }
.ui.disabled.dimmer { .ui.disabled.dimmer {
display: none !important; width: 0em !important;
height: 0em !important;
} }
@ -69,10 +97,10 @@ body > .ui.dimmer {
Variations Variations
*******************************/ *******************************/
/*-------------- /*--------------
Page Page
---------------*/ ---------------*/
.ui.page.dimmer { .ui.page.dimmer {
position: fixed; position: fixed;
} }
@ -82,7 +110,7 @@ body > .ui.dimmer {
---------------*/ ---------------*/
.ui.inverted.dimmer { .ui.inverted.dimmer {
background-color: #FFFFFF; background-color: rgba(255, 255, 255, 0.85);
} }
/*-------------- /*--------------
@ -98,7 +126,7 @@ body > .ui.dimmer {
width: 0px; width: 0px;
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
.dimmed > .ui.simple.dimmer { .ui.dimmable.dimmed > .ui.simple.dimmer {
overflow: visible; overflow: visible;
opacity: 1; opacity: 1;
width: 100%; width: 100%;
@ -109,7 +137,99 @@ body > .ui.dimmer {
.ui.simple.inverted.dimmer { .ui.simple.inverted.dimmer {
background-color: rgba(255, 255, 255, 0); background-color: rgba(255, 255, 255, 0);
} }
.dimmed > .ui.simple.inverted.dimmer { .ui.dimmable.dimmed > .ui.simple.inverted.dimmer {
background-color: rgba(255, 255, 255, 0.85) background-color: rgba(255, 255, 255, 0.85)
} }
/*******************************
Animations
*******************************/
.ui.dimmer.show {
width: 100%;
height: 100%;
-webkit-animation: dimmer-show 0.5s;
-moz-animation: dimmer-show 0.5s;
animation: dimmer-show 0.5s;
}
@-webkit-keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-moz-keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes dimmer-show {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.ui.dimmer.hide {
-webkit-animation: dimmer-hide 0.5s;
-moz-animation: dimmer-hide 0.5s;
animation: dimmer-hide 0.5s;
}
@-webkit-keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}
@-moz-keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}
@keyframes dimmer-hide {
0% {
opacity: 1;
}
99% {
width: 100%;
height: 100%;
opacity: 0;
}
100% {
opacity: 0;
height: 0em;
width: 0em;
}
}

6
src/modules/dropdown.js

@ -14,7 +14,9 @@ $.fn.dropdown = function(parameters) {
$allModules = $(this), $allModules = $(this),
$document = $(document), $document = $(document),
settings = $.extend(true, {}, $.fn.dropdown.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.dropdown.settings, parameters)
: $.fn.dropdown.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
@ -506,7 +508,7 @@ $.fn.dropdown = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

59
src/modules/modal.less

@ -1,62 +1,3 @@
/*******************************
Dimmer Styles
*******************************/
/* the one true page dimmer */
#dimmer {
position: absolute;
visibility: hidden;
top: 0px;
left: 0px;
z-index: 999;
margin: 0px;
width: 100%;
height: 100%;
padding: 0px;
}
#dimmer .content {
position: fixed;
top: 0px;
left: 0px;
margin: 0px;
width: 100%;
height: 100%;
padding: 0px;
visibility: hidden;
background-color: #000000;
opacity: 0.0;
}
/* a generic dimmer */
.dimmer {
display: none;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
opacity: 0;
background-color: #000000;
z-index: 999;
}
.white.dimmer {
background-color: #FFFFFF;
}
.loading .dimmer {
display: block;
opacity: 0.8;
-webkit-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
-ms-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
/******************************* /*******************************
Modal Styles Modal Styles
*******************************/ *******************************/

108
src/modules/popup.js

@ -1,7 +1,10 @@
/* ****************************** /* ******************************
Tooltip / Popup Semantic Module: Popup
Author: Jack Lukic Author: Jack Lukic
Notes: First Commit Sep 07, 2012 Notes: May 30, 2013
Simple plug-in to display popups
****************************** */ ****************************** */
;(function ($, window, document, undefined) { ;(function ($, window, document, undefined) {
@ -9,19 +12,29 @@
$.fn.popup = function(parameters) { $.fn.popup = function(parameters) {
var var
$allModules = $(this), $allModules = $(this),
settings = $.extend(true, {}, $.fn.popup.settings, parameters), settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.popup.settings, parameters)
: $.fn.popup.settings,
eventNamespace = '.' + settings.namespace, eventNamespace = '.' + settings.namespace,
moduleNamespace = 'module-' + settings.namespace, moduleNamespace = 'module-' + settings.namespace,
moduleSelector = $allModules.selector || '', moduleSelector = $allModules.selector || '',
moduleCount = $allModules.size(),
time = new Date().getTime(), time = new Date().getTime(),
performance = [], performance = [],
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
query = arguments[0], query = arguments[0],
methodInvoked = (typeof query == 'string'), methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1), queryArguments = [].slice.call(arguments, 1),
invokedResponse invokedResponse
; ;
$allModules $allModules
@ -31,19 +44,13 @@ $.fn.popup = function(parameters) {
$window = $(window), $window = $(window),
$offsetParent = $module.offsetParent(), $offsetParent = $module.offsetParent(),
$popup = (settings.inline) $popup = (settings.inline)
? $module.next(settings.selector.popup) ? $module.next(selector.popup)
: $window.children(settings.selector.popup).last(), : $window.children(selector.popup).last(),
searchDepth = 0, searchDepth = 0,
element = this, element = this,
instance = $module.data('module-' + settings.namespace), instance = $module.data('module-' + settings.namespace),
selector = settings.selector,
className = settings.className,
error = settings.error,
metadata = settings.metadata,
namespace = settings.namespace,
module module
; ;
@ -51,6 +58,7 @@ $.fn.popup = function(parameters) {
// binds events // binds events
initialize: function() { initialize: function() {
module.debug('Initializing module', $module);
if(settings.on == 'hover') { if(settings.on == 'hover') {
$module $module
.on('mouseenter.' + namespace, module.event.mouseenter) .on('mouseenter.' + namespace, module.event.mouseenter)
@ -65,8 +73,14 @@ $.fn.popup = function(parameters) {
$window $window
.on('resize.' + namespace, module.event.resize) .on('resize.' + namespace, module.event.resize)
; ;
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module');
instance = module;
$module $module
.data('module-' + namespace, module) .data('module-' + namespace, instance)
; ;
}, },
@ -508,44 +522,42 @@ $.fn.popup = function(parameters) {
previousTime = time || currentTime, previousTime = time || currentTime,
executionTime = currentTime - previousTime; executionTime = currentTime - previousTime;
time = currentTime; time = currentTime;
performance.push({ performance.push({
'Element' : element, 'Element' : element,
'Name' : message[0], 'Name' : message[0],
'Arguments' : message[1] || 'None', 'Arguments' : message[1] || '',
'Execution Time' : executionTime 'Execution Time' : executionTime
}); });
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
} }
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 100);
}, },
display: function() { display: function() {
var var
title = settings.moduleName, title = settings.moduleName + ':',
caption = settings.moduleName + ': ' + moduleSelector + '(' + $allModules.size() + ' elements)', totalTime = 0
totalExecutionTime = 0
; ;
time = false;
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) { if(moduleSelector) {
title += ' Performance (' + moduleSelector + ')'; title += ' \'' + moduleSelector + '\'';
} }
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) { if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title); console.groupCollapsed(title);
if(console.table) { if(console.table) {
$.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
});
console.table(performance); console.table(performance);
} }
else { else {
$.each(performance, function(index, data) { $.each(performance, function(index, data) {
totalExecutionTime += data['Execution Time'];
console.log(data['Name'] + ': ' + data['Execution Time']+'ms'); console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
}); });
} }
console.log('Total Execution Time:', totalExecutionTime +'ms');
console.groupEnd(); console.groupEnd();
performance = [];
time = false;
} }
performance = [];
} }
}, },
invoke: function(query, passedArguments, context) { invoke: function(query, passedArguments, context) {
@ -561,24 +573,23 @@ $.fn.popup = function(parameters) {
$.each(query, function(depth, value) { $.each(query, function(depth, value) {
if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) { if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
instance = instance[value]; instance = instance[value];
return true;
} }
else if( instance[value] !== undefined ) { else if( instance[value] !== undefined ) {
found = instance[value]; found = instance[value];
return true;
} }
module.error(error.method); else {
return false; module.error(error.method);
}
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;
} }
}; };
if(methodInvoked) { if(methodInvoked) {
if(instance === undefined) { if(instance === undefined) {
module.initialize(); module.initialize();
@ -586,13 +597,14 @@ $.fn.popup = function(parameters) {
invokedResponse = module.invoke(query); invokedResponse = module.invoke(query);
} }
else { else {
if(instance !== undefined) { if(instance === undefined) {
module.destroy(); module.destroy();
} }
module.initialize(); module.initialize();
} }
}) })
; ;
return (invokedResponse) return (invokedResponse)
? invokedResponse ? invokedResponse
: this : this
@ -600,31 +612,31 @@ $.fn.popup = function(parameters) {
}; };
$.fn.popup.settings = { $.fn.popup.settings = {
moduleName : 'Pop-up Module', moduleName : 'Popup',
debug : true, debug : true,
verbose : true, verbose : true,
performance : true, performance : true,
namespace : 'popup', namespace : 'popup',
onShow : function(){}, onShow : function(){},
onHide : function(){}, onHide : function(){},
content : false, content : false,
html : false, html : false,
title : false, title : false,
on : 'hover', on : 'hover',
clicktoClose : true, clicktoClose : true,
position : 'top center', position : 'top center',
delay : 0, delay : 0,
inline : true, inline : true,
duration : 250, duration : 250,
easing : 'easeOutQuint', easing : 'easeOutQuint',
animation : 'pop', animation : 'pop',
distanceAway : 2, distanceAway : 2,
arrowOffset : 0, arrowOffset : 0,
maxSearchDepth : 10, maxSearchDepth : 10,

8
src/modules/shape.js

@ -40,7 +40,7 @@ $.fn.shape = function(parameters) {
// private variables // private variables
$activeSide, $activeSide,
$nextSide, $nextSide,
endTransition = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd', transitionEnd = 'transitionend msTransitionEnd oTransitionEnd webkitTransitionEnd',
// standard module // standard module
element = this, element = this,
@ -111,7 +111,7 @@ $.fn.shape = function(parameters) {
; ;
$sides $sides
.css(propertyObject) .css(propertyObject)
.one(endTransition, callback) .one(transitionEnd, callback)
; ;
} }
else { else {
@ -137,7 +137,7 @@ $.fn.shape = function(parameters) {
queue: function(method) { queue: function(method) {
module.debug('Queueing animation of', method); module.debug('Queueing animation of', method);
$sides $sides
.one(endTransition, function() { .one(transitionEnd, function() {
module.debug('Executing queued animation'); module.debug('Executing queued animation');
$module.shape(method); $module.shape(method);
}) })
@ -614,7 +614,7 @@ $.fn.shape = function(parameters) {
}); });
} }
if ( $.isFunction( found ) ) { if ( $.isFunction( found ) ) {
module.verbose('Executing invoked function', found); instance.verbose('Executing invoked function', found);
return found.apply(context, passedArguments); return found.apply(context, passedArguments);
} }
return found || false; return found || false;

Loading…
Cancel
Save