|
|
@ -2544,6 +2544,9 @@ $.fn.dropdown = function(parameters) { |
|
|
|
input: function() { |
|
|
|
return ($input.length > 0); |
|
|
|
}, |
|
|
|
items: function() { |
|
|
|
return ($item.length > 0); |
|
|
|
}, |
|
|
|
menu: function() { |
|
|
|
return ($menu.length > 0); |
|
|
|
}, |
|
|
@ -2589,6 +2592,9 @@ $.fn.dropdown = function(parameters) { |
|
|
|
: $menu.transition && $menu.transition('is animating') |
|
|
|
; |
|
|
|
}, |
|
|
|
disabled: function() { |
|
|
|
$module.hasClass(className.disabled); |
|
|
|
}, |
|
|
|
focused: function() { |
|
|
|
return (document.activeElement === $module[0]); |
|
|
|
}, |
|
|
@ -2700,7 +2706,7 @@ $.fn.dropdown = function(parameters) { |
|
|
|
return (hasTouch || settings.on == 'click'); |
|
|
|
}, |
|
|
|
show: function() { |
|
|
|
return !$module.hasClass(className.disabled) && $item.length > 0; |
|
|
|
return !module.is.disabled() && (module.has.items() || module.has.message()); |
|
|
|
}, |
|
|
|
useAPI: function() { |
|
|
|
return $.fn.api !== undefined; |
|
|
@ -2810,14 +2816,18 @@ $.fn.dropdown = function(parameters) { |
|
|
|
}, |
|
|
|
|
|
|
|
hideAndClear: function() { |
|
|
|
if(module.has.search()) { |
|
|
|
if( module.has.maxSelections() ) { |
|
|
|
module.remove.searchTerm(); |
|
|
|
module.hide(function() { |
|
|
|
module.remove.filteredItem(); |
|
|
|
}); |
|
|
|
} |
|
|
|
else { |
|
|
|
module.hide(); |
|
|
|
if(module.has.search()) { |
|
|
|
module.hide(function() { |
|
|
|
module.remove.filteredItem(); |
|
|
|
}); |
|
|
|
} |
|
|
|
else { |
|
|
|
module.hide(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|