Skip to content

Commit

Permalink
Rebuild dist for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed May 15, 2016
1 parent 10e6752 commit 41b1d14
Show file tree
Hide file tree
Showing 29 changed files with 654 additions and 141 deletions.
37 changes: 26 additions & 11 deletions dist/components/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ $.fn.dropdown = function(parameters) {
if( module.can.click() ) {
module.bind.intent();
}
if(module.has.menuSearch()) {
module.focusSearch();
}
module.set.visible();
callback.call(element);
});
Expand Down Expand Up @@ -827,11 +830,11 @@ $.fn.dropdown = function(parameters) {
},

focusSearch: function(skipHandler) {
if( module.is.search() && !module.is.focusedOnSearch() ) {
if( module.has.search() && !module.is.focusedOnSearch() ) {
if(skipHandler) {
$module.off('focus' + eventNamespace, selector.search);
$search.focus();
$module.on('focus' + eventNamespace, selector.search, module.event.search.focus)
$module.on('focus' + eventNamespace, selector.search, module.event.search.focus);
}
else {
$search.focus();
Expand Down Expand Up @@ -1006,6 +1009,9 @@ $.fn.dropdown = function(parameters) {
? module.show
: module.toggle
;
if(module.is.bubbledLabelClick(event)) {
return;
}
if( module.determine.eventOnElement(event, toggleBehavior) ) {
event.preventDefault();
}
Expand Down Expand Up @@ -1236,8 +1242,8 @@ $.fn.dropdown = function(parameters) {
hasSubMenu = ($subMenu.length> 0),
hasSelectedItem = ($selectedItem.length > 0),
selectedIsSelectable = ($selectedItem.not(selector.unselectable).length > 0),
isAdditionWithoutMenu = (settings.allowAdditions && settings.hideAdditions && pressedKey == keys.enter && selectedIsSelectable),
delimiterPressed = (pressedKey == keys.delimiter && settings.allowAdditions && module.is.multiple()),
isAdditionWithoutMenu = (settings.allowAdditions && settings.hideAdditions && (pressedKey == keys.enter || delimiterPressed) && selectedIsSelectable),
$nextItem,
isSubMenuItem,
newIndex
Expand Down Expand Up @@ -1329,7 +1335,7 @@ $.fn.dropdown = function(parameters) {
.addClass(className.selected)
;
module.set.scrollPosition($nextItem);
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.selectedItem($nextItem);
}
}
Expand All @@ -1356,7 +1362,7 @@ $.fn.dropdown = function(parameters) {
.addClass(className.selected)
;
module.set.scrollPosition($nextItem);
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.activeItem($nextItem);
module.set.selected(module.get.choiceValue($nextItem), $nextItem);
}
Expand Down Expand Up @@ -2068,7 +2074,7 @@ $.fn.dropdown = function(parameters) {
$nextSelectedItem
.addClass(className.selected)
;
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.selectedItem($nextSelectedItem);
}
$menu
Expand Down Expand Up @@ -2257,7 +2263,7 @@ $.fn.dropdown = function(parameters) {
module.set.scrollPosition($nextValue);
$selectedItem.removeClass(className.selected);
$nextValue.addClass(className.selected);
if(settings.selectOnShortcut && module.is.single()) {
if(settings.selectOnKeydown && module.is.single()) {
module.set.selectedItem($nextValue);
}
}
Expand Down Expand Up @@ -2291,7 +2297,7 @@ $.fn.dropdown = function(parameters) {
newValue
;
if(hasInput) {
if(settings.allowReselection && stringValue == currentValue) {
if(!settings.allowReselection && stringValue == currentValue) {
module.verbose('Skipping value update already same value', value, currentValue);
if(!module.is.initialLoad()) {
return;
Expand Down Expand Up @@ -2833,6 +2839,9 @@ $.fn.dropdown = function(parameters) {
},

has: {
menuSearch: function() {
return (module.has.search() && $search.closest($menu).length > 0);
},
search: function() {
return ($search.length > 0);
},
Expand Down Expand Up @@ -2914,6 +2923,9 @@ $.fn.dropdown = function(parameters) {
active: function() {
return $module.hasClass(className.active);
},
bubbledLabelClick: function(event) {
return $(event.target).is('select, input') && $module.closest('label').length > 0;
},
alreadySetup: function() {
return ($module.is('select') && $module.parent(selector.dropdown).length > 0 && $module.prev().length === 0);
},
Expand Down Expand Up @@ -3411,7 +3423,7 @@ $.fn.dropdown.settings = {


apiSettings : false,
selectOnShortcut : true, // Whether selection should occur automatically when keyboard shortcuts used
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
minCharacters : 0, // Minimum characters required to trigger API call
saveRemoteData : true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh
throttle : 200, // How long to wait after last user input to search remotely
Expand Down Expand Up @@ -3546,7 +3558,7 @@ $.fn.dropdown.settings = {
menu : '.menu',
message : '.message',
menuIcon : '.dropdown.icon',
search : 'input.search, .menu > .search > input',
search : 'input.search, .menu > .search > input, .menu input.search',
sizer : '> input.sizer',
text : '> .text:not(.icon)',
unselectable : '.disabled, .filtered'
Expand Down Expand Up @@ -3613,7 +3625,10 @@ $.fn.dropdown.settings.templates = {
html = ''
;
$.each(values, function(index, option) {
html += '<div class="item" data-value="' + option[fields.value] + '">' + option[fields.name] + '</div>';
html += (option.disabled)
? '<div class="disabled item" data-value="' + option[fields.value] + '">' + option[fields.name] + '</div>'
: '<div class="item" data-value="' + option[fields.value] + '">' + option[fields.name] + '</div>'
;
});
return html;
},
Expand Down
4 changes: 2 additions & 2 deletions dist/components/dropdown.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/components/embed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.2.0 - Video
* # Semantic UI 2.2.0 - Embed
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down Expand Up @@ -685,7 +685,7 @@ $.fn.embed.settings = {
},

// NOT YET IMPLEMENTED
api : true,
api : false,
onPause : function() {},
onPlay : function() {},
onStop : function() {}
Expand Down
Loading

0 comments on commit 41b1d14

Please sign in to comment.