Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
8b1979aa
authored
Feb 26, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix rename button in node-details
parent
0c944824
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
circle/dashboard/static/dashboard/node-details.js
+27
-0
circle/dashboard/templates/dashboard/group-detail.html
+0
-0
circle/dashboard/templates/dashboard/node-detail.html
+14
-2
No files found.
circle/dashboard/static/dashboard/node-details.js
0 → 100644
View file @
8b1979aa
/* rename */
$
(
"#node-details-h1-name, .node-details-rename-button"
).
click
(
function
()
{
$
(
"#node-details-h1-name"
).
hide
();
$
(
"#node-details-rename"
).
css
(
'display'
,
'inline'
);
$
(
"#node-details-rename-name"
).
focus
();
});
/* rename ajax */
$
(
'#node-details-rename-submit'
).
click
(
function
()
{
var
name
=
$
(
'#node-details-rename-name'
).
val
();
$
.
ajax
({
method
:
'POST'
,
url
:
location
.
href
,
data
:
{
'new_name'
:
name
},
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
success
:
function
(
data
,
textStatus
,
xhr
)
{
$
(
"#node-details-h1-name"
).
html
(
data
[
'new_name'
]).
show
();
$
(
'#node-details-rename'
).
hide
();
// addMessage(data['message'], "success");
},
error
:
function
(
xhr
,
textStatus
,
error
)
{
addMessage
(
"Error during renaming!"
,
"danger"
);
}
});
return
false
;
});
circle/dashboard/templates/dashboard/group-detail.html
View file @
8b1979aa
circle/dashboard/templates/dashboard/node-detail.html
View file @
8b1979aa
...
...
@@ -4,7 +4,19 @@
{% block content %}
<div
class=
"body-content"
>
<div
class=
"page-header"
>
<h1>
{{ node.name }}
<small>
{{ node.get_connect_host }}
</small></h1>
<h1>
<div
id=
"node-details-rename"
>
<form
action=
""
method=
"POST"
id=
"node-details-rename-form"
>
{% csrf_token %}
<input
id=
"node-details-rename-name"
class=
"form-control"
name=
"new_name"
type=
"text"
value=
"{{ node.name }}"
/>
<button
type=
"submit"
id=
"node-details-rename-submit"
class=
"btn"
>
{% trans "Rename" %}
</button>
</form>
</div>
<div
id=
"node-details-h1-name"
>
{{ node.name }}
</div>
</h1>
<small>
{{ node.get_connect_host }}
</small>
</div>
<div
class=
"row"
>
<div
class=
"col-md-4"
id=
"node-info-pane"
>
...
...
@@ -71,6 +83,6 @@
{% endblock %}
{% block extra_js %}
<script
src=
"{{ STATIC_URL}}dashboard/node-
list
.js"
></script>
<script
src=
"{{ STATIC_URL}}dashboard/node-
details
.js"
></script>
{% endblock %}
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