prepare to use new method SeedDMS_Bootstrap_Search::typeahead()

This commit is contained in:
Uwe Steinmann 2020-11-30 15:42:07 +01:00
parent d64af2b3b1
commit 1e55c2af50

View File

@ -100,7 +100,13 @@ $(document).ready( function() {
$("#searchfield").typeahead({ /* {{{ */
minLength: 3,
source: function(query, process) {
var d = new Date();
var pastYear = d.getFullYear() - 1;
d.setFullYear(pastYear);
console.log(d.toISOString().split('T')[0]);
$.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
// $.get('../out/out.Search.php', { query: query, limit: 8, creationdate: 1, createstart: d.toISOString().split('T')[0], action: 'typeahead' }, function(data) {
process(data);
});
},