Commit 6e3c3c30 authored by Dimitris Moraitis's avatar Dimitris Moraitis
Browse files

improve positioning of confirm box & update actions on select all/none

parent 1984f6c9
......@@ -61,6 +61,7 @@ $("table thead tr th#selection :checkbox").live('change', function() {
$("ul.dropdown-selector li.select-all a").live('click', function() {
$(":checkbox").attr("checked", true);
$(".dropdown-selector").slideToggle('medium');
updateActions();
return false;
});
......@@ -68,6 +69,7 @@ $("ul.dropdown-selector li.select-all a").live('click', function() {
$("ul.dropdown-selector li.select-none a").live('click', function() {
$(":checkbox").attr("checked", false);
$(".dropdown-selector").slideToggle('medium');
updateActions();
return false;
});
......@@ -75,6 +77,7 @@ $("ul.dropdown-selector li.select-none a").live('click', function() {
$("ul.dropdown-selector li.select-group a").live('click', function() {
$(":checkbox").attr("checked", true);
$(".dropdown-selector").slideToggle('medium');
updateActions();
return false;
});
......@@ -289,6 +292,15 @@ if (flavors.length == 0) {
// set the label of the multiple buttons
$('div.confirm_multiple button.yes').text('Confirm');
$('div.confirm_multiple button.no').text('Cancel');
// reposition multiple confirmation box on window resize
$(window).resize(function(){
if (this.innerHeight - 200 < $('#machinesview').height())
$('.confirm_multiple').addClass('fixed');
else
$('.confirm_multiple').removeClass('fixed');
});
// start updating vm list
update_vms(UPDATE_INTERVAL);
......
......@@ -446,11 +446,4 @@ if (flavors.length > 0) {
// create tabs for main menu
$("ul.tabs").tabs("div.panes ul");
$(window).resize(function(){
if (this.innerHeight - 200 < $('#machinesview').height())
$('.confirm_multiple').addClass('fixed');
else
$('.confirm_multiple').removeClass('fixed');
});
</script>
......@@ -246,7 +246,7 @@ function update_machines_view(data){
}
// set confirm box position
if (window.innerHeight - 200 < $('#machinesview').height())
if (window.innerHeight - 220 < $('#machinesview').height())
$('.confirm_multiple').addClass('fixed');
else
$('.confirm_multiple').removeClass('fixed');
......@@ -277,6 +277,15 @@ if (flavors.length == 0) {
// set the label of the multiple buttons
$('div.confirm_multiple button.yes').text('Confirm All');
$('div.confirm_multiple button.no').text('Cancel All');
// reposition multiple confirmation box on window resize
$(window).resize(function(){
if (this.innerHeight - 220 < $('#machinesview').height())
$('.confirm_multiple').addClass('fixed');
else
$('.confirm_multiple').removeClass('fixed');
});
// start updating vm list
update_vms(UPDATE_INTERVAL);
</script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment