Commit 30bc5fe2 by Oláh István Gergely

dashboard: fix modal issue - add fading to removed users

parent 5ab1002f
......@@ -28,13 +28,15 @@
/* for Node removes buttons */
$('.delete-from-group').click(function() {
var href = $(this).attr('href');
var tr = $(this).closest('tr');
var group = $(this).data('group_pk');
var member = $(this).data('member_pk');
var dir = window.location.pathname.indexOf('list') == -1;
addModalConfirmation(removeMember,
{ 'url': href,
'data': [],
'group_pk': group,
'tr': tr,
'group_pk': group,
'member_pk': member,
'type': "user",
'redirect': dir});
......@@ -48,7 +50,8 @@ function removeMember(data) {
url: data['url'],
headers: {"X-CSRFToken": getCookie('csrftoken')},
success: function(re, textStatus, xhr) {
$('#group-detail-pane').load(location.href+" #group-detail-panel");
data['tr'].fadeOut(function() {
$(this).remove();});
},
error: function(xhr, textStatus, error) {
addMessage('Uh oh :(', 'danger')
......
......@@ -31,7 +31,7 @@
</div>
<div class="col-md-8" id="group-detail-pane">
<div class="panel panel-default" id="group-detail-panel">
<div class="tab-content panel-body">
<div class="tab-content panel-body" id="group-form-body">
<h3>{% trans "User list"|capfirst %}</h3>
<form action="" method="post">{% csrf_token %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment