mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Added separate property to control autocompletion mode
This is better than using hardcoded field name.
This commit is contained in:
parent
3f2e887aec
commit
9dd26f2f87
2 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ function removeSelected() {
|
|||
}
|
||||
|
||||
function isSearchField() {
|
||||
return inputField && inputField.name === 'q';
|
||||
return inputField && inputField.dataset.acMode === 'search';
|
||||
}
|
||||
|
||||
function restoreOriginalValue() {
|
||||
|
|
|
@ -12,7 +12,7 @@ header.header
|
|||
i.fa.fa-upload
|
||||
|
||||
= form_for @conn, Routes.search_path(@conn, :index), [method: "get", class: "header__search flex flex--no-wrap flex--centered", enforce_utf8: false], fn f ->
|
||||
input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=@conn.params["q"] placeholder="Search" autocapitalize="none" autocomplete="off" data-ac="true" data-ac-min-length="3" data-ac-source="/autocomplete/tags?term="
|
||||
input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=@conn.params["q"] placeholder="Search" autocapitalize="none" autocomplete="off" data-ac="true" data-ac-min-length="3" data-ac-source="/autocomplete/tags?term=" data-ac-mode="search"
|
||||
|
||||
= if present?(@conn.params["sf"]) do
|
||||
input type="hidden" name="sf" value=@conn.params["sf"]
|
||||
|
|
Loading…
Reference in a new issue