|
@ -12923,6 +12923,8 @@ $.fn.search = function(parameters) { |
|
|
element = this, |
|
|
element = this, |
|
|
instance = $module.data(moduleNamespace), |
|
|
instance = $module.data(moduleNamespace), |
|
|
|
|
|
|
|
|
|
|
|
disabledBubbled = false, |
|
|
|
|
|
|
|
|
module |
|
|
module |
|
|
; |
|
|
; |
|
|
|
|
|
|
|
@ -13030,8 +13032,13 @@ $.fn.search = function(parameters) { |
|
|
if(module.resultsClicked) { |
|
|
if(module.resultsClicked) { |
|
|
module.debug('Determining if user action caused search to close'); |
|
|
module.debug('Determining if user action caused search to close'); |
|
|
$module |
|
|
$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(); |
|
|
callback(); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -13054,7 +13061,9 @@ $.fn.search = function(parameters) { |
|
|
var |
|
|
var |
|
|
$result = $(this), |
|
|
$result = $(this), |
|
|
$title = $result.find(selector.title).eq(0), |
|
|
$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, |
|
|
href = $link.attr('href') || false, |
|
|
target = $link.attr('target') || false, |
|
|
target = $link.attr('target') || false, |
|
|
title = $title.html(), |
|
|
title = $title.html(), |
|
@ -13069,6 +13078,7 @@ $.fn.search = function(parameters) { |
|
|
if( $.isFunction(settings.onSelect) ) { |
|
|
if( $.isFunction(settings.onSelect) ) { |
|
|
if(settings.onSelect.call(element, result, results) === false) { |
|
|
if(settings.onSelect.call(element, result, results) === false) { |
|
|
module.debug('Custom onSelect callback cancelled default select action'); |
|
|
module.debug('Custom onSelect callback cancelled default select action'); |
|
|
|
|
|
disabledBubbled = true; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -13216,6 +13226,9 @@ $.fn.search = function(parameters) { |
|
|
hidden: function() { |
|
|
hidden: function() { |
|
|
return $results.hasClass(className.hidden); |
|
|
return $results.hasClass(className.hidden); |
|
|
}, |
|
|
}, |
|
|
|
|
|
inMessage: function(event) { |
|
|
|
|
|
return (event.target && $(event.target).closest(selector.message).length > 0); |
|
|
|
|
|
}, |
|
|
empty: function() { |
|
|
empty: function() { |
|
|
return ($results.html() === ''); |
|
|
return ($results.html() === ''); |
|
|
}, |
|
|
}, |
|
@ -14083,6 +14096,7 @@ $.fn.search.settings = { |
|
|
prompt : '.prompt', |
|
|
prompt : '.prompt', |
|
|
searchButton : '.search.button', |
|
|
searchButton : '.search.button', |
|
|
results : '.results', |
|
|
results : '.results', |
|
|
|
|
|
message : '.results > .message', |
|
|
category : '.category', |
|
|
category : '.category', |
|
|
result : '.result', |
|
|
result : '.result', |
|
|
title : '.title, .name' |
|
|
title : '.title, .name' |
|
|