Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Bulk action loading indicator #237

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/argus_htmx/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4195,6 +4195,11 @@ input.tab:checked + .tab-content,
color: var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)));
}

.text-primary-content {
--tw-text-opacity: 1;
color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
}

.text-warning {
--tw-text-opacity: 1;
color: var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)));
Expand Down
5 changes: 4 additions & 1 deletion src/argus_htmx/templates/htmx/_base_form_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ <h3 class="card-title">{{ header }}</h3>
<div class="divider divider-end">
<button type="submit"
form="{{ dialog_id }}-form"
class="btn {{ button_class|default:"btn-primary" }}">{{ submit_text }}</button>
class="btn {{ button_class|default:'btn-primary' }} loading-box">
<span>{{ submit_text }}</span>
<div class="htmx-indicator loading loading-spinner"></div>
</button>
<button class="btn">{{ cancel_text }}</button>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "htmx/_base_form_modal.html" %}
{% block form_control %}
hx-post="{% url endpoint|default:'htmx:incidents-update' action=action %}"
hx-indicator="button .htmx-indicator"
{% if action_type == "bulk-update" %}
hx-include="[name='incident_ids']"
{% else %}
Expand Down
Loading