Add basic autocomplete support for "quick row" feature
This commit is contained in:
parent
68bd3047c4
commit
935a6b2a68
4 changed files with 58 additions and 7 deletions
|
@ -37,6 +37,17 @@ $(document).on('pagecreate', function() {
|
|||
});
|
||||
|
||||
|
||||
// submit "quick row" form upon autocomplete selection
|
||||
$(document).on('autocompleteitemselected', function(event, uuid) {
|
||||
var field = $(event.target);
|
||||
if (field.hasClass('quick-row')) {
|
||||
var form = field.parents('form:first');
|
||||
form.find('[name="quick_row_entry"]').val(uuid);
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Automatically set focus to certain fields, on various pages
|
||||
* TODO: this should accept selector params instead of hard-coding..?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue