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
a054e54c
Commit
a054e54c
authored
Mar 29, 2011
by
Dimitris Moraitis
Browse files
fix select all/none in list view & fix position of multiple action confirm box
parent
cd3e7ead
Changes
2
Hide whitespace changes
Inline
Side-by-side
ui/static/main.css
View file @
a054e54c
...
...
@@ -933,9 +933,11 @@ div.action_error {
}
div
.confirm_multiple
{
width
:
690px
;
position
:
fixed
;
bottom
:
0
;
width
:
700px
;
height
:
30px
;
margin
:
0
0
1
0px
-3
0
px
;
margin
:
0
0
0px
-3
6
px
;
}
div
.confirm_multiple
p
{
...
...
@@ -1085,22 +1087,25 @@ div.list table #selection div.expand-icon {
top
:
-11px
;
}
div
.list
table
thead
tr
th
ul
{
ul
.dropdown-selector
{
background-color
:
#E6EEEE
;
position
:
absolute
;
margin-left
:
-4
px
;
margin-left
:
1
px
;
display
:
block
;
top
:
255px
;
font-size
:
9pt
;
width
:
40px
;
}
div
.list
table
thead
tr
th
ul
li
{
padding
:
5
px
;
ul
.dropdown-selector
li
{
padding
:
4
px
;
}
div
.list
table
thead
tr
th
ul
li
:hover
{
ul
.dropdown-selector
li
:hover
{
background-color
:
#87AADE
;
}
div
.list
table
thead
tr
th
ul
li
a
{
ul
.dropdown-selector
li
a
{
color
:
black
;
text-decoration
:
none
;
}
...
...
ui/templates/list.html
View file @
a054e54c
...
...
@@ -25,12 +25,7 @@
<tr>
<th
id=
"selection"
class=
"select-running"
>
<input
type=
"checkbox"
/>
<div
class=
"expand-icon"
></div>
<ul
style=
"display: none"
>
<li
class=
"select-all"
><a
href=
"#"
>
all
</a></li>
<li
class=
"select-none"
><a
href=
"#"
>
none
</a></li>
<li
class=
"select-group"
><a
href=
"#"
>
group
</a></li>
</ul>
<div
class=
"expand-icon"
></div>
</th>
<th
id=
"os"
>
OS
</th>
<th
id=
"name"
>
Name
</th>
...
...
@@ -41,6 +36,11 @@
</thead>
<tbody
class=
"machines"
></tbody>
</table>
<ul
class=
"dropdown-selector"
style=
"display: none"
>
<li
class=
"select-all"
><a
href=
"#"
>
all
</a></li>
<li
class=
"select-none"
><a
href=
"#"
>
none
</a></li>
<li
class=
"select-group"
><a
href=
"#"
>
group
</a></li>
</ul>
</div>
<script>
...
...
@@ -54,33 +54,30 @@ $("table thead tr th#selection :checkbox").live('change', function() {
$
(
"
:checkbox
"
).
attr
(
"
checked
"
,
false
);
}
updateActions
();
return
false
;
});
// select all/none/group from drop down menu
$
(
"
table thead tr th#selection ul li
"
).
live
(
'
click
'
,
function
()
{
// all or none?
if
(
$
(
this
).
attr
(
"
class
"
)
==
"
select-all
"
||
$
(
this
).
attr
(
"
class
"
)
==
"
select-none
"
)
{
var
all
=
(
$
(
this
).
attr
(
"
class
"
)
==
"
select-all
"
);
// toggle checkboxes
$
(
"
:checkbox
"
).
attr
(
"
checked
"
,
all
);
}
else
if
(
$
(
this
).
attr
(
"
class
"
)
==
"
select-group
"
){
// TODO: This shoud select only the vms in the selected group
// right now the folowing has the functionality of select-all
$
(
"
:checkbox
"
).
attr
(
"
checked
"
,
true
);
}
// update actions
updateActions
();
return
false
;
// select all from drop down menu
$
(
"
ul.dropdown-selector li.select-all a
"
).
live
(
'
click
'
,
function
()
{
$
(
"
:checkbox
"
).
attr
(
"
checked
"
,
true
);
return
false
;
});
//
menu toggle, running
menu
$
(
"
table.list-machines thead tr th#selection div.expand-icon
"
).
live
(
'
click
'
,
function
()
{
$
(
"
table.list-machines thead tr th#selection ul
"
).
slideToggle
(
'
medium
'
);
return
false
;
//
select none from drop down
menu
$
(
"
ul.dropdown-selector li.select-none a
"
).
live
(
'
click
'
,
function
()
{
$
(
"
:checkbox
"
).
attr
(
"
checked
"
,
false
);
return
false
;
});
$
(
"
table.list-machines thead tr th#selection ul
"
).
live
(
'
click
'
,
function
()
{
$
(
"
table.list-machines thead tr th#selection ul
"
).
slideToggle
(
'
medium
'
);
// select group from drop down menu
$
(
"
ul.dropdown-selector li.select-group a
"
).
live
(
'
click
'
,
function
()
{
$
(
"
:checkbox
"
).
attr
(
"
checked
"
,
true
);
return
false
;
});
// menu toggle, running menu
$
(
"
table.list-machines thead tr th#selection .expand-icon
"
).
click
(
function
(
obj
)
{
$
(
"
.dropdown-selector
"
).
slideToggle
(
'
medium
'
);
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