Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1e859cdd
authored
Mar 07, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix returning in removing user from group
parent
3dda2ca0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
circle/dashboard/static/dashboard/group-details.js
+1
-9
circle/dashboard/views.py
+2
-2
No files found.
circle/dashboard/static/dashboard/group-details.js
View file @
1e859cdd
...
@@ -48,15 +48,7 @@ function removeMember(data) {
...
@@ -48,15 +48,7 @@ function removeMember(data) {
url
:
data
[
'url'
],
url
:
data
[
'url'
],
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
success
:
function
(
re
,
textStatus
,
xhr
)
{
success
:
function
(
re
,
textStatus
,
xhr
)
{
if
(
!
data
[
'redirect'
])
{
$
(
'#group-detail-pane'
).
load
(
location
.
href
+
" #group-detail-panel"
);
selected
=
[];
addMessage
(
re
[
'message'
],
'success'
);
$
(
'a[data-'
+
data
[
'type'
]
+
'-pk="'
+
data
[
'pk'
]
+
'"]'
).
closest
(
'tr'
).
fadeOut
(
function
()
{
$
(
this
).
remove
();
});
}
else
{
window
.
location
.
replace
(
'/dashboard'
);
}
},
},
error
:
function
(
xhr
,
textStatus
,
error
)
{
error
:
function
(
xhr
,
textStatus
,
error
)
{
addMessage
(
'Uh oh :('
,
'danger'
)
addMessage
(
'Uh oh :('
,
'danger'
)
...
...
circle/dashboard/views.py
View file @
1e859cdd
...
@@ -1022,7 +1022,8 @@ class GroupRemoveUserView(LoginRequiredMixin, DeleteView):
...
@@ -1022,7 +1022,8 @@ class GroupRemoveUserView(LoginRequiredMixin, DeleteView):
if
next
:
if
next
:
return
next
return
next
else
:
else
:
return
reverse_lazy
(
'dashboard.views.group-list'
)
return
reverse_lazy
(
"dashboard.views.group-detail"
,
kwargs
=
{
'pk'
:
self
.
get_object
()
.
pk
})
def
get
(
self
,
request
,
member_pk
,
*
args
,
**
kwargs
):
def
get
(
self
,
request
,
member_pk
,
*
args
,
**
kwargs
):
self
.
member_pk
=
member_pk
self
.
member_pk
=
member_pk
...
@@ -1045,7 +1046,6 @@ class GroupRemoveUserView(LoginRequiredMixin, DeleteView):
...
@@ -1045,7 +1046,6 @@ class GroupRemoveUserView(LoginRequiredMixin, DeleteView):
self
.
remove_member
(
kwargs
[
"member_pk"
])
self
.
remove_member
(
kwargs
[
"member_pk"
])
success_url
=
self
.
get_success_url
()
success_url
=
self
.
get_success_url
()
success_message
=
self
.
get_success_message
()
success_message
=
self
.
get_success_message
()
if
request
.
is_ajax
():
if
request
.
is_ajax
():
return
HttpResponse
(
return
HttpResponse
(
json
.
dumps
({
'message'
:
success_message
}),
json
.
dumps
({
'message'
:
success_message
}),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment