mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-09 14:49:21 +00:00
display number of occurences of term
This commit is contained in:
parent
707082f6b6
commit
bc5aa7703c
|
@ -96,13 +96,9 @@ function initMost() {
|
||||||
d.setFullYear(pastYear);
|
d.setFullYear(pastYear);
|
||||||
// console.log(d.toISOString().split('T')[0]);
|
// console.log(d.toISOString().split('T')[0]);
|
||||||
|
|
||||||
// $.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
|
|
||||||
var data = {
|
var data = {
|
||||||
query: query,
|
query: query,
|
||||||
limit: 15,
|
limit: 15,
|
||||||
// fullsearch: 1,
|
|
||||||
// creationdate: 1,
|
|
||||||
// createstart: d.toISOString().split('T')[0],
|
|
||||||
action: 'typeahead'
|
action: 'typeahead'
|
||||||
};
|
};
|
||||||
/* Return a list of json objects, each containing
|
/* Return a list of json objects, each containing
|
||||||
|
@ -152,7 +148,7 @@ function initMost() {
|
||||||
else if(item.type.charAt(0) == 'F')
|
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>';
|
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||||
else
|
else
|
||||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<');
|
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<') + (item.occurences > 0 ? ' (' + item.occurences + ')' : '');
|
||||||
},
|
},
|
||||||
/* This only works with a modified version of bootstrap typeahead located
|
/* This only works with a modified version of bootstrap typeahead located
|
||||||
* in boostrap-typeahead.js Search for 'render'
|
* in boostrap-typeahead.js Search for 'render'
|
||||||
|
|
|
@ -101,13 +101,9 @@ function initMost() {
|
||||||
d.setFullYear(pastYear);
|
d.setFullYear(pastYear);
|
||||||
// console.log(d.toISOString().split('T')[0]);
|
// console.log(d.toISOString().split('T')[0]);
|
||||||
|
|
||||||
// $.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
|
|
||||||
var data = {
|
var data = {
|
||||||
query: query,
|
query: query,
|
||||||
limit: 15,
|
limit: 15,
|
||||||
// fullsearch: 1,
|
|
||||||
// creationdate: 1,
|
|
||||||
// createstart: d.toISOString().split('T')[0],
|
|
||||||
action: 'typeahead'
|
action: 'typeahead'
|
||||||
};
|
};
|
||||||
/* Return a list of json objects, each containing
|
/* Return a list of json objects, each containing
|
||||||
|
@ -157,7 +153,7 @@ function initMost() {
|
||||||
else if(item.type.charAt(0) == 'F')
|
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>';
|
return '<i class="fa fa-folder-o"></i> ' + item.name.replace(/</g, '<') + '<br /><span class="path">' + item.path + '</span>';
|
||||||
else
|
else
|
||||||
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<');
|
return '<i class="fa fa-search"></i> ' + item.name.replace(/</g, '<') + (item.occurences > 0 ? ' (' + item.occurences + ')' : '');
|
||||||
},
|
},
|
||||||
/* This only works with a modified version of bootstrap typeahead located
|
/* This only works with a modified version of bootstrap typeahead located
|
||||||
* in boostrap-typeahead.js Search for 'render'
|
* in boostrap-typeahead.js Search for 'render'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user