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
|
@ -20,12 +20,21 @@ ${form.render()|n}
|
|||
% if master.mobile_rows_creatable_via_browse:
|
||||
${h.link_to(add_item_title, url('mobile.{}.create_row'.format(route_prefix), uuid=instance.uuid), class_='ui-btn ui-corner-all')}
|
||||
% endif
|
||||
% if master.mobile_rows_quickable:
|
||||
${h.form(url('mobile.{}.quick_row'.format(route_prefix), uuid=instance.uuid))}
|
||||
${h.csrf_token(request)}
|
||||
% endif
|
||||
% if master.mobile_rows_quickable and master.rows_quickable_for(instance):
|
||||
${h.form(url('mobile.{}.quick_row'.format(route_prefix), uuid=instance.uuid))}
|
||||
${h.csrf_token(request)}
|
||||
% if quick_row_autocomplete:
|
||||
<div class="field autocomplete quick-row" data-url="${quick_row_autocomplete_url}">
|
||||
${h.hidden('quick_row_entry')}
|
||||
${h.text('quick_row_autocomplete_text', placeholder=quick_row_entry_placeholder, autocomplete='off', data_type='search')}
|
||||
<ul data-role="listview" data-inset="true" data-filter="true" data-input="#quick_row_autocomplete_text"></ul>
|
||||
<button type="button" style="display: none;">Change</button>
|
||||
</div>
|
||||
% else:
|
||||
${h.text('quick_row_entry', placeholder=quick_row_entry_placeholder, autocomplete='off', **{'data-type': 'search', 'data-url': url('mobile.{}.quick_row'.format(route_prefix), uuid=instance.uuid)})}
|
||||
${h.end_form()}
|
||||
% endif
|
||||
${h.end_form()}
|
||||
% endif
|
||||
|
||||
<br />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue