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
e873b1ed
Commit
e873b1ed
authored
Mar 30, 2011
by
Dimitris Moraitis
Browse files
autoposition multiple confirm box - Refs #209
parent
e941164c
Changes
3
Hide whitespace changes
Inline
Side-by-side
ui/static/main.css
View file @
e873b1ed
...
...
@@ -933,7 +933,6 @@ div.action_error {
}
div
.confirm_multiple
{
position
:
fixed
;
bottom
:
0
;
width
:
700px
;
height
:
30px
;
...
...
@@ -1169,3 +1168,7 @@ div.list table thead #name {
.message
{
display
:
none
;
}
.fixed
{
position
:
fixed
;
}
\ No newline at end of file
ui/templates/machines.html
View file @
e873b1ed
...
...
@@ -471,4 +471,11 @@ if (flavors.length > 0) {
// create tabs for main menu
$
(
"
ul.tabs
"
).
tabs
(
"
div.panes ul
"
);
$
(
window
).
resize
(
function
(){
if
(
this
.
innerHeight
-
240
<
$
(
'
#machinesview
'
).
height
())
$
(
'
.confirm_multiple
'
).
addClass
(
'
fixed
'
);
else
$
(
'
.confirm_multiple
'
).
removeClass
(
'
fixed
'
);
});
</script>
ui/templates/standard.html
View file @
e873b1ed
...
...
@@ -18,7 +18,7 @@
<div
class=
"indicator"
></div>
<div
class=
"indicator"
></div>
<div
class=
"spinner"
style=
"display:none"
></div>
<img
class=
"wave"
src=
""
/>
<img
class=
"wave"
style=
"display:none"
src=
""
/>
</div>
<img
class=
"logo"
src=
""
/>
<a
href=
"#"
class=
"name"
>
...
...
@@ -195,19 +195,16 @@ function update_machines_view(data){
moved
.
find
(
"
img.logo
"
).
attr
(
"
src
"
,
"
static/machines/
"
+
image_tags
[
server
.
imageRef
]
+
'
.png
'
);
existing
.
remove
();
existing
=
moved
;
existing
.
find
(
'
.spinner
'
).
hide
();
}
else
if
([
'
STOPPED
'
,
'
ERROR
'
].
indexOf
(
server
.
status
)
>=
0
&&
[
STATUS_MESSAGES
[
'
ACTIVE
'
],
STATUS_MESSAGES
[
'
BUILD
'
],
STATUS_MESSAGES
[
'
REBOOT
'
]].
indexOf
(
existing
.
find
(
"
.status
"
).
text
())
>=
0
)
{
moved
=
existing
.
clone
().
appendTo
(
"
.terminated
"
);
moved
.
find
(
"
img.logo
"
).
attr
(
"
src
"
,
"
static/machines/
"
+
image_tags
[
server
.
imageRef
]
+
'
-off.png
'
);
existing
.
remove
();
existing
=
moved
;
existing
.
find
(
'
.spinner
'
).
hide
();
}
else
{
existing
.
find
(
'
.spinner
'
).
hide
();
existing
.
find
(
'
.wave
'
).
attr
(
'
src
'
,
'
static/wave.gif
'
);
setTimeout
(
"
$('#
"
+
server
.
id
+
"
.wave').attr('src','')
"
,
3000
);
}
}
existing
.
find
(
'
.spinner
'
).
hide
();
existing
.
find
(
'
.wave
'
).
attr
(
'
src
'
,
'
static/wave.gif
'
).
show
();
setTimeout
(
"
$('#
"
+
server
.
id
+
"
.wave').attr('src','').hide()
"
,
3000
);
existing
.
find
(
"
.status
"
).
text
(
STATUS_MESSAGES
[
server
.
status
]);
}
...
...
@@ -227,6 +224,8 @@ function update_machines_view(data){
machine
.
find
(
"
img.logo
"
).
attr
(
"
src
"
,
"
static/machines/
"
+
image_tags
[
server
.
imageRef
]
+
'
-off.png
'
);
machine
.
appendTo
(
"
.terminated
"
);
}
//machine.find(' .wave').attr('src','static/wave.gif').show();
//setTimeout("$('#" + server.id +" .wave').attr('src','').hide()", 3000);
}
});
...
...
@@ -245,6 +244,12 @@ function update_machines_view(data){
if
(
servers
.
length
==
0
)
{
$
(
"
#emptymachineslist
"
).
fadeIn
(
"
slow
"
);
}
// set confirm box position
if
(
window
.
innerHeight
-
235
<
$
(
'
#machinesview
'
).
height
())
$
(
'
.confirm_multiple
'
).
addClass
(
'
fixed
'
);
else
$
(
'
.confirm_multiple
'
).
removeClass
(
'
fixed
'
);
}
// indicate that the requested action was succesfully completed
...
...
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