Bug fixes
This commit is contained in:
parent
7f533cc583
commit
bb118f6144
11 changed files with 123 additions and 82 deletions
|
|
@ -14,6 +14,13 @@
|
|||
<h2>Search</h2>
|
||||
<form method="get" action="/posts/1">
|
||||
{% let tags_value = "" %} {% include "fragments/tags_input.html" %}
|
||||
<div
|
||||
hx-trigger="keyup[key=='Escape'] from:previous .tags"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-swap="innerHTML"
|
||||
hx-delete="/remove"
|
||||
hidden
|
||||
></div>
|
||||
<ul class="reset tags-autocomplete" id="search-autocomplete"></ul>
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@
|
|||
<h2>Search</h2>
|
||||
<form method="get" action="/posts">
|
||||
{% let tags_value = tags_text.clone().unwrap_or("".into()) %} {% include "fragments/tags_input.html" %}
|
||||
<div
|
||||
hx-trigger="keyup[key=='Escape'] from:previous .tags"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-swap="innerHTML"
|
||||
hx-delete="/remove"
|
||||
hidden
|
||||
></div>
|
||||
<ul class="reset tags-autocomplete" id="search-autocomplete"></ul>
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@
|
|||
<h1>Upload media</h1>
|
||||
<form method="post" action="/upload" enctype="multipart/form-data">
|
||||
{% let tags_value = "" %} {% include "fragments/tags_input.html" %}
|
||||
<div
|
||||
hx-trigger="keyup[key=='Escape'] from:previous .tags"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-swap="innerHTML"
|
||||
hx-delete="/remove"
|
||||
hidden
|
||||
></div>
|
||||
<ul class="reset tags-autocomplete" id="upload-autocomplete"></ul>
|
||||
<input
|
||||
type="file"
|
||||
|
|
|
|||
|
|
@ -29,26 +29,6 @@
|
|||
{% if age_confirmation %}{% include "fragments/age_restricted_check.html"
|
||||
%}{% endif %}
|
||||
<div><a href="{% if let Some(tags_text) = tags_text %}/posts/1?tags={{ tags_text.replace(' ', "+") }}{% else %}/posts/1{% endif %}">< To posts</a></div>
|
||||
<article>
|
||||
<h2>Search</h2>
|
||||
<form method="get" action="/posts">
|
||||
<input
|
||||
class="tags"
|
||||
type="text"
|
||||
id="search-tags"
|
||||
name="tags"
|
||||
placeholder="Tags"
|
||||
hx-post="/search_tags"
|
||||
hx-trigger="input changed"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-vals="js:{selection_end: event.target.selectionEnd}"
|
||||
hx-on::after-settle="this.focus(); this.setSelectionRange(-1, -1);"
|
||||
value="{% if let Some(tags_text) = tags_text %}{{ tags_text }}{% endif %}"
|
||||
/>
|
||||
<ul class="reset tags-autocomplete" id="search-autocomplete"></ul>
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
</article>
|
||||
<article>
|
||||
<table>
|
||||
{% for item in pool_data %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue