manager: increase click zone of delete icons in tables (#45093)
This commit is contained in:
parent
1a3bd4bb05
commit
3d2b51f444
|
@ -66,6 +66,27 @@ table.main.left th {
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
table.main {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
table.main td.remove-icon-column {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
table.main td.remove-icon-column a {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
border: none;
|
||||
}
|
||||
|
||||
table.main td.remove-icon-column a span {
|
||||
display: block;
|
||||
margin: auto;
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
|
||||
table.feeds td.url {
|
||||
text-align: left;
|
||||
padding-left: 1em;
|
||||
|
|
|
@ -123,9 +123,9 @@
|
|||
});
|
||||
/* user deletion */
|
||||
$(document).on('click', '.js-remove-object', function (e) {
|
||||
var $anchor = $(e.target);
|
||||
if ($(e.target).data('confirm')) {
|
||||
if (! confirm($(e.target).data('confirm'))) {
|
||||
var $anchor = $(this);
|
||||
if ($anchor.data('confirm')) {
|
||||
if (! confirm($anchor.data('confirm'))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
<th></th>
|
||||
{% endblock %}
|
||||
{% block table.tbody.last.column %}
|
||||
<td>{% if table.context.view.can_manage_members and row.record.direct %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with username=row.record.get_full_name role=table.context.object %}Do you really want to remove user "{{ username }}" from role "{{ role }}" ?{% endblocktrans %}" href="#" data-pk-arg="user"></a>{% endif %}</td>
|
||||
<td class="remove-icon-column">{% if table.context.view.can_manage_members and row.record.direct %}<a class="js-remove-object" data-confirm="{% blocktrans with username=row.record.get_full_name role=table.context.object %}Do you really want to remove user "{{ username }}" from role "{{ role }}" ?{% endblocktrans %}" href="#" data-pk-arg="user"><span class="icon-remove-sign"></span></a>{% endif %}</td>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
<th></th>
|
||||
{% endblock %}
|
||||
{% block table.tbody.last.column %}
|
||||
<td>{% if table.context.view.can_change %}<a class="icon-remove-sign js-remove-object" href="#" data-pk-arg="permission"></a>{% endif %}</td>
|
||||
<td class="remove-icon-column">{% if table.context.view.can_change %}<a class="js-remove-object" href="#" data-pk-arg="permission"><span class="icon-remove-sign"></span></a>{% endif %}</td>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
<th></th>
|
||||
{% endblock %}
|
||||
{% block table.tbody.last.column %}
|
||||
<td>{% if table.context.view.can_change %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with name=row.record.name slug=table.context.object %}Do you really want to remove role "{{ name }}" from service "{{ slug }}" ?{% endblocktrans %}" href="#" data-pk-arg="role"></a>{% endif %}</td>
|
||||
<td class="remove-icon-column">{% if table.context.view.can_change %}<a class="js-remove-object" data-confirm="{% blocktrans with name=row.record.name slug=table.context.object %}Do you really want to remove role "{{ name }}" from service "{{ slug }}" ?{% endblocktrans %}" href="#" data-pk-arg="role"><span class="icon-remove-sign"></span></a>{% endif %}</td>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<th></th>
|
||||
{% endblock %}
|
||||
{% block table.tbody.last.column %}
|
||||
<td>
|
||||
<td class="remove-icon-column">
|
||||
{% if table.context.view.can_change and row.record.member %}
|
||||
<a class="icon-remove-sign {% if not row.record.can_manage_members %} disabled {% else %} js-remove-object {% endif %}" data-confirm="{% blocktrans with name=row.record.name username=table.context.object.get_full_name %}Do you really want to remove role "{{ name }}" from user "{{ username }}" ?{% endblocktrans %}" href="#" data-pk-arg="role" title="{% if not row.record.can_manage_members %}{% trans "This role is synchronised from LDAP, changing members is not allowed." %}{% endif %}"></a>
|
||||
<a class="{% if not row.record.can_manage_members %} disabled {% else %} js-remove-object {% endif %}" data-confirm="{% blocktrans with name=row.record.name username=table.context.object.get_full_name %}Do you really want to remove role "{{ name }}" from user "{{ username }}" ?{% endblocktrans %}" href="#" data-pk-arg="role" title="{% if not row.record.can_manage_members %}{% trans "This role is synchronised from LDAP, changing members is not allowed." %}{% endif %}"><span class="icon-remove-sign"></span></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue