Add new version in repository
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
@push('js')
|
||||
<script src="{{ asset('/assets/plugins/autocomplete/bootstrap-autocomplete.min.js') }}"></script>
|
||||
<script>
|
||||
function initAutocomplete(sel) {
|
||||
function initAutocomplete(sel, callback) {
|
||||
var selector = (typeof(sel) == 'undefined') ? '.autocomplete' : sel;
|
||||
$(selector).autoComplete();
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
var field = $(this).data('field');
|
||||
var id = item.value;
|
||||
$('#'+field).val(id);
|
||||
|
||||
if (typeof(callback) != 'undefined') {
|
||||
var c = callback + '(' + id + ')';
|
||||
eval(c);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user