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
e10a0681
authored
May 29, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: disable screenshot button if screenshot is in progress
parent
c2c3913d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
circle/dashboard/static/dashboard/vm-details.js
+12
-0
No files found.
circle/dashboard/static/dashboard/vm-details.js
View file @
e10a0681
...
@@ -268,9 +268,21 @@ $(function() {
...
@@ -268,9 +268,21 @@ $(function() {
$
(
"#getScreenshotButton"
).
click
(
function
()
{
$
(
"#getScreenshotButton"
).
click
(
function
()
{
var
vm
=
$
(
this
).
data
(
"vm-pk"
);
var
vm
=
$
(
this
).
data
(
"vm-pk"
);
var
ct
=
$
(
"#vm-console-screenshot"
);
var
ct
=
$
(
"#vm-console-screenshot"
);
$
(
"i"
,
this
).
addClass
(
"icon-spinner icon-spin"
);
$
(
this
).
prop
(
"disabled"
,
true
);
ct
.
slideDown
();
ct
.
slideDown
();
var
img
=
$
(
"img"
,
ct
).
prop
(
"src"
,
'/dashboard/vm/'
+
vm
+
'/screenshot/'
);
var
img
=
$
(
"img"
,
ct
).
prop
(
"src"
,
'/dashboard/vm/'
+
vm
+
'/screenshot/'
);
});
});
// if the image is loaded remove the spinning stuff
// note: this should not work if the image is cached, but it's not
// see: http://stackoverflow.com/a/3877079/1112653
$
(
"#vm-console-screenshot img"
).
load
(
function
(
e
)
{
$
(
"#getScreenshotButton"
).
prop
(
"disabled"
,
false
)
.
find
(
"i"
).
removeClass
(
"icon-spinner icon-spin"
);
});
// screenshot close
// screenshot close
$
(
"#vm-console-screenshot button"
).
click
(
function
()
{
$
(
"#vm-console-screenshot button"
).
click
(
function
()
{
...
...
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