Browse Source

Rebuild dist

pull/3763/merge
Jack Lukic 8 years ago
parent
commit
8b94e938fd
4 changed files with 40 additions and 12 deletions
  1. 20
      dist/components/search.js
  2. 2
      dist/components/search.min.js
  3. 20
      dist/semantic.js
  4. 10
      dist/semantic.min.js

20
dist/components/search.js

@ -61,6 +61,8 @@ $.fn.search = function(parameters) {
element = this, element = this,
instance = $module.data(moduleNamespace), instance = $module.data(moduleNamespace),
disabledBubbled = false,
module module
; ;
@ -168,8 +170,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();
} }
}) })
@ -192,7 +199,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(),
@ -207,6 +216,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;
} }
} }
@ -354,6 +364,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() === '');
}, },
@ -1221,6 +1234,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'

2
dist/components/search.min.js
File diff suppressed because it is too large
View File

20
dist/semantic.js

@ -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'

10
dist/semantic.min.js
File diff suppressed because it is too large
View File

Loading…
Cancel
Save