Commit c8dc2a4e authored by Vassilios Karakoidas's avatar Vassilios Karakoidas
Browse files

Merge branch 'master' into logic-refactoring

parents 5dc7a813 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
......@@ -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>
......@@ -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
......
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