Properly swap modal context table and keep scroll position
This commit is contained in:
24
core/templates/modals/context_table.html
Normal file
24
core/templates/modals/context_table.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<article class="table-container" id="modal-context-table">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in object_list %}
|
||||
{% if item.type == 'msg' %}
|
||||
<tr>
|
||||
<td>{{ item.time }}</td>
|
||||
<td
|
||||
class="has-tooltip-right {% if item.online is True %}has-text-success{% elif item.online is False %}has-text-danger{% else %}has-text-warning{% endif %}"
|
||||
data-tooltip="{{ item.nick }}!{{ item.ident }}@{{ item.host }}">{{ item.nick }}</td>
|
||||
<td class="wrap">{{ item.msg }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</article>
|
||||
<script>
|
||||
var modal_event = new Event('restore-modal-scroll');
|
||||
document.dispatchEvent(modal_event);
|
||||
</script>
|
||||
Reference in New Issue
Block a user