Browse Source

Merge branch 'next' of github.com:Semantic-Org/Semantic-UI

pull/1944/head
jlukic 9 years ago
parent
commit
f218034ab5
6 changed files with 50 additions and 24 deletions
  1. 11
      RELEASE-NOTES.md
  2. 1
      src/definitions/collections/grid.less
  3. 43
      src/definitions/modules/dropdown.js
  4. 8
      src/definitions/modules/dropdown.less
  5. 6
      src/definitions/modules/transition.js
  6. 5
      src/themes/default/modules/dropdown.variables

11
RELEASE-NOTES.md

@ -1,5 +1,16 @@
## RELEASE NOTES
### Version 1.11.1 - March 5, 2015
**Enhancements**
- **Dropdown** - Calling behaviors on a dropdown `select` will now automatically route them to the appropriate parent `ui dropdown`
**Bugs**
- **Grid** - Fix issue in `centered grid` not centering `column` inside `row`
- **Dropdown** - Added select styles for elements before they are initialized instead of FOIC (Flash of invisible content)
### Version 1.11.0 - March 3, 2015
**New Components**

1
src/definitions/collections/grid.less

@ -952,7 +952,6 @@
}
.ui.centered.grid > .column:not(.aligned):not(.row),
.ui.centered.grid > .row > .column:not(.aligned),
.ui.centered.grid > .row:not(.centered),
.ui.grid .centered.row > .column:not(.aligned) {
text-align: left;
}

43
src/definitions/modules/dropdown.js

@ -75,25 +75,25 @@ $.fn.dropdown = function(parameters) {
module.debug('Initializing dropdown', settings);
if( module.is.alreadySetup() ) {
module.error(error.alreadySetup);
module.setup.reference();
}
else {
module.setup.layout();
}
module.save.defaults();
module.set.selected();
module.save.defaults();
module.set.selected();
module.create.id();
module.create.id();
if(hasTouch) {
module.bind.touchEvents();
}
module.bind.mouseEvents();
module.bind.keyboardEvents();
if(hasTouch) {
module.bind.touchEvents();
}
module.bind.mouseEvents();
module.bind.keyboardEvents();
module.observeChanges();
module.instantiate();
module.observeChanges();
module.instantiate();
}
},
instantiate: function() {
@ -161,7 +161,6 @@ $.fn.dropdown = function(parameters) {
},
setup: {
layout: function() {
if( $module.is('select') ) {
module.setup.select();
@ -212,6 +211,21 @@ $.fn.dropdown = function(parameters) {
;
}
module.refresh();
},
reference: function() {
var
index = $allModules.index($module),
$firstModules,
$lastModules
;
module.debug('Dropdown behavior was called on select, replacing with closest dropdown');
// replace module reference
$module = $module.parent(selector.dropdown);
module.refresh();
// adjust all modules
$firstModules = $allModules.slice(0, index);
$lastModules = $allModules.slice(index + 1);
$allModules = $firstModules.add($module).add($lastModules);
}
},
@ -1647,10 +1661,9 @@ $.fn.dropdown = function(parameters) {
}
})
;
return (returnedValue !== undefined)
? returnedValue
: this
: $allModules
;
};

8
src/definitions/modules/dropdown.less

@ -348,10 +348,10 @@
}
select.ui.dropdown {
height: @selectPreInitHeight;
padding: 0em;
margin: 0em;
visibility: hidden;
height: @selectHeight;
padding: @selectPadding;
border: @selectBorder;
visibility: @selectVisibility;
}
.ui.selection.dropdown > .text {
margin-right: @selectionTextIconDistance;

6
src/definitions/modules/transition.js

@ -205,7 +205,7 @@ $.fn.transition = function() {
},
complete: function (event) {
module.verbose('CSS animation complete', settings.animation);
module.debug('Animation complete', settings.animation);
module.remove.completeCallback();
module.remove.failSafe();
if(!module.is.looping()) {
@ -285,8 +285,8 @@ $.fn.transition = function() {
? duration + 'ms'
: duration
;
module.verbose('Setting animation duration', duration);
if(duration || duration === 0) {
module.verbose('Setting animation duration', duration);
$module
.css({
'-webkit-animation-duration': duration,
@ -851,7 +851,7 @@ $.fn.transition = function() {
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 600);
module.performance.timer = setTimeout(module.performance.display, 100);
},
display: function() {
var

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

@ -120,7 +120,10 @@
@selectionZIndex: 10;
/* <select> */
@selectPreInitHeight: 38px;
@selectBorder: 1px solid @borderColor;
@selectPadding: 0.5em;
@selectVisibility: visible;
@selectHeight: 38px;
@selectionTextIconDistance: 2em;
@selectionTextColor: @textColor;

Loading…
Cancel
Save