[UPDT] HORILLA VIEWS: Reload message when htmx swap
This commit is contained in:
@@ -1,16 +1,42 @@
|
||||
{% load static i18n generic_template_filters %}
|
||||
<div id="{{view_id|safe}}">
|
||||
{% if queryset|length %}
|
||||
{% if card_status_indications %}
|
||||
<div class="d-flex flex-row-reverse">
|
||||
{% for indication in card_status_indications %}
|
||||
<span class="m-1" style="cursor: pointer;margin-left: 7px;" {{indication.2|safe}}>
|
||||
<span class="oh-dot oh-dot--small me-1 {{indication.0}}"></span>
|
||||
{{indication.1}}
|
||||
</span>
|
||||
{% endfor %}
|
||||
<script>
|
||||
if (!$(".HTV").length) {
|
||||
$("#reloadMessagesButton").click()
|
||||
}
|
||||
</script>
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<div>
|
||||
{% for filter in stored_filters %}
|
||||
<div class="oh-hover-btn-container"
|
||||
hx-get="{{request.path}}?{{filter.urlencode}}"
|
||||
hx-target="#{{view_id|safe}}" hx-swap="outerHTML"
|
||||
>
|
||||
<button class="oh-hover-btn" style="
|
||||
cursor: pointer;
|
||||
border: solid 2px {{filter.color}};
|
||||
color: {{filter.color}} !important;
|
||||
">
|
||||
{{filter.title}}
|
||||
</button>
|
||||
<div class="oh-hover-btn-drawer" onclick="event.stopPropagation()">
|
||||
<button class="oh-hover-btn__small" onclick="$('#savedFilterModal').addClass('oh-modal--show')" hx-get="{% url "saved-filter-update" filter.id %}" hx-target="#SavedFilterFormTarget" hx-swap="innerHTML"><ion-icon name="create-outline"></ion-icon></button>
|
||||
<button class="oh-hover-btn__small" onclick="$(this).parent().find('button:hidden').click();$(this).closest('.oh-hover-btn-container').remove()" ><ion-icon name="trash-outline"></ion-icon></button>
|
||||
<button hidden hx-get="{% url "delete-saved-filter" filter.id %}" hx-swap="none"></button>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if card_status_indications %}
|
||||
<div class="d-flex flex-row-reverse">
|
||||
{% for indication in card_status_indications %}
|
||||
<span class="m-1" style="cursor: pointer;margin-left: 7px;" {{indication.2|safe}}>
|
||||
<span class="oh-dot oh-dot--small me-1 {{indication.0}}"></span>
|
||||
{{indication.1}}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<button class="reload-record" hidden hx-get="{{request.path}}?{{request.GET.urlencode}}" hx-target="#{{view_id|safe}}" hx-swap="outerHTML">
|
||||
</button>
|
||||
{% if show_filter_tags %}
|
||||
@@ -29,8 +55,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-kanban-card__details">
|
||||
<span class="oh-kanban-card__title">{{details.title|format:instance|safe}}</span>
|
||||
<span class="oh-kanban-card__subtitle">{{details.subtitle|format:instance|safe}}</span>
|
||||
<span class="oh-kanban-card__title">{{details.title|format:instance|selected_format:request.user.employee_get.employee_work_info.company_id|safe}}</span>
|
||||
<span class="oh-kanban-card__subtitle">{{details.subtitle|format:instance|selected_format:request.user.employee_get.employee_work_info.company_id|safe}}</span>
|
||||
</div>
|
||||
{% if actions %}
|
||||
<div class="oh-kanban-card__dots" onclick="event.stopPropagation()">
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
{% comment %} {% include "attendance/attendance/attendance_nav.html" %} {% endcomment %}
|
||||
{% load i18n generic_template_filters %}
|
||||
|
||||
<div class="oh-tabs">
|
||||
<div class="oh-tabs HTV">
|
||||
<script>
|
||||
$("#reloadMessagesButton").click()
|
||||
</script>
|
||||
<div class="HTV"></div>
|
||||
<ul class="oh-tabs__tablist">
|
||||
{% for tab in tabs %}
|
||||
<li
|
||||
|
||||
Reference in New Issue
Block a user