Skip to content

Commit

Permalink
Rebuild dist
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed May 15, 2016
1 parent 21d24a0 commit 8b94e93
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 12 deletions.
20 changes: 17 additions & 3 deletions dist/components/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ $.fn.search = function(parameters) {
element = this,
instance = $module.data(moduleNamespace),

disabledBubbled = false,

module
;

Expand Down Expand Up @@ -168,8 +170,13 @@ $.fn.search = function(parameters) {
if(module.resultsClicked) {
module.debug('Determining if user action caused search to close');
$module
.one('click', selector.results, function(event) {
if( !module.is.animating() && !module.is.hidden() ) {
.one('click.close' + eventNamespace, selector.results, function(event) {
if(module.is.inMessage(event) || disabledBubbled) {
$prompt.focus();
return;
}
disabledBubbled = false;
if( !module.is.animating() && !module.is.hidden()) {
callback();
}
})
Expand All @@ -192,7 +199,9 @@ $.fn.search = function(parameters) {
var
$result = $(this),
$title = $result.find(selector.title).eq(0),
$link = $result.find('a[href]').eq(0),
$link = $result.is('a[href]')
? $result
: $result.find('a[href]').eq(0),
href = $link.attr('href') || false,
target = $link.attr('target') || false,
title = $title.html(),
Expand All @@ -207,6 +216,7 @@ $.fn.search = function(parameters) {
if( $.isFunction(settings.onSelect) ) {
if(settings.onSelect.call(element, result, results) === false) {
module.debug('Custom onSelect callback cancelled default select action');
disabledBubbled = true;
return;
}
}
Expand Down Expand Up @@ -354,6 +364,9 @@ $.fn.search = function(parameters) {
hidden: function() {
return $results.hasClass(className.hidden);
},
inMessage: function(event) {
return (event.target && $(event.target).closest(selector.message).length > 0);
},
empty: function() {
return ($results.html() === '');
},
Expand Down Expand Up @@ -1221,6 +1234,7 @@ $.fn.search.settings = {
prompt : '.prompt',
searchButton : '.search.button',
results : '.results',
message : '.results > .message',
category : '.category',
result : '.result',
title : '.title, .name'
Expand Down
2 changes: 1 addition & 1 deletion dist/components/search.min.js

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions dist/semantic.js
Original file line number Diff line number Diff line change
Expand Up @@ -12923,6 +12923,8 @@ $.fn.search = function(parameters) {
element = this,
instance = $module.data(moduleNamespace),

disabledBubbled = false,

module
;

Expand Down Expand Up @@ -13030,8 +13032,13 @@ $.fn.search = function(parameters) {
if(module.resultsClicked) {
module.debug('Determining if user action caused search to close');
$module
.one('click', selector.results, function(event) {
if( !module.is.animating() && !module.is.hidden() ) {
.one('click.close' + eventNamespace, selector.results, function(event) {
if(module.is.inMessage(event) || disabledBubbled) {
$prompt.focus();
return;
}
disabledBubbled = false;
if( !module.is.animating() && !module.is.hidden()) {
callback();
}
})
Expand All @@ -13054,7 +13061,9 @@ $.fn.search = function(parameters) {
var
$result = $(this),
$title = $result.find(selector.title).eq(0),
$link = $result.find('a[href]').eq(0),
$link = $result.is('a[href]')
? $result
: $result.find('a[href]').eq(0),
href = $link.attr('href') || false,
target = $link.attr('target') || false,
title = $title.html(),
Expand All @@ -13069,6 +13078,7 @@ $.fn.search = function(parameters) {
if( $.isFunction(settings.onSelect) ) {
if(settings.onSelect.call(element, result, results) === false) {
module.debug('Custom onSelect callback cancelled default select action');
disabledBubbled = true;
return;
}
}
Expand Down Expand Up @@ -13216,6 +13226,9 @@ $.fn.search = function(parameters) {
hidden: function() {
return $results.hasClass(className.hidden);
},
inMessage: function(event) {
return (event.target && $(event.target).closest(selector.message).length > 0);
},
empty: function() {
return ($results.html() === '');
},
Expand Down Expand Up @@ -14083,6 +14096,7 @@ $.fn.search.settings = {
prompt : '.prompt',
searchButton : '.search.button',
results : '.results',
message : '.results > .message',
category : '.category',
result : '.result',
title : '.title, .name'
Expand Down
10 changes: 5 additions & 5 deletions dist/semantic.min.js

Large diffs are not rendered by default.

0 comments on commit 8b94e93

Please sign in to comment.