diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index ddad01ad2..6f3fd50d9 100644 --- a/RELEASE-NOTES.md +++ b/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** diff --git a/src/definitions/collections/grid.less b/src/definitions/collections/grid.less index f01e5c75b..75d186c79 100755 --- a/src/definitions/collections/grid.less +++ b/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; } diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 0c81df0ce..9c8433666 100644 --- a/src/definitions/modules/dropdown.js +++ b/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 ; }; diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index 5558a445f..d09bcbb32 100755 --- a/src/definitions/modules/dropdown.less +++ b/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; diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index ad8119d9d..7348143f0 100644 --- a/src/definitions/modules/transition.js +++ b/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 diff --git a/src/themes/default/modules/dropdown.variables b/src/themes/default/modules/dropdown.variables index fac32d61e..543002fe9 100644 --- a/src/themes/default/modules/dropdown.variables +++ b/src/themes/default/modules/dropdown.variables @@ -120,7 +120,10 @@ @selectionZIndex: 10; /*