Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6c0d0c52
authored
Feb 25, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add group-details.js with rename scripts
parent
9a6604e4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
circle/dashboard/static/dashboard/group-details.js
+27
-0
No files found.
circle/dashboard/static/dashboard/group-details.js
0 → 100644
View file @
6c0d0c52
/* rename */
$
(
"#group-details-h1-name, .group-details-rename-button"
).
click
(
function
()
{
$
(
"#group-details-h1-name"
).
hide
();
$
(
"#group-details-rename"
).
css
(
'display'
,
'inline'
);
$
(
"#group-details-rename-name"
).
focus
();
});
/* rename ajax */
$
(
'#group-details-rename-submit'
).
click
(
function
()
{
var
name
=
$
(
'#group-details-rename-name'
).
val
();
$
.
ajax
({
method
:
'POST'
,
url
:
location
.
href
,
data
:
{
'new_name'
:
name
},
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
success
:
function
(
data
,
textStatus
,
xhr
)
{
$
(
"#group-details-h1-name"
).
html
(
data
[
'new_name'
]).
show
();
$
(
'#group-details-rename'
).
hide
();
// addMessage(data['message'], "success");
},
error
:
function
(
xhr
,
textStatus
,
error
)
{
addMessage
(
"Error during renaming!"
,
"danger"
);
}
});
return
false
;
});
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