Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
61c68083
Commit
61c68083
authored
Apr 17, 2011
by
Christodoulos Psaltis
Browse files
Server rename action is not pushed to pending
parent
91158726
Changes
2
Show whitespace changes
Inline
Side-by-side
ui/static/synnefo.js
View file @
61c68083
...
...
@@ -682,7 +682,7 @@ function rename(serverID, serverName){
}
// ajax post rename call
var
payload
=
{
"
server
"
:
{
"
name
"
:
serverName
}
"
server
"
:
{
"
name
"
:
serverName
}
};
$
.
ajax
({
...
...
ui/templates/standard.html
View file @
61c68083
...
...
@@ -84,20 +84,12 @@ $(".rename, h5.editable span.name").live('click', function() {
//rename machine
$
(
"
.editbuttons .save
"
).
live
(
'
click
'
,
function
()
{
serverID
=
$
(
this
).
parent
().
parent
().
parent
(
).
attr
(
"
id
"
);
serverID
=
$
(
this
).
closest
(
'
.machine
'
).
attr
(
"
id
"
);
serverName
=
$
(
this
).
parent
().
parent
().
find
(
'
.name
'
).
find
(
'
.nametextbox
'
).
val
();
var
found
=
false
;
$
(
this
).
parent
().
parent
().
find
(
'
.name
'
).
html
(
$
(
this
).
parent
().
parent
().
find
(
'
.nametextbox
'
).
val
());
$
(
this
).
parent
().
parent
().
find
(
"
.editbuttons
"
).
fadeOut
(
"
fast
"
);
$
(
this
).
parent
().
parent
().
find
(
"
.rename
"
).
fadeIn
(
"
slow
"
);
for
(
i
=
0
;
i
<
pending_actions
.
length
;
i
++
){
// if there is already a pending action for this server replace it
if
(
pending_actions
[
i
][
1
]
==
serverID
){
pending_actions
[
i
][
0
]
=
rename
;
found
=
true
}
}
if
(
!
found
)
// no pending action for this server was found, so let's just add it to the list
pending_actions
.
push
([
rename
,
serverID
,
serverName
])
rename
(
serverID
,
serverName
);
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