mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
typeahead will also show the column where the search terms comes from
This commit is contained in:
parent
89e930ba00
commit
3cfcfaa558
|
@ -362,7 +362,7 @@ $(document).ready(function() {
|
|||
$recs[] = array('type'=>'S', 'name'=>$query, 'occurences'=>'');
|
||||
if($terms) {
|
||||
foreach($terms as $term)
|
||||
$recs[] = array('type'=>'S', 'name'=>$term->text, 'occurences'=>$term->_occurrence);
|
||||
$recs[] = array('type'=>'S', 'name'=>$term->text, 'occurences'=>$term->_occurrence, 'column'=>$term->field);
|
||||
}
|
||||
if($entries) {
|
||||
foreach ($entries as $entry) {
|
||||
|
|
|
@ -150,7 +150,7 @@ function initMost() {
|
|||
else if(item.type.charAt(0) == 'F')
|
||||
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||
else
|
||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<') + (item.occurences > 0 ? ' (' + item.occurences + ')' : '');
|
||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<') + (item.occurences > 0 ? ' (' + item.occurences + ')' : '') + (typeof(item.column) != 'undefined' ? '<br /><span class="path">' + item.column + '</span>' : '');
|
||||
},
|
||||
/* This only works with a modified version of bootstrap typeahead located
|
||||
* in boostrap-typeahead.js Search for 'render'
|
||||
|
|
|
@ -155,7 +155,7 @@ function initMost() {
|
|||
else if(item.type.charAt(0) == 'F')
|
||||
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||
else
|
||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<') + (item.occurences > 0 ? ' (' + item.occurences + ')' : '');
|
||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<') + (item.occurences > 0 ? ' (' + item.occurences + ')' : '') + (typeof(item.column) != 'undefined' ? '<br /><span class="path">' + item.column + '</span>' : '');
|
||||
},
|
||||
/* This only works with a modified version of bootstrap typeahead located
|
||||
* in boostrap-typeahead.js Search for 'render'
|
||||
|
|
Loading…
Reference in New Issue
Block a user