Browse Source

Fixing min-height issues

pull/2209/head
jlukic 9 years ago
parent
commit
586ff85796
2 changed files with 14 additions and 10 deletions
  1. 8
      src/definitions/modules/dropdown.js
  2. 16
      src/themes/default/modules/dropdown.variables

8
src/definitions/modules/dropdown.js

@ -1230,6 +1230,9 @@ $.fn.dropdown = function(parameters) {
query: function() { query: function() {
return $.trim($search.val()); return $.trim($search.val());
}, },
searchWidth: function(characterCount) {
return (characterCount * settings.glyphWidth) + 'em';
},
selectionCount: function() { selectionCount: function() {
var var
values = module.get.values() values = module.get.values()
@ -1596,8 +1599,8 @@ $.fn.dropdown = function(parameters) {
? module.get.query() ? module.get.query()
: '', : '',
hasSearchValue = (typeof searchValue === 'string' && searchValue.length > 0), hasSearchValue = (typeof searchValue === 'string' && searchValue.length > 0),
searchWidth = (searchValue.length * settings.glyphWidth) + 'em',
valueIsSet = $input.val() !== ''
searchWidth = module.get.searchWidth(searchValue.length),
valueIsSet = searchValue !== ''
; ;
if(isMultiple && hasSearchValue) { if(isMultiple && hasSearchValue) {
module.verbose('Adjusting input width', searchWidth, settings.glyphWidth); module.verbose('Adjusting input width', searchWidth, settings.glyphWidth);
@ -2034,6 +2037,7 @@ $.fn.dropdown = function(parameters) {
searchTerm: function() { searchTerm: function() {
module.verbose('Cleared search term'); module.verbose('Cleared search term');
$search.val(''); $search.val('');
module.set.filtered();
}, },
selected: function(value) { selected: function(value) {
var var

16
src/themes/default/modules/dropdown.variables

@ -91,7 +91,7 @@
@menuInputPadding: @menuInputVerticalPadding @menuInputHorizontalPadding; @menuInputPadding: @menuInputVerticalPadding @menuInputHorizontalPadding;
/* Menu Image */ /* Menu Image */
@menuImageMaxHeight: 2.5em;
@menuImageMaxHeight: 2em;
/* Item Sub-Element */ /* Item Sub-Element */
@itemElementFloat: none; @itemElementFloat: none;
@ -227,14 +227,14 @@
/* Multiple */ /* Multiple */
/* Split Actual Padding Between Child and Group (allows for label spacing) */
@multipleSelectionVerticalPadding: (@searchSelectionVerticalPadding * (4/9));
/* Split Actual Padding Between Child and Parent (allows for label spacing) */
@multipleSelectionVerticalPadding: (@searchSelectionVerticalPadding * (1/3));
@multipleSelectionLeftPadding: (@selectionHorizontalPadding - @labelHorizontalPadding); @multipleSelectionLeftPadding: (@selectionHorizontalPadding - @labelHorizontalPadding);
@multipleSelectionRightPadding: @selectionIconDistance; @multipleSelectionRightPadding: @selectionIconDistance;
@multipleSelectionPadding: @multipleSelectionVerticalPadding @multipleSelectionRightPadding @multipleSelectionVerticalPadding @multipleSelectionLeftPadding; @multipleSelectionPadding: @multipleSelectionVerticalPadding @multipleSelectionRightPadding @multipleSelectionVerticalPadding @multipleSelectionLeftPadding;
/* Child Elements */ /* Child Elements */
@multipleSelectionChildVerticalMargin: (@searchSelectionVerticalPadding * (5/9));
@multipleSelectionChildVerticalMargin: (@searchSelectionVerticalPadding * (2/3));
@multipleSelectionChildSpacing: 0.4285em; @multipleSelectionChildSpacing: 0.4285em;
@multipleSelectionChildMargin: @multipleSelectionChildVerticalMargin 0em @multipleSelectionChildVerticalMargin @multipleSelectionChildSpacing; @multipleSelectionChildMargin: @multipleSelectionChildVerticalMargin 0em @multipleSelectionChildVerticalMargin @multipleSelectionChildSpacing;
@multipleSelectionChildLineHeight: @searchSelectionLineHeight; @multipleSelectionChildLineHeight: @searchSelectionLineHeight;
@ -245,13 +245,13 @@
@multipleSelectionDropdownIconPadding: 0.5em; @multipleSelectionDropdownIconPadding: 0.5em;
/* Selection Label */ /* Selection Label */
@labelSize: @relativeSmall;
@labelHorizontalSpacing: 0.46153em; /* 6px @ 13px/em */
@labelVerticalSpacing: (0.46153em / 2);
@labelSize: @relativeMedium;
@labelHorizontalSpacing: 0.2857142rem; /* 4px @ 14px/rem */
@labelVerticalSpacing: (0.2857142em / 2);
@labelMargin: @labelVerticalSpacing @labelHorizontalSpacing @labelVerticalSpacing 0em; @labelMargin: @labelVerticalSpacing @labelHorizontalSpacing @labelVerticalSpacing 0em;
@labelBoxShadow: 0px 0px 0px 1px @borderColor inset; @labelBoxShadow: 0px 0px 0px 1px @borderColor inset;
@labelVerticalPadding: 0.3846em; /* 5px @ 13px/em */
@labelVerticalPadding: 0.35714em; /* 5px @ 14px/em */
@labelHorizontalPadding: @relativeMini; @labelHorizontalPadding: @relativeMini;
@labelPadding: @labelVerticalPadding @labelHorizontalPadding; @labelPadding: @labelVerticalPadding @labelHorizontalPadding;

Loading…
Cancel
Save