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
99e0d766
Commit
99e0d766
authored
Oct 12, 2011
by
Kostas Papadimitriou
Browse files
Fixed create view show machine button, Refs #1483
Disable button clicks until vm is added to the vms collection
parent
44daa7c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/static/snf/js/ui/web/ui_create_view.js
View file @
99e0d766
...
...
@@ -33,18 +33,29 @@
this
.
copy
=
this
.
$
(
"
.clip-copy
"
);
this
.
$
(
"
.show-machine
"
).
click
(
_
.
bind
(
function
(){
if
(
this
.
$
(
"
.show-machine
"
).
hasClass
(
"
in-progress
"
))
{
return
;
}
this
.
hide
();
snf
.
ui
.
main
.
show_vm_details
(
storage
.
vms
.
get
(
this
.
vm_id
));
},
this
));
_
.
bindAll
(
this
,
"
handle_vm_added
"
);
storage
.
vms
.
bind
(
"
add
"
,
this
.
handle_vm_added
);
},
handle_vm_added
:
function
()
{
this
.
$
(
"
.show-machine
"
).
removeClass
(
"
in-progress
"
);
},
show_password
:
function
()
{
this
.
$
(
"
.show-machine
"
).
addClass
(
"
in-progress
"
);
this
.
password
.
text
(
this
.
pass
);
},
onClose
:
function
()
{
this
.
password
.
text
(
""
);
this
.
vm_id
=
undefined
;
},
beforeOpen
:
function
()
{
...
...
@@ -65,7 +76,7 @@
show
:
function
(
pass
,
vm_id
)
{
this
.
pass
=
pass
;
this
.
vm_id
=
vm_id
;
views
.
VMCreationPasswordView
.
__super__
.
show
.
apply
(
this
,
arguments
);
this
.
show_password
();
}
...
...
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