Browse Source

Ability to disable dropdown without destroy it.

pull/1615/head
Pavel Sysolyatin 9 years ago
parent
commit
ed251dd226
2 changed files with 12 additions and 2 deletions
  1. 4
      src/definitions/modules/dropdown.js
  2. 10
      src/definitions/modules/dropdown.less

4
src/definitions/modules/dropdown.js

@ -219,7 +219,7 @@ $.fn.dropdown = function(parameters) {
? callback
: function(){}
;
if( !module.is.active() && !module.is.allFiltered() ) {
if( module.can.show() && !module.is.active() && !module.is.allFiltered() ) {
module.debug('Showing dropdown');
module.animate.show(function() {
if( module.can.click() ) {
@ -1635,4 +1635,4 @@ $.extend( $.easing, {
});
})( jQuery, window , document );
})( jQuery, window , document );

10
src/definitions/modules/dropdown.less

@ -439,6 +439,16 @@ select.ui.dropdown {
box-shadow: @selectionHoverBoxShadow;
}
/* Disabled */
.ui.selection.dropdown.disabled,
.ui.selection.dropdown.disabled:hover {
cursor: default;
box-shadow: none;
color: @selectionTextColor;
border: @selectionBorder;
opacity: 0.3 !important;
}
/* Visible Hover */
.ui.selection.visible.dropdown:hover {
border-color: @selectionVisibleHoverBorderColor;

Loading…
Cancel
Save