Browse Source

Iteration on dropdown tweak list

pull/2209/head
jlukic 10 years ago
parent
commit
2198d01247
3 changed files with 17 additions and 13 deletions
  1. 16
      src/definitions/modules/dropdown.js
  2. 1
      src/definitions/modules/dropdown.less
  3. 13
      src/themes/default/modules/dropdown.variables

16
src/definitions/modules/dropdown.js

@ -88,15 +88,17 @@ $.fn.dropdown = function(parameters) {
module.set.selected();
if(settings.allowAdditions && module.is.multiple()) {
if(!settings.useLabels) {
module.error(error.labels);
settings.useLabels = true;
if(module.is.multiple()) {
if(settings.allowAdditions) {
if(!settings.useLabels) {
module.error(error.labels);
settings.useLabels = true;
}
module.create.userLabels();
}
module.create.userLabels();
module.check.maxSelections();
}
module.create.id();
if(hasTouch) {
@ -373,7 +375,7 @@ $.fn.dropdown = function(parameters) {
module.verbose('Finding other dropdowns to hide');
$allModules
.not($module)
.has(selector.menu + ':visible:not(.' + className.animating + ')')
.has(selector.menu + '.' + className.visible)
.dropdown('hide')
;
},

1
src/definitions/modules/dropdown.less

@ -628,6 +628,7 @@ select.ui.dropdown {
font-size: @labelSize;
padding: @labelPadding;
margin: @labelMargin;
box-shadow: @labelBoxShadow;
}
/* Dropdown Icon */

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

@ -128,7 +128,7 @@
@selectionPadding: @selectionVerticalPadding @selectionIconDistance @selectionVerticalPadding @selectionHorizontalPadding;
@selectionZIndex: 10;
@selectionItemDivider: 1px solid rgba(0, 0, 0, 0.05);
@selectionItemDivider: 1px solid @darkWhite;
@selectionMessagePadding: @selectionItemPadding;
/* <select> */
@ -228,13 +228,13 @@
/* Multiple */
/* Split Actual Padding Between Child and Group (allows for label spacing) */
@multipleSelectionVerticalPadding: (@searchSelectionVerticalPadding * (1/3));
@multipleSelectionVerticalPadding: (@searchSelectionVerticalPadding * (4/9));
@multipleSelectionLeftPadding: (@selectionHorizontalPadding - @labelHorizontalPadding);
@multipleSelectionRightPadding: @selectionIconDistance;
@multipleSelectionPadding: @multipleSelectionVerticalPadding @multipleSelectionRightPadding @multipleSelectionVerticalPadding @multipleSelectionLeftPadding;
/* Child Elements */
@multipleSelectionChildVerticalMargin: (@searchSelectionVerticalPadding * (2/3));
@multipleSelectionChildVerticalMargin: (@searchSelectionVerticalPadding * (5/9));
@multipleSelectionChildSpacing: 0.4285em;
@multipleSelectionChildMargin: @multipleSelectionChildVerticalMargin 0em @multipleSelectionChildVerticalMargin @multipleSelectionChildSpacing;
@multipleSelectionChildLineHeight: @searchSelectionLineHeight;
@ -242,13 +242,14 @@
/* Dropdown Icon */
@multipleSelectionDropdownIconMargin: 0em -@labelHorizontalPadding 0em 0em;
@multipleSelectionDropdownIconPadding: @labelPadding;
@multipleSelectionDropdownIconPadding: 0.5em;
/* Selection Label */
@labelSize: @relativeSmall;
@labelHorizontalSpacing: 0.5em;
@labelVerticalSpacing: (0.46153em / 2); /* 6px @ 13em */
@labelHorizontalSpacing: 0.46153em; /* 6px @ 13px/em */
@labelVerticalSpacing: (0.46153em / 2);
@labelMargin: @labelVerticalSpacing @labelHorizontalSpacing @labelVerticalSpacing 0em;
@labelBoxShadow: 0px 0px 0px 1px @borderColor inset;
@labelVerticalPadding: 0.3846em; /* 5px @ 13px/em */
@labelHorizontalPadding: @relativeMini;

Loading…
Cancel
Save