Browse Source

checks in dropdown changes from iphone branch

Former-commit-id: a3404a34a9
Former-commit-id: 556ddfadc9
pull/258/head
Jack Lukic 11 years ago
parent
commit
a84d57dcac
12 changed files with 49 additions and 286 deletions
  1. 62
      build/minified/modules/dropdown.js
  2. 2
      build/minified/modules/dropdown.min.css
  3. 2
      build/minified/modules/dropdown.min.js
  4. 62
      build/packaged/modules/dropdown.js
  5. 2
      build/packaged/semantic.min.css.REMOVED.git-id
  6. 2
      build/packaged/semantic.min.js.REMOVED.git-id
  7. 5
      build/uncompressed/modules/dropdown.css
  8. 62
      build/uncompressed/modules/dropdown.js
  9. 5
      node/src/files/components/semantic/modules/dropdown.css
  10. 62
      node/src/files/components/semantic/modules/dropdown.js
  11. 62
      src/modules/dropdown.js
  12. 7
      src/modules/dropdown.less

62
build/minified/modules/dropdown.js

@ -43,8 +43,6 @@ $.fn.dropdown = function(parameters) {
className = settings.className,
namespace = settings.namespace,
animation = settings.animation,
errors = settings.errors,
module
;
@ -78,6 +76,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Checking if click was inside the dropdown', event.target);
if( $(event.target).closest($module).size() == 0 ) {
module.hide();
module.intent.unbind();
}
},
@ -129,70 +128,32 @@ $.fn.dropdown = function(parameters) {
;
},
animate: {
show: function() {
if(animation.show == 'show') {
$menu
.show()
;
}
else if(animation.show == 'slide') {
$menu
.children()
.css('opacity', 0)
.delay(100)
.animate({
opacity : 1
}, 300, 'easeOutQuad')
.end()
.slideDown(200, 'easeOutQuad')
;
}
},
hide: function() {
console.log(animation.hide);
if(animation.hide == 'hide') {
$menu
.hide()
;
}
else if(animation.hide == 'slide') {
$menu
.children()
.css('opacity', 1)
.animate({
opacity : 0
}, 300, 'easeOutQuad')
.end()
.delay(100)
.slideUp(200, 'easeOutQuad')
;
}
}
},
show: function() {
module.debug('Showing dropdown');
module.debug('Enabling dropdown');
$module
.addClass(className.active)
;
module.animate.show();
if( module.can.click() ) {
module.intent.bind();
}
$menu
.show()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onShow, $menu.get())();
},
hide: function() {
module.debug('Hiding dropdown');
module.debug('Disabling dropdown');
$module
.removeClass(className.active)
;
if( module.can.click() ) {
module.intent.unbind();
}
module.animate.hide();
$menu
.hide()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onHide, $menu.get())();
},
@ -358,11 +319,6 @@ $.fn.dropdown.settings = {
verbose : true,
debug : true,
performance : false,
animation: {
show: 'slide',
hide: 'slide'
},
on : 'click',

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

@ -1 +1 @@
.ui.dropdown{position:relative;display:inline-block;line-height:1;white-space:nowrap;-webkit-transition:border-radius .1s ease-out;-moz-transition:border-radius .1s ease-out;-o-transition:border-radius .1s ease-out;-ms-transition:border-radius .1s ease-out;transition:border-radius .1s ease-out}.ui.dropdown .menu{position:absolute;display:none;top:100%;background-color:#FFF;min-width:100%;-webkit-box-shadow:0 2px 0 0 rgba(0,0,0,.1),1px 0 0 0 rgba(0,0,0,.1) inset,-1px 0 0 0 rgba(0,0,0,.1) inset,0 -1px 0 0 rgba(0,0,0,.1) inset;-moz-box-shadow:0 2px 0 0 rgba(0,0,0,.1),1px 0 0 0 rgba(0,0,0,.1) inset,-1px 0 0 0 rgba(0,0,0,.1) inset;box-shadow:0 2px 0 0 rgba(0,0,0,.1),1px 0 0 0 rgba(0,0,0,.1) inset,-1px 0 0 0 rgba(0,0,0,.1) inset,0 -1px 0 0 rgba(0,0,0,.1) inset;-moz-border-radius:0 0 .325em .325em;-webkit-border-radius:0 0 .325em .325em;border-radius:0 0 .325em .325em;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;-ms-transition:opacity .2s ease-out;transition:opacity .2s ease-out;z-index:11}.ui.dropdown .menu{left:0}.ui>.ui.dropdown:last-child .menu{left:auto;right:0}.ui.dropdown .menu .item{cursor:pointer;border:0;border-top:1px solid rgba(0,0,0,.05);font-size:.9em;display:block;color:rgba(0,0,0,.75);padding:.85em 1em;font-size:.9rem;text-transform:none;font-weight:400;text-align:left;-webkit-touch-callout:none}.ui.dropdown .menu .item .icon{margin-right:.75em}.ui.dropdown .menu .item:first-child{border-top:0}.ui.dropdown.visible{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.ui.dropdown .menu .item:hover{background-color:rgba(0,0,0,.02)}.ui.dropdown .menu .active.item{border-top:1px solid rgba(0,0,0,.05);font-weight:700}.ui.simple.dropdown .menu{overflow:hidden;height:0;width:0;position:absolute;opacity:0;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;-ms-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.ui.simple.dropdown:hover .menu{display:block;overflow:visible;min-width:210px;width:100%;height:auto;opacity:1}.ui.selection.dropdown{cursor:pointer;display:inline-block;background-color:#FFF;padding:.5em 1em;line-height:1.33;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1);-moz-box-shadow:0 0 0 1px rgba(0,0,0,.1);box-shadow:0 0 0 1px rgba(0,0,0,.1);-webkit-border-radius:.3125em;-moz-border-radius:.3125em;border-radius:.3125em}.ui.selection.dropdown>.dropdown.icon{float:right;margin:.2em 0 .2em .5em}.ui.selection.dropdown,.ui.selection.dropdown .menu{-webkit-transition:box-shadow .2s ease-out;-moz-transition:box-shadow .2s ease-out;-o-transition:box-shadow .2s ease-out;-ms-transition:box-shadow .2s ease-out;transition:box-shadow .2s ease-out}.ui.selection.dropdown .menu{-webkit-box-shadow:0 1px 0 1px #EEE;-moz-box-shadow:0 1px 0 1px #EEE;box-shadow:0 1px 0 1px #EEE}.ui.selection.dropdown:hover,.ui.selection.dropdown.hover{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);-moz-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.ui.selection.dropdown:hover .menu{-webkit-box-shadow:0 1px 0 1px #D3D3D3;-moz-box-shadow:0 1px 0 1px #D3D3D3;box-shadow:0 1px 0 1px #D3D3D3}
.ui.dropdown{position:relative;display:inline-block;line-height:1;white-space:nowrap}.ui.dropdown .menu{position:absolute;display:none;top:100%;background-color:#FFF;min-width:100%;-webkit-box-shadow:0 2px 0 0 rgba(0,0,0,.1),1px 0 0 0 rgba(0,0,0,.1) inset,-1px 0 0 0 rgba(0,0,0,.1) inset,0 -1px 0 0 rgba(0,0,0,.1) inset;-moz-box-shadow:0 2px 0 0 rgba(0,0,0,.1),1px 0 0 0 rgba(0,0,0,.1) inset,-1px 0 0 0 rgba(0,0,0,.1) inset;box-shadow:0 2px 0 0 rgba(0,0,0,.1),1px 0 0 0 rgba(0,0,0,.1) inset,-1px 0 0 0 rgba(0,0,0,.1) inset,0 -1px 0 0 rgba(0,0,0,.1) inset;-moz-border-radius:0 0 .325em .325em;-webkit-border-radius:0 0 .325em .325em;border-radius:0 0 .325em .325em;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;-ms-transition:opacity .2s ease-out;transition:opacity .2s ease-out;z-index:11}.ui.dropdown .menu{left:0}.ui>.ui.dropdown:last-child .menu{left:auto;right:0}.ui.dropdown .menu .item{cursor:pointer;border:0;border-top:1px solid rgba(0,0,0,.05);font-size:.9em;display:block;color:rgba(0,0,0,.75);padding:.85em 1em;font-size:.9rem;text-transform:none;font-weight:400;text-align:left;-webkit-touch-callout:none}.ui.dropdown .menu .item .icon{margin-right:.75em}.ui.dropdown .menu .item:first-child{border-top:0}.ui.dropdown.visible{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.ui.dropdown .menu .item:hover{background-color:rgba(0,0,0,.02)}.ui.dropdown .menu .active.item{border-top:1px solid rgba(0,0,0,.05);font-weight:700}.ui.simple.dropdown .menu{overflow:hidden;height:0;width:0;position:absolute;opacity:0;-webkit-transition:opacity .2s ease-out;-moz-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;-ms-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.ui.simple.dropdown:hover .menu{display:block;overflow:visible;min-width:210px;width:100%;height:auto;opacity:1}.ui.selection.dropdown{cursor:pointer;display:inline-block;background-color:#FFF;padding:.5em 1em;line-height:1.33;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.1);-moz-box-shadow:0 0 0 1px rgba(0,0,0,.1);box-shadow:0 0 0 1px rgba(0,0,0,.1);-webkit-border-radius:.3125em;-moz-border-radius:.3125em;border-radius:.3125em}.ui.selection.dropdown>.dropdown.icon{float:right;margin:.2em 0 .2em .5em}.ui.selection.dropdown,.ui.selection.dropdown .menu{-webkit-transition:box-shadow .2s ease-out;-moz-transition:box-shadow .2s ease-out;-o-transition:box-shadow .2s ease-out;-ms-transition:box-shadow .2s ease-out;transition:box-shadow .2s ease-out}.ui.selection.dropdown .menu{-webkit-box-shadow:0 1px 0 1px #EEE;-moz-box-shadow:0 1px 0 1px #EEE;box-shadow:0 1px 0 1px #EEE}.ui.selection.dropdown:hover,.ui.selection.dropdown.hover{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.2);-moz-box-shadow:0 0 0 1px rgba(0,0,0,.2);box-shadow:0 0 0 1px rgba(0,0,0,.2)}.ui.selection.dropdown:hover .menu{-webkit-box-shadow:0 1px 0 1px #D3D3D3;-moz-box-shadow:0 1px 0 1px #D3D3D3;box-shadow:0 1px 0 1px #D3D3D3}

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

@ -1 +1 @@
(function(e,t,n,o){e.fn.dropdown=function(t){var a,i=e(this),s=e(n),r=e.extend(!0,{},e.fn.dropdown.settings,t),c="."+r.namespace,l="module-"+r.namespace,u=(i.selector||"",(new Date).getTime()),d=[],f=arguments[0],m="string"==typeof f,p=[].slice.call(arguments,1);return i.each(function(){var t,g=e(this),h=e(this).find(r.selector.menu),v="ontouchstart"in n.documentElement,b=g.selector||"",y=this,x=g.data("module-"+r.namespace),C=r.className,w=r.namespace,T=r.animation,k=r.errors;t={initialize:function(){r.context&&""!==b?(t.verbose("Initializing dropdown with delegated events",g),e(y,r.context).on(b,"click"+c,t.toggle).data(l,t)):(t.verbose("Initializing dropdown with bound events",g),g.on(t.get.event()+c,t.toggle),g.data(l,t))},intent:{test:function(n){t.debug("Checking if click was inside the dropdown",n.target),0==e(n.target).closest(g).size()&&t.hide()},bind:function(){t.verbose("Binding hide intent event to document"),e(n).on("click",t.intent.test)},unbind:function(){t.verbose("Removing hide intent event from document"),s.off("click")}},get:{event:function(){return v?"touchstart":"hover"==r.on?"hover":"click"==r.on?"click":o}},can:{click:function(){return v||"click"==r.on},show:function(){return!g.hasClass(C.disabled)}},destroy:function(){t.verbose("Destroying previous dropdown for",g),g.off(w)},animate:{show:function(){"show"==T.show?h.show():"slide"==T.show&&h.children().css("opacity",0).delay(100).animate({opacity:1},300,"easeOutQuad").end().slideDown(200,"easeOutQuad")},hide:function(){console.log(T.hide),"hide"==T.hide?h.hide():"slide"==T.hide&&h.children().css("opacity",1).animate({opacity:0},300,"easeOutQuad").end().delay(100).slideUp(200,"easeOutQuad")}},show:function(){t.debug("Showing dropdown"),g.addClass(C.active),t.animate.show(),t.can.click()&&t.intent.bind(),e.proxy(r.onChange,h.get())(),e.proxy(r.onShow,h.get())()},hide:function(){t.debug("Hiding dropdown"),g.removeClass(C.active),t.can.click()&&t.intent.unbind(),t.animate.hide(),e.proxy(r.onChange,h.get())(),e.proxy(r.onHide,h.get())()},toggle:function(){t.can.show()&&h.is(":not(:visible)")?t.show():t.hide()},setting:function(t,n){return n===o?r[t]:(e.isPlainObject(t)?e.extend(!0,r,t):r[t]=n,o)},internal:function(n,a){return a===o?t[n]:(e.isPlainObject(n)?e.extend(!0,t,n):t[n]=a,o)},debug:function(){r.debug&&(t.performance.log(arguments[0]),t.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},verbose:function(){r.verbose&&r.debug&&(t.performance.log(arguments[0]),t.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},error:function(){console.log!==o&&(t.error=Function.prototype.bind.call(console.log,console,r.moduleName+":"))},performance:{log:function(e){var n,o,a;r.performance&&(n=(new Date).getTime(),a=u||n,o=n-a,u=n,d.push({Element:y,Name:e,"Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=r.moduleName,n=(r.moduleName+": "+b+"("+i.size()+" elements)",0);b&&(t+="Performance ("+b+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"]}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(n,a,i){var s,r;return a=a||p,i=y||i,"string"==typeof n&&x!==o&&(n=n.split("."),s=n.length-1,e.each(n,function(n,a){return e.isPlainObject(x[a])&&n!=s?(x=x[a],!0):x[a]!==o?(r=x[a],!0):(t.error(k.method),!1)})),e.isFunction(r)?(t.verbose("Executing invoked function",r),r.apply(i,a)):r||!1}},m?(x===o&&t.initialize(),a=t.invoke(f)):(x!==o&&t.destroy(),t.initialize())}),a?a:this},e.fn.dropdown.settings={moduleName:"Dropdown Module",namespace:"dropdown",verbose:!0,debug:!0,performance:!1,animation:{show:"slide",hide:"slide"},on:"click",onChange:function(){},onShow:function(){},onHide:function(){},errors:{method:"The method you called is not defined."},selector:{menu:".menu"},className:{active:"visible"}}})(jQuery,window,document);
(function(e,t,n,o){e.fn.dropdown=function(t){var a,i=e(this),s=e(n),r=e.extend(!0,{},e.fn.dropdown.settings,t),c="."+r.namespace,l="module-"+r.namespace,u=(i.selector||"",(new Date).getTime()),d=[],f=arguments[0],m="string"==typeof f,p=[].slice.call(arguments,1);return i.each(function(){var t,g=e(this),h=e(this).find(r.selector.menu),v="ontouchstart"in n.documentElement,b=g.selector||"",y=this,x=g.data("module-"+r.namespace),C=r.className,w=r.namespace,T=r.errors;t={initialize:function(){r.context&&""!==b?(t.verbose("Initializing dropdown with delegated events",g),e(y,r.context).on(b,"click"+c,t.toggle).data(l,t)):(t.verbose("Initializing dropdown with bound events",g),g.on(t.get.event()+c,t.toggle),g.data(l,t))},intent:{test:function(n){t.debug("Checking if click was inside the dropdown",n.target),0==e(n.target).closest(g).size()&&(t.hide(),t.intent.unbind())},bind:function(){t.verbose("Binding hide intent event to document"),e(n).on("click",t.intent.test)},unbind:function(){t.verbose("Removing hide intent event from document"),s.off("click")}},get:{event:function(){return v?"touchstart":"hover"==r.on?"hover":"click"==r.on?"click":o}},can:{click:function(){return v||"click"==r.on},show:function(){return!g.hasClass(C.disabled)}},destroy:function(){t.verbose("Destroying previous dropdown for",g),g.off(w)},show:function(){t.debug("Enabling dropdown"),g.addClass(C.active),t.can.click()&&t.intent.bind(),h.show(),e.proxy(r.onChange,h.get())(),e.proxy(r.onShow,h.get())()},hide:function(){t.debug("Disabling dropdown"),g.removeClass(C.active),t.can.click()&&t.intent.unbind(),h.hide(),e.proxy(r.onChange,h.get())(),e.proxy(r.onHide,h.get())()},toggle:function(){t.can.show()&&h.is(":not(:visible)")?t.show():t.hide()},setting:function(t,n){return n===o?r[t]:(e.isPlainObject(t)?e.extend(!0,r,t):r[t]=n,o)},internal:function(n,a){return a===o?t[n]:(e.isPlainObject(n)?e.extend(!0,t,n):t[n]=a,o)},debug:function(){r.debug&&(t.performance.log(arguments[0]),t.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},verbose:function(){r.verbose&&r.debug&&(t.performance.log(arguments[0]),t.verbose=Function.prototype.bind.call(console.info,console,r.moduleName+":"))},error:function(){console.log!==o&&(t.error=Function.prototype.bind.call(console.log,console,r.moduleName+":"))},performance:{log:function(e){var n,o,a;r.performance&&(n=(new Date).getTime(),a=u||n,o=n-a,u=n,d.push({Element:y,Name:e,"Execution Time":o}),clearTimeout(t.performance.timer),t.performance.timer=setTimeout(t.performance.display,100))},display:function(){var t=r.moduleName,n=(r.moduleName+": "+b+"("+i.size()+" elements)",0);b&&(t+="Performance ("+b+")"),(console.group!==o||console.table!==o)&&d.length>0&&(console.groupCollapsed(t),console.table?(e.each(d,function(e,t){n+=t["Execution Time"]}),console.table(d)):e.each(d,function(e,t){n+=t["Execution Time"]}),console.log("Total Execution Time:",n+"ms"),console.groupEnd(),d=[],u=!1)}},invoke:function(n,a,i){var s,r;return a=a||p,i=y||i,"string"==typeof n&&x!==o&&(n=n.split("."),s=n.length-1,e.each(n,function(n,a){return e.isPlainObject(x[a])&&n!=s?(x=x[a],!0):x[a]!==o?(r=x[a],!0):(t.error(T.method),!1)})),e.isFunction(r)?(t.verbose("Executing invoked function",r),r.apply(i,a)):r||!1}},m?(x===o&&t.initialize(),a=t.invoke(f)):(x!==o&&t.destroy(),t.initialize())}),a?a:this},e.fn.dropdown.settings={moduleName:"Dropdown Module",namespace:"dropdown",verbose:!0,debug:!0,performance:!1,on:"click",onChange:function(){},onShow:function(){},onHide:function(){},errors:{method:"The method you called is not defined."},selector:{menu:".menu"},className:{active:"visible"}}})(jQuery,window,document);

62
build/packaged/modules/dropdown.js

@ -43,8 +43,6 @@ $.fn.dropdown = function(parameters) {
className = settings.className,
namespace = settings.namespace,
animation = settings.animation,
errors = settings.errors,
module
;
@ -78,6 +76,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Checking if click was inside the dropdown', event.target);
if( $(event.target).closest($module).size() == 0 ) {
module.hide();
module.intent.unbind();
}
},
@ -129,70 +128,32 @@ $.fn.dropdown = function(parameters) {
;
},
animate: {
show: function() {
if(animation.show == 'show') {
$menu
.show()
;
}
else if(animation.show == 'slide') {
$menu
.children()
.css('opacity', 0)
.delay(100)
.animate({
opacity : 1
}, 300, 'easeOutQuad')
.end()
.slideDown(200, 'easeOutQuad')
;
}
},
hide: function() {
console.log(animation.hide);
if(animation.hide == 'hide') {
$menu
.hide()
;
}
else if(animation.hide == 'slide') {
$menu
.children()
.css('opacity', 1)
.animate({
opacity : 0
}, 300, 'easeOutQuad')
.end()
.delay(100)
.slideUp(200, 'easeOutQuad')
;
}
}
},
show: function() {
module.debug('Showing dropdown');
module.debug('Enabling dropdown');
$module
.addClass(className.active)
;
module.animate.show();
if( module.can.click() ) {
module.intent.bind();
}
$menu
.show()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onShow, $menu.get())();
},
hide: function() {
module.debug('Hiding dropdown');
module.debug('Disabling dropdown');
$module
.removeClass(className.active)
;
if( module.can.click() ) {
module.intent.unbind();
}
module.animate.hide();
$menu
.hide()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onHide, $menu.get())();
},
@ -358,11 +319,6 @@ $.fn.dropdown.settings = {
verbose : true,
debug : true,
performance : false,
animation: {
show: 'slide',
hide: 'slide'
},
on : 'click',

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

@ -1 +1 @@
b0ec8166f714ced9d33f7a1951b95fabfd537e30
67e767ce61bac3a5045ed75a974591d2d59053c3

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

@ -1 +1 @@
ae771e69f8c7c57ef0ea00bb2ff842350427a102
55e5c21cef882a0f0d223c3d2ed4fdb8dc861237

5
build/uncompressed/modules/dropdown.css

@ -17,11 +17,6 @@
display: inline-block;
line-height: 1;
white-space: nowrap;
-webkit-transition: border-radius 0.1s ease-out;
-moz-transition: border-radius 0.1s ease-out;
-o-transition: border-radius 0.1s ease-out;
-ms-transition: border-radius 0.1s ease-out;
transition: border-radius 0.1s ease-out;
}
.ui.dropdown .menu {
position: absolute;

62
build/uncompressed/modules/dropdown.js

@ -43,8 +43,6 @@ $.fn.dropdown = function(parameters) {
className = settings.className,
namespace = settings.namespace,
animation = settings.animation,
errors = settings.errors,
module
;
@ -78,6 +76,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Checking if click was inside the dropdown', event.target);
if( $(event.target).closest($module).size() == 0 ) {
module.hide();
module.intent.unbind();
}
},
@ -129,70 +128,32 @@ $.fn.dropdown = function(parameters) {
;
},
animate: {
show: function() {
if(animation.show == 'show') {
$menu
.show()
;
}
else if(animation.show == 'slide') {
$menu
.children()
.css('opacity', 0)
.delay(100)
.animate({
opacity : 1
}, 300, 'easeOutQuad')
.end()
.slideDown(200, 'easeOutQuad')
;
}
},
hide: function() {
console.log(animation.hide);
if(animation.hide == 'hide') {
$menu
.hide()
;
}
else if(animation.hide == 'slide') {
$menu
.children()
.css('opacity', 1)
.animate({
opacity : 0
}, 300, 'easeOutQuad')
.end()
.delay(100)
.slideUp(200, 'easeOutQuad')
;
}
}
},
show: function() {
module.debug('Showing dropdown');
module.debug('Enabling dropdown');
$module
.addClass(className.active)
;
module.animate.show();
if( module.can.click() ) {
module.intent.bind();
}
$menu
.show()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onShow, $menu.get())();
},
hide: function() {
module.debug('Hiding dropdown');
module.debug('Disabling dropdown');
$module
.removeClass(className.active)
;
if( module.can.click() ) {
module.intent.unbind();
}
module.animate.hide();
$menu
.hide()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onHide, $menu.get())();
},
@ -358,11 +319,6 @@ $.fn.dropdown.settings = {
verbose : true,
debug : true,
performance : false,
animation: {
show: 'slide',
hide: 'slide'
},
on : 'click',

5
node/src/files/components/semantic/modules/dropdown.css

@ -17,11 +17,6 @@
display: inline-block;
line-height: 1;
white-space: nowrap;
-webkit-transition: border-radius 0.1s ease-out;
-moz-transition: border-radius 0.1s ease-out;
-o-transition: border-radius 0.1s ease-out;
-ms-transition: border-radius 0.1s ease-out;
transition: border-radius 0.1s ease-out;
}
.ui.dropdown .menu {
position: absolute;

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

@ -43,8 +43,6 @@ $.fn.dropdown = function(parameters) {
className = settings.className,
namespace = settings.namespace,
animation = settings.animation,
errors = settings.errors,
module
;
@ -78,6 +76,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Checking if click was inside the dropdown', event.target);
if( $(event.target).closest($module).size() == 0 ) {
module.hide();
module.intent.unbind();
}
},
@ -129,70 +128,32 @@ $.fn.dropdown = function(parameters) {
;
},
animate: {
show: function() {
if(animation.show == 'show') {
$menu
.show()
;
}
else if(animation.show == 'slide') {
$menu
.children()
.css('opacity', 0)
.delay(100)
.animate({
opacity : 1
}, 300, 'easeOutQuad')
.end()
.slideDown(200, 'easeOutQuad')
;
}
},
hide: function() {
console.log(animation.hide);
if(animation.hide == 'hide') {
$menu
.hide()
;
}
else if(animation.hide == 'slide') {
$menu
.children()
.css('opacity', 1)
.animate({
opacity : 0
}, 300, 'easeOutQuad')
.end()
.delay(100)
.slideUp(200, 'easeOutQuad')
;
}
}
},
show: function() {
module.debug('Showing dropdown');
module.debug('Enabling dropdown');
$module
.addClass(className.active)
;
module.animate.show();
if( module.can.click() ) {
module.intent.bind();
}
$menu
.show()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onShow, $menu.get())();
},
hide: function() {
module.debug('Hiding dropdown');
module.debug('Disabling dropdown');
$module
.removeClass(className.active)
;
if( module.can.click() ) {
module.intent.unbind();
}
module.animate.hide();
$menu
.hide()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onHide, $menu.get())();
},
@ -358,11 +319,6 @@ $.fn.dropdown.settings = {
verbose : true,
debug : true,
performance : false,
animation: {
show: 'slide',
hide: 'slide'
},
on : 'click',

62
src/modules/dropdown.js

@ -43,8 +43,6 @@ $.fn.dropdown = function(parameters) {
className = settings.className,
namespace = settings.namespace,
animation = settings.animation,
errors = settings.errors,
module
;
@ -78,6 +76,7 @@ $.fn.dropdown = function(parameters) {
module.debug('Checking if click was inside the dropdown', event.target);
if( $(event.target).closest($module).size() == 0 ) {
module.hide();
module.intent.unbind();
}
},
@ -129,70 +128,32 @@ $.fn.dropdown = function(parameters) {
;
},
animate: {
show: function() {
if(animation.show == 'show') {
$menu
.show()
;
}
else if(animation.show == 'slide') {
$menu
.children()
.css('opacity', 0)
.delay(100)
.animate({
opacity : 1
}, 300, 'easeOutQuad')
.end()
.slideDown(200, 'easeOutQuad')
;
}
},
hide: function() {
console.log(animation.hide);
if(animation.hide == 'hide') {
$menu
.hide()
;
}
else if(animation.hide == 'slide') {
$menu
.children()
.css('opacity', 1)
.animate({
opacity : 0
}, 300, 'easeOutQuad')
.end()
.delay(100)
.slideUp(200, 'easeOutQuad')
;
}
}
},
show: function() {
module.debug('Showing dropdown');
module.debug('Enabling dropdown');
$module
.addClass(className.active)
;
module.animate.show();
if( module.can.click() ) {
module.intent.bind();
}
$menu
.show()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onShow, $menu.get())();
},
hide: function() {
module.debug('Hiding dropdown');
module.debug('Disabling dropdown');
$module
.removeClass(className.active)
;
if( module.can.click() ) {
module.intent.unbind();
}
module.animate.hide();
$menu
.hide()
;
$.proxy(settings.onChange, $menu.get())();
$.proxy(settings.onHide, $menu.get())();
},
@ -358,11 +319,6 @@ $.fn.dropdown.settings = {
verbose : true,
debug : true,
performance : false,
animation: {
show: 'slide',
hide: 'slide'
},
on : 'click',

7
src/modules/dropdown.less

@ -21,12 +21,6 @@
line-height: 1;
white-space: nowrap;
-webkit-transition: border-radius 0.1s ease-out;
-moz-transition: border-radius 0.1s ease-out;
-o-transition: border-radius 0.1s ease-out;
-ms-transition: border-radius 0.1s ease-out;
transition: border-radius 0.1s ease-out;
}
.ui.dropdown .menu {
@ -122,7 +116,6 @@
Variations
*******************************/
/*--------------
Simple
---------------*/

Loading…
Cancel
Save