Commit b3fafa3a authored by Georgios Gousios's avatar Georgios Gousios
Browse files

Merge branch 'master' of https://code.grnet.gr/git/synnefo

parents efab3073 ac49a70a
......@@ -532,8 +532,8 @@ div.machine div.actions a.more {
}
div.machine div.actions a:hover{
color: orange !important;
text-decoration: none;
color: black !important;
text-decoration: underline;
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: none;
color: black !important;
text-decoration: underline;
}
input.machine {
......@@ -1160,4 +1160,4 @@ div.list table thead #name {
.message {
display: none;
}
\ No newline at end of file
}
......@@ -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();
}
}
......
......@@ -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;
......
......@@ -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) {
......
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