diff --git a/build/less/modules/dropdown.js b/build/less/modules/dropdown.js index 7285e4993..34241f703 100644 --- a/build/less/modules/dropdown.js +++ b/build/less/modules/dropdown.js @@ -349,7 +349,12 @@ $.fn.dropdown = function(parameters) { callback(); } else if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' in', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' in', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'slide down') { $currentMenu @@ -392,7 +397,12 @@ $.fn.dropdown = function(parameters) { if(dropdown.is.visible($currentMenu) ) { dropdown.verbose('Doing menu hide animation', $currentMenu); if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' out', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' out', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'none') { callback(); diff --git a/build/less/modules/transition.js b/build/less/modules/transition.js index 19e26c107..40b5d0524 100644 --- a/build/less/modules/transition.js +++ b/build/less/modules/transition.js @@ -101,7 +101,9 @@ $.fn.transition = function() { settings = overrideSettings || settings; module.debug('Preparing animation', settings.animation); if(module.is.animating()) { - module.queue(settings.animation); + if(settings.queue) { + module.queue(settings.animation); + } return false; } module.save.conditions(); @@ -621,6 +623,9 @@ $.fn.transition.settings = { animation : 'fade', duration : '700ms', + // queue up animations + queue : true, + className : { transition : 'ui transition', animating : 'animating', diff --git a/build/minified/modules/dropdown.js b/build/minified/modules/dropdown.js index 7285e4993..34241f703 100644 --- a/build/minified/modules/dropdown.js +++ b/build/minified/modules/dropdown.js @@ -349,7 +349,12 @@ $.fn.dropdown = function(parameters) { callback(); } else if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' in', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' in', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'slide down') { $currentMenu @@ -392,7 +397,12 @@ $.fn.dropdown = function(parameters) { if(dropdown.is.visible($currentMenu) ) { dropdown.verbose('Doing menu hide animation', $currentMenu); if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' out', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' out', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'none') { callback(); diff --git a/build/minified/modules/dropdown.min.js b/build/minified/modules/dropdown.min.js index 0df4779a2..eede3f1d7 100644 --- a/build/minified/modules/dropdown.min.js +++ b/build/minified/modules/dropdown.min.js @@ -1 +1 @@ -!function(a,b,c,d){a.fn.dropdown=function(b){var e,f=a(this),g=a(c),h=a.isPlainObject(b)?a.extend(!0,{},a.fn.dropdown.settings,b):a.fn.dropdown.settings,i=h.className,j=h.metadata,k=h.namespace,l=h.selector,m=h.error,n="."+k,o="module-"+k,p=f.selector||"",q=(new Date).getTime(),r=[],s=arguments[0],t="string"==typeof s,u=[].slice.call(arguments,1);return f.each(function(){var b,k=a(this),v=k.find(l.item),w=k.find(l.text),x=k.find(l.input),y=k.children(l.menu),z="ontouchstart"in c.documentElement,A=this,B=k.data(o);b={initialize:function(){b.debug("Initializing dropdown",h),z?k.on("touchstart"+n,b.event.test.toggle):"click"==h.on?k.on("click"+n,b.event.test.toggle):"hover"==h.on?k.on("mouseenter"+n,b.delay.show).on("mouseleave"+n,b.delay.hide):k.on(h.on+n,b.toggle),"form"==h.action&&b.set.selected(),v.on("mouseenter"+n,b.event.item.mouseenter).on("mouseleave"+n,b.event.item.mouseleave).on(b.get.selectEvent()+n,b.event.item.click),b.instantiate()},instantiate:function(){b.verbose("Storing instance of dropdown",b),k.data(o,b)},destroy:function(){b.verbose("Destroying previous dropdown for",k),v.off(n),k.off(n).removeData(o)},event:{stopPropagation:function(a){a.stopPropagation()},test:{toggle:function(a){b.determine.intent(a,b.toggle),a.stopImmediatePropagation()},hide:function(a){b.determine.intent(a,b.hide),a.stopPropagation()}},item:{mouseenter:function(){var c=a(this).find(l.menu),d=a(this).siblings(l.item).children(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.animate.hide(!1,d),b.verbose("Showing sub-menu",c),b.animate.show(!1,c)},2*h.delay.show))},mouseleave:function(){var c=a(this).find(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.verbose("Hiding sub-menu",c),b.animate.hide(!1,c)},h.delay.hide))},click:function(c){var d=a(this),e=d.data(j.text)||d.text(),f=d.data(j.value)||e;0===d.find(l.menu).size()&&(b.verbose("Adding active state to selected item"),v.removeClass(i.active),d.addClass(i.active),b.determine.selectAction(e,f),a.proxy(h.onChange,A)(f,e),c.stopPropagation())}},resetStyle:function(){a(this).removeAttr("style")}},determine:{selectAction:function(c,d){b.verbose("Determining action",h.action),a.isFunction(b[h.action])?(b.verbose("Triggering preset action",h.action),b[h.action](c,d)):a.isFunction(h.action)?(b.verbose("Triggering user action",h.action),h.action(c,d)):b.error(m.action)},intent:function(c,d){b.debug("Determining whether event occurred in dropdown",c.target),d=d||function(){},0===a(c.target).closest(y).size()?(b.verbose("Triggering event",d),d()):b.verbose("Event occurred in dropdown, canceling callback")}},bind:{intent:function(){b.verbose("Binding hide intent event to document"),g.on(b.get.selectEvent(),b.event.test.hide)}},unbind:{intent:function(){b.verbose("Removing hide intent event from document"),g.off(b.get.selectEvent())}},nothing:function(){},changeText:function(a){b.set.text(a),b.hide()},updateForm:function(a,c){b.set.text(a),b.set.value(c),b.hide()},get:{selectEvent:function(){return z?"touchstart":"click"},text:function(){return w.text()},value:function(){return x.val()},item:function(b){var c;return b=b||x.val(),v.each(function(){a(this).data(j.value)==b&&(c=a(this))}),c||!1}},set:{text:function(a){b.debug("Changing text",a,w),w.removeClass(i.placeholder),w.text(a)},value:function(a){b.debug("Adding selected value to hidden input",a,x),x.val(a)},active:function(){k.addClass(i.active)},visible:function(){k.addClass(i.visible)},selected:function(a){var c,d=b.get.item(a);d&&(b.debug("Setting selected menu item to",d),c=d.data(j.text)||d.text(),v.removeClass(i.active),d.addClass(i.active),b.set.text(c))}},remove:{active:function(){k.removeClass(i.active)},visible:function(){k.removeClass(i.visible)}},is:{visible:function(a){return a?a.is(":animated, :visible"):y.is(":animated, :visible")},hidden:function(a){return a?a.is(":not(:animated, :visible)"):y.is(":not(:animated, :visible)")}},can:{click:function(){return z||"click"==h.on},show:function(){return!k.hasClass(i.disabled)}},animate:{show:function(c,e){var f=e||y;c=c||function(){},b.is.hidden(f)&&(b.verbose("Doing menu show animation",f),"none"==h.transition?c():a.fn.transition!==d?f.transition(h.transition+" in",h.duration,c):"slide down"==h.transition?f.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},h.duration,"easeOutQuad",b.event.resetStyle).end().slideDown(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.hide().clearQueue().fadeIn(h.duration,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))},hide:function(c,e){var f=e||y;c=c||function(){},b.is.visible(f)&&(b.verbose("Doing menu hide animation",f),a.fn.transition!==d?f.transition(h.transition+" out",h.duration,c):"none"==h.transition?c():"slide down"==h.transition?f.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",b.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.show().clearQueue().fadeOut(150,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))}},show:function(){b.debug("Checking if dropdown can show"),b.is.hidden()&&(b.hideOthers(),b.set.active(),b.animate.show(b.set.visible),b.can.click()&&b.bind.intent(),a.proxy(h.onShow,A)())},hide:function(){b.is.visible()&&(b.debug("Hiding dropdown"),b.can.click()&&b.unbind.intent(),b.remove.active(),b.animate.hide(b.remove.visible),a.proxy(h.onHide,A)())},delay:{show:function(){b.verbose("Delaying show event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.show,h.delay.show)},hide:function(){b.verbose("Delaying hide event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.hide,h.delay.hide)}},hideOthers:function(){b.verbose("Finding other dropdowns to hide"),f.not(k).has(l.menu+":visible").dropdown("hide")},toggle:function(){b.verbose("Toggling menu visibility"),b.is.hidden()?b.show():b.hide()},setting:function(b,c){return c===d?h[b]:(a.isPlainObject(b)?a.extend(!0,h,b):h[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){h.debug&&(h.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,h.name+":"),b.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),b.verbose.apply(console,arguments)))},error:function(){b.error=Function.prototype.bind.call(console.error,console,h.name+":"),b.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;h.performance&&(c=(new Date).getTime(),e=q||c,d=c-e,q=c,r.push({Element:A,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var c=h.name+":",e=0;q=!1,clearTimeout(b.performance.timer),a.each(r,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",p&&(c+=" '"+p+"'"),c+=" ("+f.size()+")",(console.group!==d||console.table!==d)&&r.length>0&&(console.groupCollapsed(c),console.table?console.table(r):a.each(r,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(c,e,f){var g,h;return e=e||u,f=A||f,"string"==typeof c&&B!==d&&(c=c.split(/[\. ]/),g=c.length-1,a.each(c,function(c,e){a.isPlainObject(B[e])&&c!=g?B=B[e]:B[e]!==d?h=B[e]:b.error(m.method)})),a.isFunction(h)?h.apply(f,e):h||!1}},t?(B===d&&b.initialize(),e=b.invoke(s)):(B!==d&&b.destroy(),b.initialize())}),e?e:this},a.fn.dropdown.settings={name:"Dropdown",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",action:"hide",delay:{show:200,hide:300},transition:"slide down",duration:250,onChange:function(){},onShow:function(){},onHide:function(){},error:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined.",transition:"The requested transition was not found"},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",placeholder:"default",disabled:"disabled",visible:"visible"}}}(jQuery,window,document); \ No newline at end of file +!function(a,b,c,d){a.fn.dropdown=function(b){var e,f=a(this),g=a(c),h=a.isPlainObject(b)?a.extend(!0,{},a.fn.dropdown.settings,b):a.fn.dropdown.settings,i=h.className,j=h.metadata,k=h.namespace,l=h.selector,m=h.error,n="."+k,o="module-"+k,p=f.selector||"",q=(new Date).getTime(),r=[],s=arguments[0],t="string"==typeof s,u=[].slice.call(arguments,1);return f.each(function(){var b,k=a(this),v=k.find(l.item),w=k.find(l.text),x=k.find(l.input),y=k.children(l.menu),z="ontouchstart"in c.documentElement,A=this,B=k.data(o);b={initialize:function(){b.debug("Initializing dropdown",h),z?k.on("touchstart"+n,b.event.test.toggle):"click"==h.on?k.on("click"+n,b.event.test.toggle):"hover"==h.on?k.on("mouseenter"+n,b.delay.show).on("mouseleave"+n,b.delay.hide):k.on(h.on+n,b.toggle),"form"==h.action&&b.set.selected(),v.on("mouseenter"+n,b.event.item.mouseenter).on("mouseleave"+n,b.event.item.mouseleave).on(b.get.selectEvent()+n,b.event.item.click),b.instantiate()},instantiate:function(){b.verbose("Storing instance of dropdown",b),k.data(o,b)},destroy:function(){b.verbose("Destroying previous dropdown for",k),v.off(n),k.off(n).removeData(o)},event:{stopPropagation:function(a){a.stopPropagation()},test:{toggle:function(a){b.determine.intent(a,b.toggle),a.stopImmediatePropagation()},hide:function(a){b.determine.intent(a,b.hide),a.stopPropagation()}},item:{mouseenter:function(){var c=a(this).find(l.menu),d=a(this).siblings(l.item).children(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.animate.hide(!1,d),b.verbose("Showing sub-menu",c),b.animate.show(!1,c)},2*h.delay.show))},mouseleave:function(){var c=a(this).find(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.verbose("Hiding sub-menu",c),b.animate.hide(!1,c)},h.delay.hide))},click:function(c){var d=a(this),e=d.data(j.text)||d.text(),f=d.data(j.value)||e;0===d.find(l.menu).size()&&(b.verbose("Adding active state to selected item"),v.removeClass(i.active),d.addClass(i.active),b.determine.selectAction(e,f),a.proxy(h.onChange,A)(f,e),c.stopPropagation())}},resetStyle:function(){a(this).removeAttr("style")}},determine:{selectAction:function(c,d){b.verbose("Determining action",h.action),a.isFunction(b[h.action])?(b.verbose("Triggering preset action",h.action),b[h.action](c,d)):a.isFunction(h.action)?(b.verbose("Triggering user action",h.action),h.action(c,d)):b.error(m.action)},intent:function(c,d){b.debug("Determining whether event occurred in dropdown",c.target),d=d||function(){},0===a(c.target).closest(y).size()?(b.verbose("Triggering event",d),d()):b.verbose("Event occurred in dropdown, canceling callback")}},bind:{intent:function(){b.verbose("Binding hide intent event to document"),g.on(b.get.selectEvent(),b.event.test.hide)}},unbind:{intent:function(){b.verbose("Removing hide intent event from document"),g.off(b.get.selectEvent())}},nothing:function(){},changeText:function(a){b.set.text(a),b.hide()},updateForm:function(a,c){b.set.text(a),b.set.value(c),b.hide()},get:{selectEvent:function(){return z?"touchstart":"click"},text:function(){return w.text()},value:function(){return x.val()},item:function(b){var c;return b=b||x.val(),v.each(function(){a(this).data(j.value)==b&&(c=a(this))}),c||!1}},set:{text:function(a){b.debug("Changing text",a,w),w.removeClass(i.placeholder),w.text(a)},value:function(a){b.debug("Adding selected value to hidden input",a,x),x.val(a)},active:function(){k.addClass(i.active)},visible:function(){k.addClass(i.visible)},selected:function(a){var c,d=b.get.item(a);d&&(b.debug("Setting selected menu item to",d),c=d.data(j.text)||d.text(),v.removeClass(i.active),d.addClass(i.active),b.set.text(c))}},remove:{active:function(){k.removeClass(i.active)},visible:function(){k.removeClass(i.visible)}},is:{visible:function(a){return a?a.is(":animated, :visible"):y.is(":animated, :visible")},hidden:function(a){return a?a.is(":not(:animated, :visible)"):y.is(":not(:animated, :visible)")}},can:{click:function(){return z||"click"==h.on},show:function(){return!k.hasClass(i.disabled)}},animate:{show:function(c,e){var f=e||y;c=c||function(){},b.is.hidden(f)&&(b.verbose("Doing menu show animation",f),"none"==h.transition?c():a.fn.transition!==d?f.transition({animation:h.transition+" in",duration:h.duration,complete:c,queue:!1}):"slide down"==h.transition?f.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},h.duration,"easeOutQuad",b.event.resetStyle).end().slideDown(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.hide().clearQueue().fadeIn(h.duration,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))},hide:function(c,e){var f=e||y;c=c||function(){},b.is.visible(f)&&(b.verbose("Doing menu hide animation",f),a.fn.transition!==d?f.transition({animation:h.transition+" out",duration:h.duration,complete:c,queue:!1}):"none"==h.transition?c():"slide down"==h.transition?f.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",b.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.show().clearQueue().fadeOut(150,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))}},show:function(){b.debug("Checking if dropdown can show"),b.is.hidden()&&(b.hideOthers(),b.set.active(),b.animate.show(b.set.visible),b.can.click()&&b.bind.intent(),a.proxy(h.onShow,A)())},hide:function(){b.is.visible()&&(b.debug("Hiding dropdown"),b.can.click()&&b.unbind.intent(),b.remove.active(),b.animate.hide(b.remove.visible),a.proxy(h.onHide,A)())},delay:{show:function(){b.verbose("Delaying show event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.show,h.delay.show)},hide:function(){b.verbose("Delaying hide event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.hide,h.delay.hide)}},hideOthers:function(){b.verbose("Finding other dropdowns to hide"),f.not(k).has(l.menu+":visible").dropdown("hide")},toggle:function(){b.verbose("Toggling menu visibility"),b.is.hidden()?b.show():b.hide()},setting:function(b,c){return c===d?h[b]:(a.isPlainObject(b)?a.extend(!0,h,b):h[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){h.debug&&(h.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,h.name+":"),b.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),b.verbose.apply(console,arguments)))},error:function(){b.error=Function.prototype.bind.call(console.error,console,h.name+":"),b.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;h.performance&&(c=(new Date).getTime(),e=q||c,d=c-e,q=c,r.push({Element:A,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var c=h.name+":",e=0;q=!1,clearTimeout(b.performance.timer),a.each(r,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",p&&(c+=" '"+p+"'"),c+=" ("+f.size()+")",(console.group!==d||console.table!==d)&&r.length>0&&(console.groupCollapsed(c),console.table?console.table(r):a.each(r,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(c,e,f){var g,h;return e=e||u,f=A||f,"string"==typeof c&&B!==d&&(c=c.split(/[\. ]/),g=c.length-1,a.each(c,function(c,e){a.isPlainObject(B[e])&&c!=g?B=B[e]:B[e]!==d?h=B[e]:b.error(m.method)})),a.isFunction(h)?h.apply(f,e):h||!1}},t?(B===d&&b.initialize(),e=b.invoke(s)):(B!==d&&b.destroy(),b.initialize())}),e?e:this},a.fn.dropdown.settings={name:"Dropdown",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",action:"hide",delay:{show:200,hide:300},transition:"slide down",duration:250,onChange:function(){},onShow:function(){},onHide:function(){},error:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined.",transition:"The requested transition was not found"},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",placeholder:"default",disabled:"disabled",visible:"visible"}}}(jQuery,window,document); \ No newline at end of file diff --git a/build/minified/modules/transition.js b/build/minified/modules/transition.js index 19e26c107..40b5d0524 100644 --- a/build/minified/modules/transition.js +++ b/build/minified/modules/transition.js @@ -101,7 +101,9 @@ $.fn.transition = function() { settings = overrideSettings || settings; module.debug('Preparing animation', settings.animation); if(module.is.animating()) { - module.queue(settings.animation); + if(settings.queue) { + module.queue(settings.animation); + } return false; } module.save.conditions(); @@ -621,6 +623,9 @@ $.fn.transition.settings = { animation : 'fade', duration : '700ms', + // queue up animations + queue : true, + className : { transition : 'ui transition', animating : 'animating', diff --git a/build/minified/modules/transition.min.js b/build/minified/modules/transition.min.js index a84f892c3..a9dc0ed9f 100644 --- a/build/minified/modules/transition.min.js +++ b/build/minified/modules/transition.min.js @@ -1 +1 @@ -!function(a,b,c,d){a.fn.transition=function(){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k;return b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},f.each(function(){var b,n,o,p,q,r,s,t,u,v,w=a(this),x=this;v={initialize:function(){b=v.get.settings.apply(x,j),v.verbose("Converted arguments into settings object",b),o=b.error,p=b.className,t=b.namespace,q=b.metadata,u="module-"+t,r=v.get.animationEvent(),s=v.get.animationName(),n=w.data(u),n===d&&v.instantiate(),m&&(m=v.invoke(k)),m===!1&&v.animate()},instantiate:function(){v.verbose("Storing instance of module",v),n=v,w.data(u,n)},destroy:function(){v.verbose("Destroying previous module for",x),w.removeData(u)},animate:function(a){return b=a||b,v.debug("Preparing animation",b.animation),v.is.animating()?(v.queue(b.animation),!1):(v.save.conditions(),v.set.duration(b.duration),v.set.animating(),v.repaint(),w.addClass(p.transition).addClass(b.animation).one(r,v.complete),!v.has.direction()&&v.can.transition()&&v.set.direction(),v.can.animate()?(v.show(),v.debug("Starting tween",b.animation,w.attr("class")),void 0):(v.restore.conditions(),v.error(o.noAnimation),!1))},queue:function(a){v.debug("Queueing animation of",a),n.queuing=!0,w.one(r,function(){n.queuing=!1,v.animate.apply(this,b)})},complete:function(){v.verbose("CSS animation complete",b.animation),v.is.looping()||(w.hasClass(p.outward)?(v.restore.conditions(),v.hide()):w.hasClass(p.inward)?(v.restore.conditions(),v.show()):v.restore.conditions(),v.remove.animating()),a.proxy(b.complete,this)()},repaint:function(a){v.verbose("Forcing repaint event"),a=x.offsetWidth},has:{direction:function(a){return a=a||b.animation,w.hasClass(p.inward)||w.hasClass(p.outward)?!0:void 0}},set:{animating:function(){w.addClass(p.animating)},direction:function(){w.is(":visible")?(v.debug("Automatically determining the direction of animation","Outward"),w.addClass(p.outward).removeClass(p.inward)):(v.debug("Automatically determining the direction of animation","Inward"),w.addClass(p.inward).removeClass(p.outward))},looping:function(){v.debug("Transition set to loop"),w.addClass(p.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,v.verbose("Setting animation duration",a),w.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})}},save:{conditions:function(){v.cache={className:w.attr("class"),style:w.attr("style")},v.verbose("Saving original attributes",v.cache)}},restore:{conditions:function(){return typeof v.cache===d?(v.error(o.cache),!1):(v.cache.className?w.attr("class",v.cache.className):w.removeAttr("class"),v.cache.style?w.attr("style",v.cache.style):w.removeAttr("style"),v.is.looping()&&v.remove.looping(),v.verbose("Restoring original attributes",v.cache),void 0)}},remove:{animating:function(){w.removeClass(p.animating)},looping:function(){v.debug("Transitions are no longer looping"),w.removeClass(p.looping),v.repaint()}},get:{settings:function(b,c,d){return a.isPlainObject(b)?a.extend(!0,{},a.fn.transition.settings,b):"function"==typeof d?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:d,duration:c}):"string"==typeof c||"number"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,duration:c}):"object"==typeof c?a.extend(!0,{},a.fn.transition.settings,c,{animation:b}):"function"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:c}):a.extend(!0,{},a.fn.transition.settings,{animation:b})},animationName:function(){var a,b=c.createElement("div"),e={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor name property",e[a]),e[a];return!1},animationEvent:function(){var a,b=c.createElement("div"),e={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor end event",e[a]),e[a];return!1}},can:{animate:function(){return"none"!==w.css(s)?(v.debug("CSS definition found"),!0):(v.debug("Unable to find css definition"),!1)},transition:function(){var b=a("
").addClass(w.attr("class")).appendTo(a("body")),c=b.css(s),d=b.addClass(p.inward).css(s);return c!=d?(v.debug("In/out transitions exist"),b.remove(),!0):(v.debug("Static animation found"),b.remove(),!1)}},is:{animating:function(){return w.hasClass(p.animating)},looping:function(){return w.hasClass(p.looping)},visible:function(){return w.is(":visible")}},hide:function(){v.verbose("Hiding element"),w.removeClass(p.visible).addClass(p.transition).addClass(p.hidden)},show:function(){v.verbose("Showing element"),w.removeClass(p.hidden).addClass(p.transition).addClass(p.visible)},start:function(){v.verbose("Starting animation"),w.removeClass(p.disabled)},stop:function(){v.debug("Stopping animation"),w.addClass(p.disabled)},toggle:function(){v.debug("Toggling play status"),w.toggleClass(p.disabled)},setting:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},internal:function(b,c){return c===d?v[b]:(a.isPlainObject(b)?a.extend(!0,v,b):v[b]=c,void 0)},debug:function(){b.debug&&(b.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,b.name+":"),v.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),v.verbose.apply(console,arguments)))},error:function(){v.error=Function.prototype.bind.call(console.error,console,b.name+":"),v.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;b.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:x,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,100)},display:function(){var c=b.name+":",e=0;h=!1,clearTimeout(v.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",g&&(c+=" '"+g+"'"),f.size()>1&&(c+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(c),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i;return c=c||l,f=x||f,"string"==typeof b&&n!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(n[e])&&c!=g)n=n[e];else{if(!a.isPlainObject(n[f])||c==g)return n[e]!==d?(h=n[e],!1):n[f]!==d?(h=n[f],!1):!1;n=n[f]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):"string"==typeof e?e=[e,i]:i!==d&&(e=i),h||!1}},v.initialize()}),e!==d?e:this},a.fn.transition.settings={name:"Transition",debug:!0,verbose:!0,performance:!0,namespace:"transition",complete:function(){},animation:"fade",duration:"700ms",className:{transition:"ui transition",animating:"animating",looping:"looping",loading:"loading",disabled:"disabled",hidden:"hidden",visible:"visible",inward:"in",outward:"out"},error:{noAnimation:"There is no css animation matching the one you specified.",method:"The method you called is not defined"}}}(jQuery,window,document); \ No newline at end of file +!function(a,b,c,d){a.fn.transition=function(){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k;return b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},f.each(function(){var b,n,o,p,q,r,s,t,u,v,w=a(this),x=this;v={initialize:function(){b=v.get.settings.apply(x,j),v.verbose("Converted arguments into settings object",b),o=b.error,p=b.className,t=b.namespace,q=b.metadata,u="module-"+t,r=v.get.animationEvent(),s=v.get.animationName(),n=w.data(u),n===d&&v.instantiate(),m&&(m=v.invoke(k)),m===!1&&v.animate()},instantiate:function(){v.verbose("Storing instance of module",v),n=v,w.data(u,n)},destroy:function(){v.verbose("Destroying previous module for",x),w.removeData(u)},animate:function(a){return b=a||b,v.debug("Preparing animation",b.animation),v.is.animating()?(b.queue&&v.queue(b.animation),!1):(v.save.conditions(),v.set.duration(b.duration),v.set.animating(),v.repaint(),w.addClass(p.transition).addClass(b.animation).one(r,v.complete),!v.has.direction()&&v.can.transition()&&v.set.direction(),v.can.animate()?(v.show(),v.debug("Starting tween",b.animation,w.attr("class")),void 0):(v.restore.conditions(),v.error(o.noAnimation),!1))},queue:function(a){v.debug("Queueing animation of",a),n.queuing=!0,w.one(r,function(){n.queuing=!1,v.animate.apply(this,b)})},complete:function(){v.verbose("CSS animation complete",b.animation),v.is.looping()||(w.hasClass(p.outward)?(v.restore.conditions(),v.hide()):w.hasClass(p.inward)?(v.restore.conditions(),v.show()):v.restore.conditions(),v.remove.animating()),a.proxy(b.complete,this)()},repaint:function(a){v.verbose("Forcing repaint event"),a=x.offsetWidth},has:{direction:function(a){return a=a||b.animation,w.hasClass(p.inward)||w.hasClass(p.outward)?!0:void 0}},set:{animating:function(){w.addClass(p.animating)},direction:function(){w.is(":visible")?(v.debug("Automatically determining the direction of animation","Outward"),w.addClass(p.outward).removeClass(p.inward)):(v.debug("Automatically determining the direction of animation","Inward"),w.addClass(p.inward).removeClass(p.outward))},looping:function(){v.debug("Transition set to loop"),w.addClass(p.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,v.verbose("Setting animation duration",a),w.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})}},save:{conditions:function(){v.cache={className:w.attr("class"),style:w.attr("style")},v.verbose("Saving original attributes",v.cache)}},restore:{conditions:function(){return typeof v.cache===d?(v.error(o.cache),!1):(v.cache.className?w.attr("class",v.cache.className):w.removeAttr("class"),v.cache.style?w.attr("style",v.cache.style):w.removeAttr("style"),v.is.looping()&&v.remove.looping(),v.verbose("Restoring original attributes",v.cache),void 0)}},remove:{animating:function(){w.removeClass(p.animating)},looping:function(){v.debug("Transitions are no longer looping"),w.removeClass(p.looping),v.repaint()}},get:{settings:function(b,c,d){return a.isPlainObject(b)?a.extend(!0,{},a.fn.transition.settings,b):"function"==typeof d?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:d,duration:c}):"string"==typeof c||"number"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,duration:c}):"object"==typeof c?a.extend(!0,{},a.fn.transition.settings,c,{animation:b}):"function"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:c}):a.extend(!0,{},a.fn.transition.settings,{animation:b})},animationName:function(){var a,b=c.createElement("div"),e={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor name property",e[a]),e[a];return!1},animationEvent:function(){var a,b=c.createElement("div"),e={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor end event",e[a]),e[a];return!1}},can:{animate:function(){return"none"!==w.css(s)?(v.debug("CSS definition found"),!0):(v.debug("Unable to find css definition"),!1)},transition:function(){var b=a("
").addClass(w.attr("class")).appendTo(a("body")),c=b.css(s),d=b.addClass(p.inward).css(s);return c!=d?(v.debug("In/out transitions exist"),b.remove(),!0):(v.debug("Static animation found"),b.remove(),!1)}},is:{animating:function(){return w.hasClass(p.animating)},looping:function(){return w.hasClass(p.looping)},visible:function(){return w.is(":visible")}},hide:function(){v.verbose("Hiding element"),w.removeClass(p.visible).addClass(p.transition).addClass(p.hidden)},show:function(){v.verbose("Showing element"),w.removeClass(p.hidden).addClass(p.transition).addClass(p.visible)},start:function(){v.verbose("Starting animation"),w.removeClass(p.disabled)},stop:function(){v.debug("Stopping animation"),w.addClass(p.disabled)},toggle:function(){v.debug("Toggling play status"),w.toggleClass(p.disabled)},setting:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},internal:function(b,c){return c===d?v[b]:(a.isPlainObject(b)?a.extend(!0,v,b):v[b]=c,void 0)},debug:function(){b.debug&&(b.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,b.name+":"),v.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),v.verbose.apply(console,arguments)))},error:function(){v.error=Function.prototype.bind.call(console.error,console,b.name+":"),v.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;b.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:x,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,100)},display:function(){var c=b.name+":",e=0;h=!1,clearTimeout(v.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",g&&(c+=" '"+g+"'"),f.size()>1&&(c+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(c),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i;return c=c||l,f=x||f,"string"==typeof b&&n!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(n[e])&&c!=g)n=n[e];else{if(!a.isPlainObject(n[f])||c==g)return n[e]!==d?(h=n[e],!1):n[f]!==d?(h=n[f],!1):!1;n=n[f]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):"string"==typeof e?e=[e,i]:i!==d&&(e=i),h||!1}},v.initialize()}),e!==d?e:this},a.fn.transition.settings={name:"Transition",debug:!0,verbose:!0,performance:!0,namespace:"transition",complete:function(){},animation:"fade",duration:"700ms",queue:!0,className:{transition:"ui transition",animating:"animating",looping:"looping",loading:"loading",disabled:"disabled",hidden:"hidden",visible:"visible",inward:"in",outward:"out"},error:{noAnimation:"There is no css animation matching the one you specified.",method:"The method you called is not defined"}}}(jQuery,window,document); \ No newline at end of file diff --git a/build/packaged/javascript/semantic.min.js.REMOVED.git-id b/build/packaged/javascript/semantic.min.js.REMOVED.git-id index c6fc85917..c314c4f85 100644 --- a/build/packaged/javascript/semantic.min.js.REMOVED.git-id +++ b/build/packaged/javascript/semantic.min.js.REMOVED.git-id @@ -1 +1 @@ -23262ca8224c22eabdf0aa14126f4a5c01b2afed \ No newline at end of file +57e8d3bf3bf3892a23e67b9eef04f1ee68496019 \ No newline at end of file diff --git a/build/uncompressed/elements/icon.css b/build/uncompressed/elements/icon.css index 4f9ed454d..d893ecfb0 100644 --- a/build/uncompressed/elements/icon.css +++ b/build/uncompressed/elements/icon.css @@ -220,10 +220,6 @@ i.icon.block:before { content: '🚫'; } /* '\1f6ab' */ -i.icon.book:before { - content: '📖'; -} -/* '\1f4d6' */ i.icon.book:before { content: '\f4d6'; } diff --git a/build/uncompressed/modules/dropdown.js b/build/uncompressed/modules/dropdown.js index 7285e4993..34241f703 100644 --- a/build/uncompressed/modules/dropdown.js +++ b/build/uncompressed/modules/dropdown.js @@ -349,7 +349,12 @@ $.fn.dropdown = function(parameters) { callback(); } else if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' in', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' in', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'slide down') { $currentMenu @@ -392,7 +397,12 @@ $.fn.dropdown = function(parameters) { if(dropdown.is.visible($currentMenu) ) { dropdown.verbose('Doing menu hide animation', $currentMenu); if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' out', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' out', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'none') { callback(); diff --git a/build/uncompressed/modules/transition.js b/build/uncompressed/modules/transition.js index 19e26c107..40b5d0524 100644 --- a/build/uncompressed/modules/transition.js +++ b/build/uncompressed/modules/transition.js @@ -101,7 +101,9 @@ $.fn.transition = function() { settings = overrideSettings || settings; module.debug('Preparing animation', settings.animation); if(module.is.animating()) { - module.queue(settings.animation); + if(settings.queue) { + module.queue(settings.animation); + } return false; } module.save.conditions(); @@ -621,6 +623,9 @@ $.fn.transition.settings = { animation : 'fade', duration : '700ms', + // queue up animations + queue : true, + className : { transition : 'ui transition', animating : 'animating', diff --git a/node/src/files/release/less/modules/dropdown.js b/node/src/files/release/less/modules/dropdown.js index 7285e4993..34241f703 100644 --- a/node/src/files/release/less/modules/dropdown.js +++ b/node/src/files/release/less/modules/dropdown.js @@ -349,7 +349,12 @@ $.fn.dropdown = function(parameters) { callback(); } else if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' in', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' in', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'slide down') { $currentMenu @@ -392,7 +397,12 @@ $.fn.dropdown = function(parameters) { if(dropdown.is.visible($currentMenu) ) { dropdown.verbose('Doing menu hide animation', $currentMenu); if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' out', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' out', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'none') { callback(); diff --git a/node/src/files/release/less/modules/transition.js b/node/src/files/release/less/modules/transition.js index 19e26c107..40b5d0524 100644 --- a/node/src/files/release/less/modules/transition.js +++ b/node/src/files/release/less/modules/transition.js @@ -101,7 +101,9 @@ $.fn.transition = function() { settings = overrideSettings || settings; module.debug('Preparing animation', settings.animation); if(module.is.animating()) { - module.queue(settings.animation); + if(settings.queue) { + module.queue(settings.animation); + } return false; } module.save.conditions(); @@ -621,6 +623,9 @@ $.fn.transition.settings = { animation : 'fade', duration : '700ms', + // queue up animations + queue : true, + className : { transition : 'ui transition', animating : 'animating', diff --git a/node/src/files/release/minified/modules/dropdown.js b/node/src/files/release/minified/modules/dropdown.js index 7285e4993..34241f703 100644 --- a/node/src/files/release/minified/modules/dropdown.js +++ b/node/src/files/release/minified/modules/dropdown.js @@ -349,7 +349,12 @@ $.fn.dropdown = function(parameters) { callback(); } else if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' in', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' in', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'slide down') { $currentMenu @@ -392,7 +397,12 @@ $.fn.dropdown = function(parameters) { if(dropdown.is.visible($currentMenu) ) { dropdown.verbose('Doing menu hide animation', $currentMenu); if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' out', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' out', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'none') { callback(); diff --git a/node/src/files/release/minified/modules/dropdown.min.js b/node/src/files/release/minified/modules/dropdown.min.js index 0df4779a2..eede3f1d7 100644 --- a/node/src/files/release/minified/modules/dropdown.min.js +++ b/node/src/files/release/minified/modules/dropdown.min.js @@ -1 +1 @@ -!function(a,b,c,d){a.fn.dropdown=function(b){var e,f=a(this),g=a(c),h=a.isPlainObject(b)?a.extend(!0,{},a.fn.dropdown.settings,b):a.fn.dropdown.settings,i=h.className,j=h.metadata,k=h.namespace,l=h.selector,m=h.error,n="."+k,o="module-"+k,p=f.selector||"",q=(new Date).getTime(),r=[],s=arguments[0],t="string"==typeof s,u=[].slice.call(arguments,1);return f.each(function(){var b,k=a(this),v=k.find(l.item),w=k.find(l.text),x=k.find(l.input),y=k.children(l.menu),z="ontouchstart"in c.documentElement,A=this,B=k.data(o);b={initialize:function(){b.debug("Initializing dropdown",h),z?k.on("touchstart"+n,b.event.test.toggle):"click"==h.on?k.on("click"+n,b.event.test.toggle):"hover"==h.on?k.on("mouseenter"+n,b.delay.show).on("mouseleave"+n,b.delay.hide):k.on(h.on+n,b.toggle),"form"==h.action&&b.set.selected(),v.on("mouseenter"+n,b.event.item.mouseenter).on("mouseleave"+n,b.event.item.mouseleave).on(b.get.selectEvent()+n,b.event.item.click),b.instantiate()},instantiate:function(){b.verbose("Storing instance of dropdown",b),k.data(o,b)},destroy:function(){b.verbose("Destroying previous dropdown for",k),v.off(n),k.off(n).removeData(o)},event:{stopPropagation:function(a){a.stopPropagation()},test:{toggle:function(a){b.determine.intent(a,b.toggle),a.stopImmediatePropagation()},hide:function(a){b.determine.intent(a,b.hide),a.stopPropagation()}},item:{mouseenter:function(){var c=a(this).find(l.menu),d=a(this).siblings(l.item).children(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.animate.hide(!1,d),b.verbose("Showing sub-menu",c),b.animate.show(!1,c)},2*h.delay.show))},mouseleave:function(){var c=a(this).find(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.verbose("Hiding sub-menu",c),b.animate.hide(!1,c)},h.delay.hide))},click:function(c){var d=a(this),e=d.data(j.text)||d.text(),f=d.data(j.value)||e;0===d.find(l.menu).size()&&(b.verbose("Adding active state to selected item"),v.removeClass(i.active),d.addClass(i.active),b.determine.selectAction(e,f),a.proxy(h.onChange,A)(f,e),c.stopPropagation())}},resetStyle:function(){a(this).removeAttr("style")}},determine:{selectAction:function(c,d){b.verbose("Determining action",h.action),a.isFunction(b[h.action])?(b.verbose("Triggering preset action",h.action),b[h.action](c,d)):a.isFunction(h.action)?(b.verbose("Triggering user action",h.action),h.action(c,d)):b.error(m.action)},intent:function(c,d){b.debug("Determining whether event occurred in dropdown",c.target),d=d||function(){},0===a(c.target).closest(y).size()?(b.verbose("Triggering event",d),d()):b.verbose("Event occurred in dropdown, canceling callback")}},bind:{intent:function(){b.verbose("Binding hide intent event to document"),g.on(b.get.selectEvent(),b.event.test.hide)}},unbind:{intent:function(){b.verbose("Removing hide intent event from document"),g.off(b.get.selectEvent())}},nothing:function(){},changeText:function(a){b.set.text(a),b.hide()},updateForm:function(a,c){b.set.text(a),b.set.value(c),b.hide()},get:{selectEvent:function(){return z?"touchstart":"click"},text:function(){return w.text()},value:function(){return x.val()},item:function(b){var c;return b=b||x.val(),v.each(function(){a(this).data(j.value)==b&&(c=a(this))}),c||!1}},set:{text:function(a){b.debug("Changing text",a,w),w.removeClass(i.placeholder),w.text(a)},value:function(a){b.debug("Adding selected value to hidden input",a,x),x.val(a)},active:function(){k.addClass(i.active)},visible:function(){k.addClass(i.visible)},selected:function(a){var c,d=b.get.item(a);d&&(b.debug("Setting selected menu item to",d),c=d.data(j.text)||d.text(),v.removeClass(i.active),d.addClass(i.active),b.set.text(c))}},remove:{active:function(){k.removeClass(i.active)},visible:function(){k.removeClass(i.visible)}},is:{visible:function(a){return a?a.is(":animated, :visible"):y.is(":animated, :visible")},hidden:function(a){return a?a.is(":not(:animated, :visible)"):y.is(":not(:animated, :visible)")}},can:{click:function(){return z||"click"==h.on},show:function(){return!k.hasClass(i.disabled)}},animate:{show:function(c,e){var f=e||y;c=c||function(){},b.is.hidden(f)&&(b.verbose("Doing menu show animation",f),"none"==h.transition?c():a.fn.transition!==d?f.transition(h.transition+" in",h.duration,c):"slide down"==h.transition?f.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},h.duration,"easeOutQuad",b.event.resetStyle).end().slideDown(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.hide().clearQueue().fadeIn(h.duration,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))},hide:function(c,e){var f=e||y;c=c||function(){},b.is.visible(f)&&(b.verbose("Doing menu hide animation",f),a.fn.transition!==d?f.transition(h.transition+" out",h.duration,c):"none"==h.transition?c():"slide down"==h.transition?f.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",b.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.show().clearQueue().fadeOut(150,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))}},show:function(){b.debug("Checking if dropdown can show"),b.is.hidden()&&(b.hideOthers(),b.set.active(),b.animate.show(b.set.visible),b.can.click()&&b.bind.intent(),a.proxy(h.onShow,A)())},hide:function(){b.is.visible()&&(b.debug("Hiding dropdown"),b.can.click()&&b.unbind.intent(),b.remove.active(),b.animate.hide(b.remove.visible),a.proxy(h.onHide,A)())},delay:{show:function(){b.verbose("Delaying show event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.show,h.delay.show)},hide:function(){b.verbose("Delaying hide event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.hide,h.delay.hide)}},hideOthers:function(){b.verbose("Finding other dropdowns to hide"),f.not(k).has(l.menu+":visible").dropdown("hide")},toggle:function(){b.verbose("Toggling menu visibility"),b.is.hidden()?b.show():b.hide()},setting:function(b,c){return c===d?h[b]:(a.isPlainObject(b)?a.extend(!0,h,b):h[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){h.debug&&(h.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,h.name+":"),b.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),b.verbose.apply(console,arguments)))},error:function(){b.error=Function.prototype.bind.call(console.error,console,h.name+":"),b.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;h.performance&&(c=(new Date).getTime(),e=q||c,d=c-e,q=c,r.push({Element:A,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var c=h.name+":",e=0;q=!1,clearTimeout(b.performance.timer),a.each(r,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",p&&(c+=" '"+p+"'"),c+=" ("+f.size()+")",(console.group!==d||console.table!==d)&&r.length>0&&(console.groupCollapsed(c),console.table?console.table(r):a.each(r,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(c,e,f){var g,h;return e=e||u,f=A||f,"string"==typeof c&&B!==d&&(c=c.split(/[\. ]/),g=c.length-1,a.each(c,function(c,e){a.isPlainObject(B[e])&&c!=g?B=B[e]:B[e]!==d?h=B[e]:b.error(m.method)})),a.isFunction(h)?h.apply(f,e):h||!1}},t?(B===d&&b.initialize(),e=b.invoke(s)):(B!==d&&b.destroy(),b.initialize())}),e?e:this},a.fn.dropdown.settings={name:"Dropdown",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",action:"hide",delay:{show:200,hide:300},transition:"slide down",duration:250,onChange:function(){},onShow:function(){},onHide:function(){},error:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined.",transition:"The requested transition was not found"},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",placeholder:"default",disabled:"disabled",visible:"visible"}}}(jQuery,window,document); \ No newline at end of file +!function(a,b,c,d){a.fn.dropdown=function(b){var e,f=a(this),g=a(c),h=a.isPlainObject(b)?a.extend(!0,{},a.fn.dropdown.settings,b):a.fn.dropdown.settings,i=h.className,j=h.metadata,k=h.namespace,l=h.selector,m=h.error,n="."+k,o="module-"+k,p=f.selector||"",q=(new Date).getTime(),r=[],s=arguments[0],t="string"==typeof s,u=[].slice.call(arguments,1);return f.each(function(){var b,k=a(this),v=k.find(l.item),w=k.find(l.text),x=k.find(l.input),y=k.children(l.menu),z="ontouchstart"in c.documentElement,A=this,B=k.data(o);b={initialize:function(){b.debug("Initializing dropdown",h),z?k.on("touchstart"+n,b.event.test.toggle):"click"==h.on?k.on("click"+n,b.event.test.toggle):"hover"==h.on?k.on("mouseenter"+n,b.delay.show).on("mouseleave"+n,b.delay.hide):k.on(h.on+n,b.toggle),"form"==h.action&&b.set.selected(),v.on("mouseenter"+n,b.event.item.mouseenter).on("mouseleave"+n,b.event.item.mouseleave).on(b.get.selectEvent()+n,b.event.item.click),b.instantiate()},instantiate:function(){b.verbose("Storing instance of dropdown",b),k.data(o,b)},destroy:function(){b.verbose("Destroying previous dropdown for",k),v.off(n),k.off(n).removeData(o)},event:{stopPropagation:function(a){a.stopPropagation()},test:{toggle:function(a){b.determine.intent(a,b.toggle),a.stopImmediatePropagation()},hide:function(a){b.determine.intent(a,b.hide),a.stopPropagation()}},item:{mouseenter:function(){var c=a(this).find(l.menu),d=a(this).siblings(l.item).children(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.animate.hide(!1,d),b.verbose("Showing sub-menu",c),b.animate.show(!1,c)},2*h.delay.show))},mouseleave:function(){var c=a(this).find(l.menu);c.size()>0&&(clearTimeout(b.itemTimer),b.itemTimer=setTimeout(function(){b.verbose("Hiding sub-menu",c),b.animate.hide(!1,c)},h.delay.hide))},click:function(c){var d=a(this),e=d.data(j.text)||d.text(),f=d.data(j.value)||e;0===d.find(l.menu).size()&&(b.verbose("Adding active state to selected item"),v.removeClass(i.active),d.addClass(i.active),b.determine.selectAction(e,f),a.proxy(h.onChange,A)(f,e),c.stopPropagation())}},resetStyle:function(){a(this).removeAttr("style")}},determine:{selectAction:function(c,d){b.verbose("Determining action",h.action),a.isFunction(b[h.action])?(b.verbose("Triggering preset action",h.action),b[h.action](c,d)):a.isFunction(h.action)?(b.verbose("Triggering user action",h.action),h.action(c,d)):b.error(m.action)},intent:function(c,d){b.debug("Determining whether event occurred in dropdown",c.target),d=d||function(){},0===a(c.target).closest(y).size()?(b.verbose("Triggering event",d),d()):b.verbose("Event occurred in dropdown, canceling callback")}},bind:{intent:function(){b.verbose("Binding hide intent event to document"),g.on(b.get.selectEvent(),b.event.test.hide)}},unbind:{intent:function(){b.verbose("Removing hide intent event from document"),g.off(b.get.selectEvent())}},nothing:function(){},changeText:function(a){b.set.text(a),b.hide()},updateForm:function(a,c){b.set.text(a),b.set.value(c),b.hide()},get:{selectEvent:function(){return z?"touchstart":"click"},text:function(){return w.text()},value:function(){return x.val()},item:function(b){var c;return b=b||x.val(),v.each(function(){a(this).data(j.value)==b&&(c=a(this))}),c||!1}},set:{text:function(a){b.debug("Changing text",a,w),w.removeClass(i.placeholder),w.text(a)},value:function(a){b.debug("Adding selected value to hidden input",a,x),x.val(a)},active:function(){k.addClass(i.active)},visible:function(){k.addClass(i.visible)},selected:function(a){var c,d=b.get.item(a);d&&(b.debug("Setting selected menu item to",d),c=d.data(j.text)||d.text(),v.removeClass(i.active),d.addClass(i.active),b.set.text(c))}},remove:{active:function(){k.removeClass(i.active)},visible:function(){k.removeClass(i.visible)}},is:{visible:function(a){return a?a.is(":animated, :visible"):y.is(":animated, :visible")},hidden:function(a){return a?a.is(":not(:animated, :visible)"):y.is(":not(:animated, :visible)")}},can:{click:function(){return z||"click"==h.on},show:function(){return!k.hasClass(i.disabled)}},animate:{show:function(c,e){var f=e||y;c=c||function(){},b.is.hidden(f)&&(b.verbose("Doing menu show animation",f),"none"==h.transition?c():a.fn.transition!==d?f.transition({animation:h.transition+" in",duration:h.duration,complete:c,queue:!1}):"slide down"==h.transition?f.hide().clearQueue().children().clearQueue().css("opacity",0).delay(50).animate({opacity:1},h.duration,"easeOutQuad",b.event.resetStyle).end().slideDown(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.hide().clearQueue().fadeIn(h.duration,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))},hide:function(c,e){var f=e||y;c=c||function(){},b.is.visible(f)&&(b.verbose("Doing menu hide animation",f),a.fn.transition!==d?f.transition({animation:h.transition+" out",duration:h.duration,complete:c,queue:!1}):"none"==h.transition?c():"slide down"==h.transition?f.show().clearQueue().children().clearQueue().css("opacity",1).animate({opacity:0},100,"easeOutQuad",b.event.resetStyle).end().delay(50).slideUp(100,"easeOutQuad",function(){a.proxy(b.event.resetStyle,this)(),c()}):"fade"==h.transition?f.show().clearQueue().fadeOut(150,function(){a.proxy(b.event.resetStyle,this)(),c()}):b.error(m.transition))}},show:function(){b.debug("Checking if dropdown can show"),b.is.hidden()&&(b.hideOthers(),b.set.active(),b.animate.show(b.set.visible),b.can.click()&&b.bind.intent(),a.proxy(h.onShow,A)())},hide:function(){b.is.visible()&&(b.debug("Hiding dropdown"),b.can.click()&&b.unbind.intent(),b.remove.active(),b.animate.hide(b.remove.visible),a.proxy(h.onHide,A)())},delay:{show:function(){b.verbose("Delaying show event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.show,h.delay.show)},hide:function(){b.verbose("Delaying hide event to ensure user intent"),clearTimeout(b.timer),b.timer=setTimeout(b.hide,h.delay.hide)}},hideOthers:function(){b.verbose("Finding other dropdowns to hide"),f.not(k).has(l.menu+":visible").dropdown("hide")},toggle:function(){b.verbose("Toggling menu visibility"),b.is.hidden()?b.show():b.hide()},setting:function(b,c){return c===d?h[b]:(a.isPlainObject(b)?a.extend(!0,h,b):h[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){h.debug&&(h.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,h.name+":"),b.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),b.verbose.apply(console,arguments)))},error:function(){b.error=Function.prototype.bind.call(console.error,console,h.name+":"),b.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;h.performance&&(c=(new Date).getTime(),e=q||c,d=c-e,q=c,r.push({Element:A,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var c=h.name+":",e=0;q=!1,clearTimeout(b.performance.timer),a.each(r,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",p&&(c+=" '"+p+"'"),c+=" ("+f.size()+")",(console.group!==d||console.table!==d)&&r.length>0&&(console.groupCollapsed(c),console.table?console.table(r):a.each(r,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),r=[]}},invoke:function(c,e,f){var g,h;return e=e||u,f=A||f,"string"==typeof c&&B!==d&&(c=c.split(/[\. ]/),g=c.length-1,a.each(c,function(c,e){a.isPlainObject(B[e])&&c!=g?B=B[e]:B[e]!==d?h=B[e]:b.error(m.method)})),a.isFunction(h)?h.apply(f,e):h||!1}},t?(B===d&&b.initialize(),e=b.invoke(s)):(B!==d&&b.destroy(),b.initialize())}),e?e:this},a.fn.dropdown.settings={name:"Dropdown",namespace:"dropdown",verbose:!0,debug:!0,performance:!0,on:"click",action:"hide",delay:{show:200,hide:300},transition:"slide down",duration:250,onChange:function(){},onShow:function(){},onHide:function(){},error:{action:"You called a dropdown action that was not defined",method:"The method you called is not defined.",transition:"The requested transition was not found"},metadata:{text:"text",value:"value"},selector:{menu:".menu",item:".menu > .item",text:"> .text",input:'> input[type="hidden"]'},className:{active:"active",placeholder:"default",disabled:"disabled",visible:"visible"}}}(jQuery,window,document); \ No newline at end of file diff --git a/node/src/files/release/minified/modules/transition.js b/node/src/files/release/minified/modules/transition.js index 19e26c107..40b5d0524 100644 --- a/node/src/files/release/minified/modules/transition.js +++ b/node/src/files/release/minified/modules/transition.js @@ -101,7 +101,9 @@ $.fn.transition = function() { settings = overrideSettings || settings; module.debug('Preparing animation', settings.animation); if(module.is.animating()) { - module.queue(settings.animation); + if(settings.queue) { + module.queue(settings.animation); + } return false; } module.save.conditions(); @@ -621,6 +623,9 @@ $.fn.transition.settings = { animation : 'fade', duration : '700ms', + // queue up animations + queue : true, + className : { transition : 'ui transition', animating : 'animating', diff --git a/node/src/files/release/minified/modules/transition.min.js b/node/src/files/release/minified/modules/transition.min.js index a84f892c3..a9dc0ed9f 100644 --- a/node/src/files/release/minified/modules/transition.min.js +++ b/node/src/files/release/minified/modules/transition.min.js @@ -1 +1 @@ -!function(a,b,c,d){a.fn.transition=function(){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k;return b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},f.each(function(){var b,n,o,p,q,r,s,t,u,v,w=a(this),x=this;v={initialize:function(){b=v.get.settings.apply(x,j),v.verbose("Converted arguments into settings object",b),o=b.error,p=b.className,t=b.namespace,q=b.metadata,u="module-"+t,r=v.get.animationEvent(),s=v.get.animationName(),n=w.data(u),n===d&&v.instantiate(),m&&(m=v.invoke(k)),m===!1&&v.animate()},instantiate:function(){v.verbose("Storing instance of module",v),n=v,w.data(u,n)},destroy:function(){v.verbose("Destroying previous module for",x),w.removeData(u)},animate:function(a){return b=a||b,v.debug("Preparing animation",b.animation),v.is.animating()?(v.queue(b.animation),!1):(v.save.conditions(),v.set.duration(b.duration),v.set.animating(),v.repaint(),w.addClass(p.transition).addClass(b.animation).one(r,v.complete),!v.has.direction()&&v.can.transition()&&v.set.direction(),v.can.animate()?(v.show(),v.debug("Starting tween",b.animation,w.attr("class")),void 0):(v.restore.conditions(),v.error(o.noAnimation),!1))},queue:function(a){v.debug("Queueing animation of",a),n.queuing=!0,w.one(r,function(){n.queuing=!1,v.animate.apply(this,b)})},complete:function(){v.verbose("CSS animation complete",b.animation),v.is.looping()||(w.hasClass(p.outward)?(v.restore.conditions(),v.hide()):w.hasClass(p.inward)?(v.restore.conditions(),v.show()):v.restore.conditions(),v.remove.animating()),a.proxy(b.complete,this)()},repaint:function(a){v.verbose("Forcing repaint event"),a=x.offsetWidth},has:{direction:function(a){return a=a||b.animation,w.hasClass(p.inward)||w.hasClass(p.outward)?!0:void 0}},set:{animating:function(){w.addClass(p.animating)},direction:function(){w.is(":visible")?(v.debug("Automatically determining the direction of animation","Outward"),w.addClass(p.outward).removeClass(p.inward)):(v.debug("Automatically determining the direction of animation","Inward"),w.addClass(p.inward).removeClass(p.outward))},looping:function(){v.debug("Transition set to loop"),w.addClass(p.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,v.verbose("Setting animation duration",a),w.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})}},save:{conditions:function(){v.cache={className:w.attr("class"),style:w.attr("style")},v.verbose("Saving original attributes",v.cache)}},restore:{conditions:function(){return typeof v.cache===d?(v.error(o.cache),!1):(v.cache.className?w.attr("class",v.cache.className):w.removeAttr("class"),v.cache.style?w.attr("style",v.cache.style):w.removeAttr("style"),v.is.looping()&&v.remove.looping(),v.verbose("Restoring original attributes",v.cache),void 0)}},remove:{animating:function(){w.removeClass(p.animating)},looping:function(){v.debug("Transitions are no longer looping"),w.removeClass(p.looping),v.repaint()}},get:{settings:function(b,c,d){return a.isPlainObject(b)?a.extend(!0,{},a.fn.transition.settings,b):"function"==typeof d?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:d,duration:c}):"string"==typeof c||"number"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,duration:c}):"object"==typeof c?a.extend(!0,{},a.fn.transition.settings,c,{animation:b}):"function"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:c}):a.extend(!0,{},a.fn.transition.settings,{animation:b})},animationName:function(){var a,b=c.createElement("div"),e={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor name property",e[a]),e[a];return!1},animationEvent:function(){var a,b=c.createElement("div"),e={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor end event",e[a]),e[a];return!1}},can:{animate:function(){return"none"!==w.css(s)?(v.debug("CSS definition found"),!0):(v.debug("Unable to find css definition"),!1)},transition:function(){var b=a("
").addClass(w.attr("class")).appendTo(a("body")),c=b.css(s),d=b.addClass(p.inward).css(s);return c!=d?(v.debug("In/out transitions exist"),b.remove(),!0):(v.debug("Static animation found"),b.remove(),!1)}},is:{animating:function(){return w.hasClass(p.animating)},looping:function(){return w.hasClass(p.looping)},visible:function(){return w.is(":visible")}},hide:function(){v.verbose("Hiding element"),w.removeClass(p.visible).addClass(p.transition).addClass(p.hidden)},show:function(){v.verbose("Showing element"),w.removeClass(p.hidden).addClass(p.transition).addClass(p.visible)},start:function(){v.verbose("Starting animation"),w.removeClass(p.disabled)},stop:function(){v.debug("Stopping animation"),w.addClass(p.disabled)},toggle:function(){v.debug("Toggling play status"),w.toggleClass(p.disabled)},setting:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},internal:function(b,c){return c===d?v[b]:(a.isPlainObject(b)?a.extend(!0,v,b):v[b]=c,void 0)},debug:function(){b.debug&&(b.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,b.name+":"),v.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),v.verbose.apply(console,arguments)))},error:function(){v.error=Function.prototype.bind.call(console.error,console,b.name+":"),v.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;b.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:x,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,100)},display:function(){var c=b.name+":",e=0;h=!1,clearTimeout(v.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",g&&(c+=" '"+g+"'"),f.size()>1&&(c+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(c),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i;return c=c||l,f=x||f,"string"==typeof b&&n!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(n[e])&&c!=g)n=n[e];else{if(!a.isPlainObject(n[f])||c==g)return n[e]!==d?(h=n[e],!1):n[f]!==d?(h=n[f],!1):!1;n=n[f]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):"string"==typeof e?e=[e,i]:i!==d&&(e=i),h||!1}},v.initialize()}),e!==d?e:this},a.fn.transition.settings={name:"Transition",debug:!0,verbose:!0,performance:!0,namespace:"transition",complete:function(){},animation:"fade",duration:"700ms",className:{transition:"ui transition",animating:"animating",looping:"looping",loading:"loading",disabled:"disabled",hidden:"hidden",visible:"visible",inward:"in",outward:"out"},error:{noAnimation:"There is no css animation matching the one you specified.",method:"The method you called is not defined"}}}(jQuery,window,document); \ No newline at end of file +!function(a,b,c,d){a.fn.transition=function(){var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k;return b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)},f.each(function(){var b,n,o,p,q,r,s,t,u,v,w=a(this),x=this;v={initialize:function(){b=v.get.settings.apply(x,j),v.verbose("Converted arguments into settings object",b),o=b.error,p=b.className,t=b.namespace,q=b.metadata,u="module-"+t,r=v.get.animationEvent(),s=v.get.animationName(),n=w.data(u),n===d&&v.instantiate(),m&&(m=v.invoke(k)),m===!1&&v.animate()},instantiate:function(){v.verbose("Storing instance of module",v),n=v,w.data(u,n)},destroy:function(){v.verbose("Destroying previous module for",x),w.removeData(u)},animate:function(a){return b=a||b,v.debug("Preparing animation",b.animation),v.is.animating()?(b.queue&&v.queue(b.animation),!1):(v.save.conditions(),v.set.duration(b.duration),v.set.animating(),v.repaint(),w.addClass(p.transition).addClass(b.animation).one(r,v.complete),!v.has.direction()&&v.can.transition()&&v.set.direction(),v.can.animate()?(v.show(),v.debug("Starting tween",b.animation,w.attr("class")),void 0):(v.restore.conditions(),v.error(o.noAnimation),!1))},queue:function(a){v.debug("Queueing animation of",a),n.queuing=!0,w.one(r,function(){n.queuing=!1,v.animate.apply(this,b)})},complete:function(){v.verbose("CSS animation complete",b.animation),v.is.looping()||(w.hasClass(p.outward)?(v.restore.conditions(),v.hide()):w.hasClass(p.inward)?(v.restore.conditions(),v.show()):v.restore.conditions(),v.remove.animating()),a.proxy(b.complete,this)()},repaint:function(a){v.verbose("Forcing repaint event"),a=x.offsetWidth},has:{direction:function(a){return a=a||b.animation,w.hasClass(p.inward)||w.hasClass(p.outward)?!0:void 0}},set:{animating:function(){w.addClass(p.animating)},direction:function(){w.is(":visible")?(v.debug("Automatically determining the direction of animation","Outward"),w.addClass(p.outward).removeClass(p.inward)):(v.debug("Automatically determining the direction of animation","Inward"),w.addClass(p.inward).removeClass(p.outward))},looping:function(){v.debug("Transition set to loop"),w.addClass(p.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,v.verbose("Setting animation duration",a),w.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})}},save:{conditions:function(){v.cache={className:w.attr("class"),style:w.attr("style")},v.verbose("Saving original attributes",v.cache)}},restore:{conditions:function(){return typeof v.cache===d?(v.error(o.cache),!1):(v.cache.className?w.attr("class",v.cache.className):w.removeAttr("class"),v.cache.style?w.attr("style",v.cache.style):w.removeAttr("style"),v.is.looping()&&v.remove.looping(),v.verbose("Restoring original attributes",v.cache),void 0)}},remove:{animating:function(){w.removeClass(p.animating)},looping:function(){v.debug("Transitions are no longer looping"),w.removeClass(p.looping),v.repaint()}},get:{settings:function(b,c,d){return a.isPlainObject(b)?a.extend(!0,{},a.fn.transition.settings,b):"function"==typeof d?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:d,duration:c}):"string"==typeof c||"number"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,duration:c}):"object"==typeof c?a.extend(!0,{},a.fn.transition.settings,c,{animation:b}):"function"==typeof c?a.extend(!0,{},a.fn.transition.settings,{animation:b,complete:c}):a.extend(!0,{},a.fn.transition.settings,{animation:b})},animationName:function(){var a,b=c.createElement("div"),e={animation:"animationName",OAnimation:"oAnimationName",MozAnimation:"mozAnimationName",WebkitAnimation:"webkitAnimationName"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor name property",e[a]),e[a];return!1},animationEvent:function(){var a,b=c.createElement("div"),e={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(a in e)if(b.style[a]!==d)return v.verbose("Determining animation vendor end event",e[a]),e[a];return!1}},can:{animate:function(){return"none"!==w.css(s)?(v.debug("CSS definition found"),!0):(v.debug("Unable to find css definition"),!1)},transition:function(){var b=a("
").addClass(w.attr("class")).appendTo(a("body")),c=b.css(s),d=b.addClass(p.inward).css(s);return c!=d?(v.debug("In/out transitions exist"),b.remove(),!0):(v.debug("Static animation found"),b.remove(),!1)}},is:{animating:function(){return w.hasClass(p.animating)},looping:function(){return w.hasClass(p.looping)},visible:function(){return w.is(":visible")}},hide:function(){v.verbose("Hiding element"),w.removeClass(p.visible).addClass(p.transition).addClass(p.hidden)},show:function(){v.verbose("Showing element"),w.removeClass(p.hidden).addClass(p.transition).addClass(p.visible)},start:function(){v.verbose("Starting animation"),w.removeClass(p.disabled)},stop:function(){v.debug("Stopping animation"),w.addClass(p.disabled)},toggle:function(){v.debug("Toggling play status"),w.toggleClass(p.disabled)},setting:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},internal:function(b,c){return c===d?v[b]:(a.isPlainObject(b)?a.extend(!0,v,b):v[b]=c,void 0)},debug:function(){b.debug&&(b.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,b.name+":"),v.debug.apply(console,arguments)))},verbose:function(){b.verbose&&b.debug&&(b.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),v.verbose.apply(console,arguments)))},error:function(){v.error=Function.prototype.bind.call(console.error,console,b.name+":"),v.error.apply(console,arguments)},performance:{log:function(a){var c,d,e;b.performance&&(c=(new Date).getTime(),e=h||c,d=c-e,h=c,i.push({Element:x,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,100)},display:function(){var c=b.name+":",e=0;h=!1,clearTimeout(v.performance.timer),a.each(i,function(a,b){e+=b["Execution Time"]}),c+=" "+e+"ms",g&&(c+=" '"+g+"'"),f.size()>1&&(c+=" ("+f.size()+")"),(console.group!==d||console.table!==d)&&i.length>0&&(console.groupCollapsed(c),console.table?console.table(i):a.each(i,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),i=[]}},invoke:function(b,c,f){var g,h,i;return c=c||l,f=x||f,"string"==typeof b&&n!==d&&(b=b.split(/[\. ]/),g=b.length-1,a.each(b,function(c,e){var f=c!=g?e+b[c+1].charAt(0).toUpperCase()+b[c+1].slice(1):b;if(a.isPlainObject(n[e])&&c!=g)n=n[e];else{if(!a.isPlainObject(n[f])||c==g)return n[e]!==d?(h=n[e],!1):n[f]!==d?(h=n[f],!1):!1;n=n[f]}})),a.isFunction(h)?i=h.apply(f,c):h!==d&&(i=h),a.isArray(e)?e.push(i):"string"==typeof e?e=[e,i]:i!==d&&(e=i),h||!1}},v.initialize()}),e!==d?e:this},a.fn.transition.settings={name:"Transition",debug:!0,verbose:!0,performance:!0,namespace:"transition",complete:function(){},animation:"fade",duration:"700ms",queue:!0,className:{transition:"ui transition",animating:"animating",looping:"looping",loading:"loading",disabled:"disabled",hidden:"hidden",visible:"visible",inward:"in",outward:"out"},error:{noAnimation:"There is no css animation matching the one you specified.",method:"The method you called is not defined"}}}(jQuery,window,document); \ No newline at end of file diff --git a/node/src/files/release/packaged/javascript/semantic.min.js.REMOVED.git-id b/node/src/files/release/packaged/javascript/semantic.min.js.REMOVED.git-id index c6fc85917..c314c4f85 100644 --- a/node/src/files/release/packaged/javascript/semantic.min.js.REMOVED.git-id +++ b/node/src/files/release/packaged/javascript/semantic.min.js.REMOVED.git-id @@ -1 +1 @@ -23262ca8224c22eabdf0aa14126f4a5c01b2afed \ No newline at end of file +57e8d3bf3bf3892a23e67b9eef04f1ee68496019 \ No newline at end of file diff --git a/node/src/files/release/semantic.zip.REMOVED.git-id b/node/src/files/release/semantic.zip.REMOVED.git-id index 93b5292f7..48a3db219 100644 --- a/node/src/files/release/semantic.zip.REMOVED.git-id +++ b/node/src/files/release/semantic.zip.REMOVED.git-id @@ -1 +1 @@ -c8c02edec5a7f3071287724c4ddde9767565d09f \ No newline at end of file +a202f18a1902f23596a8105dc4e148e7a0de32fd \ No newline at end of file diff --git a/node/src/files/release/uncompressed/elements/icon.css b/node/src/files/release/uncompressed/elements/icon.css index 4f9ed454d..d893ecfb0 100644 --- a/node/src/files/release/uncompressed/elements/icon.css +++ b/node/src/files/release/uncompressed/elements/icon.css @@ -220,10 +220,6 @@ i.icon.block:before { content: '🚫'; } /* '\1f6ab' */ -i.icon.book:before { - content: '📖'; -} -/* '\1f4d6' */ i.icon.book:before { content: '\f4d6'; } diff --git a/node/src/files/release/uncompressed/modules/dropdown.js b/node/src/files/release/uncompressed/modules/dropdown.js index 7285e4993..34241f703 100644 --- a/node/src/files/release/uncompressed/modules/dropdown.js +++ b/node/src/files/release/uncompressed/modules/dropdown.js @@ -349,7 +349,12 @@ $.fn.dropdown = function(parameters) { callback(); } else if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' in', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' in', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'slide down') { $currentMenu @@ -392,7 +397,12 @@ $.fn.dropdown = function(parameters) { if(dropdown.is.visible($currentMenu) ) { dropdown.verbose('Doing menu hide animation', $currentMenu); if($.fn.transition !== undefined) { - $currentMenu.transition(settings.transition + ' out', settings.duration, callback); + $currentMenu.transition({ + animation : settings.transition + ' out', + duration : settings.duration, + complete : callback, + queue : false + }) } else if(settings.transition == 'none') { callback(); diff --git a/node/src/files/release/uncompressed/modules/transition.js b/node/src/files/release/uncompressed/modules/transition.js index 19e26c107..40b5d0524 100644 --- a/node/src/files/release/uncompressed/modules/transition.js +++ b/node/src/files/release/uncompressed/modules/transition.js @@ -101,7 +101,9 @@ $.fn.transition = function() { settings = overrideSettings || settings; module.debug('Preparing animation', settings.animation); if(module.is.animating()) { - module.queue(settings.animation); + if(settings.queue) { + module.queue(settings.animation); + } return false; } module.save.conditions(); @@ -621,6 +623,9 @@ $.fn.transition.settings = { animation : 'fade', duration : '700ms', + // queue up animations + queue : true, + className : { transition : 'ui transition', animating : 'animating',