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
b3fafa3a
Commit
b3fafa3a
authored
Mar 29, 2011
by
Georgios Gousios
Browse files
Merge branch 'master' of
https://code.grnet.gr/git/synnefo
parents
efab3073
ac49a70a
Changes
4
Hide whitespace changes
Inline
Side-by-side
ui/static/main.css
View file @
b3fafa3a
...
...
@@ -532,8 +532,8 @@ div.machine div.actions a.more {
}
div
.machine
div
.actions
a
:hover
{
color
:
orange
!important
;
text-decoration
:
no
ne
;
color
:
black
!important
;
text-decoration
:
underli
ne
;
display
:
block
;
}
...
...
@@ -821,8 +821,8 @@ div.list div.actions a.enabled {
div
.list
div
.actions
a
.enabled
:hover
{
cursor
:
pointer
;
color
:
orange
!important
;
text-decoration
:
no
ne
;
color
:
black
!important
;
text-decoration
:
underli
ne
;
}
input
.machine
{
...
...
@@ -1160,4 +1160,4 @@ div.list table thead #name {
.message
{
display
:
none
;
}
\ No newline at end of file
}
ui/static/synnefo.js
View file @
b3fafa3a
...
...
@@ -27,6 +27,16 @@ function update_confirmations(){
if
(
pending_actions
.
length
>
1
||
$
.
cookie
(
"
list
"
)
==
'
1
'
&&
pending_actions
.
length
==
1
){
// if more than one pending action show multiple confirm box
$
(
'
div.confirm_multiple span.actionLen
'
).
text
(
pending_actions
.
length
);
// set the label of the buttons in list view
if
(
$
.
cookie
(
"
list
"
)
==
'
1
'
)
{
$
(
'
div.confirm_multiple button.yes
'
).
text
(
'
Confirm
'
);
$
(
'
div.confirm_multiple button.no
'
).
text
(
'
Cancel
'
);
}
// set the label of the buttons in standard view
else
{
$
(
'
div.confirm_multiple button.yes
'
).
text
(
'
Confirm All
'
);
$
(
'
div.confirm_multiple button.no
'
).
text
(
'
Cancel All
'
);
}
$
(
'
div.confirm_multiple
'
).
show
();
}
}
...
...
ui/templates/list.html
View file @
b3fafa3a
...
...
@@ -97,11 +97,18 @@ var actions = { 'reboot': ['ACTIVE', 'REBOOT', 'multiple'],
};
// on checkbox click, update the actions
$
(
"
tbody input[type='checkbox']
"
).
live
(
'
change
'
,
function
()
{
updateActions
();
});
$
(
"
tbody input[type='checkbox']
"
).
live
(
'
change
'
,
function
()
{
updateActions
();
pending_actions
=
[];
$
(
"
.selected
"
).
removeClass
(
'
selected
'
);
update_confirmations
();
});
// destroy action
$
(
"
a.enabled#action-destroy
"
).
live
(
'
click
'
,
function
()
{
var
checked
=
$
(
"
table.list-machines tbody input[type='checkbox']:checked
"
);
$
(
"
.selected
"
).
removeClass
(
'
selected
'
);
$
(
this
).
addClass
(
'
selected
'
);
pending_actions
=
[];
// reset pending actions
checked
.
each
(
function
(
i
,
c
)
{
serverID
=
c
.
id
;
...
...
@@ -114,6 +121,8 @@ $("a.enabled#action-destroy").live('click', function() {
$
(
"
a.enabled#action-reboot
"
).
live
(
'
click
'
,
function
()
{
var
checked
=
$
(
"
table.list-machines tbody input[type='checkbox']:checked
"
);
$
(
"
.selected
"
).
removeClass
(
'
selected
'
);
$
(
this
).
addClass
(
'
selected
'
);
pending_actions
=
[];
// reset pending actions
checked
.
each
(
function
(
i
,
c
)
{
serverID
=
c
.
id
;
...
...
@@ -126,6 +135,8 @@ $("a.enabled#action-reboot").live('click', function() {
$
(
"
a.enabled#action-start
"
).
live
(
'
click
'
,
function
()
{
var
checked
=
$
(
"
table.list-machines tbody input[type='checkbox']:checked
"
);
$
(
"
.selected
"
).
removeClass
(
'
selected
'
);
$
(
this
).
addClass
(
'
selected
'
);
pending_actions
=
[];
// reset pending actions
checked
.
each
(
function
(
i
,
c
)
{
serverID
=
c
.
id
;
...
...
@@ -138,6 +149,8 @@ $("a.enabled#action-start").live('click', function() {
$
(
"
a.enabled#action-shutdown
"
).
live
(
'
click
'
,
function
()
{
var
checked
=
$
(
"
table.list-machines tbody input[type='checkbox']:checked
"
);
$
(
"
.selected
"
).
removeClass
(
'
selected
'
);
$
(
this
).
addClass
(
'
selected
'
);
pending_actions
=
[];
// reset pending actions
checked
.
each
(
function
(
i
,
c
)
{
serverID
=
c
.
id
;
...
...
ui/templates/standard.html
View file @
b3fafa3a
...
...
@@ -225,6 +225,9 @@ function update_machines_view(data){
});
$
(
"
#spinner
"
).
hide
();
// show all separators
$
(
"
div.machine div.separator
"
).
show
();
// hide the last one
$
(
"
div.machine:last-child
"
).
find
(
"
div.separator
"
).
hide
();
// the separator shows only when running and terminated machines are available
if
(
$
(
"
.terminated a.name
"
).
length
>
0
&&
$
(
"
.running a.name
"
).
length
>
0
)
{
...
...
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