Make very long asset children lists scroll

This commit is contained in:
2021-09-08 15:41:14 +01:00
parent a2be4cbe5e
commit 44f9509eda
2 changed files with 4 additions and 4 deletions

View File

@@ -34,7 +34,7 @@
}) })
.ajaxSelectPicker({ .ajaxSelectPicker({
ajax: { ajax: {
url: '{% url 'asset_search_json' %}', url: "{% url 'asset_search_json' %}",
type: "GET", type: "GET",
data: function () { data: function () {
let params = { let params = {

View File

@@ -28,13 +28,13 @@
<dt>Children</dt> <dt>Children</dt>
{% if object.asset_parent.all %} {% if object.asset_parent.all %}
<div style="max-height: 200px; overflow-y: auto; -webkit-overflow-scrolling: touch; ">
{% for child in object.asset_parent.all %} {% for child in object.asset_parent.all %}
<dd> <dd>
<a href="{% url 'asset_detail' child.asset_id %}"> <a href="{% url 'asset_detail' child.asset_id %}">{{ child }}</a>
{{ child.asset_id }} - {{ child.description }}
</a>
</dd> </dd>
{% endfor %} {% endfor %}
</div>
{% else %} {% else %}
<dd><span>-</span></dd> <dd><span>-</span></dd>
{% endif %} {% endif %}