mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
activated datepicker for more input fields
added typeahead code for search query field
This commit is contained in:
parent
3ce0474c42
commit
db6ed9497f
|
@ -6,10 +6,10 @@ $(document).ready( function() {
|
|||
|
||||
$('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
|
||||
|
||||
$('#expirationdate, #fromdate, #todate')
|
||||
$('#expirationdate, #fromdate, #todate, #createstartdate, #createenddate, #expirationstartdate, #expirationenddate')
|
||||
.datepicker()
|
||||
.on('changeDate', function(ev){
|
||||
$('#expirationdate, #fromdate, #todate').datepicker('hide');
|
||||
$('#expirationdate, #fromdate, #todate, #createstartdate, #createenddate, #expirationstartdate, #expirationenddate').datepicker('hide');
|
||||
});
|
||||
|
||||
$(".chzn-select").chosen();
|
||||
|
@ -29,4 +29,18 @@ $(document).ready( function() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
/* The typeahead functionality useѕ the rest api */
|
||||
$("#searchfield").typeahead({
|
||||
minLength: 3,
|
||||
source: function(query, process) {
|
||||
$.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
|
||||
process(data);
|
||||
});
|
||||
},
|
||||
updater: function (item) {
|
||||
document.location = "../op/op.Search.php?query=" + encodeURIComponent(item);
|
||||
return item;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user