Commit c8f3764b authored by Dimitris Moraitis's avatar Dimitris Moraitis
Browse files

change ids to classes

parent b2065c64
......@@ -824,7 +824,7 @@ a#standard, a#list, a#single {
text-decoration: none;
height: 15px;
width: 17px;
padding: 0px 8px 1px 9px;
padding: 1px 8px 2px 9px;
font-size: 11px;
}
......@@ -1501,7 +1501,7 @@ div.list table thead .sorting_desc {
background-image: url(desc.gif);
}
div.list table #selection div.expand-icon {
div.list table .selection div.expand-icon {
background-image: url(asc.gif);
background-repeat: no-repeat;
position: relative;
......@@ -1535,34 +1535,34 @@ ul.dropdown-selector li a{
text-decoration: none;
}
div.list table thead #os {
width: 20px !important;
vertical-align:middle;
}
div.list table span.imagetag {
display: none;
}
div.list table #selection {
div.list table thead .vmos {
width: 20px !important;
vertical-align:middle;
}
div.list table .selection {
width: 20px !important;
text-align: left;
background-image: none;
}
div.list table thead #flavor {
div.list table thead .vmflavor {
width: 100px !important;
}
div.list table thead #group {
div.list table thead .vmgroup {
width: 40px !important;
}
div.list table thead #status {
div.list table thead .vmstatus {
width: 50px !important;
}
div.list table thead #name {
div.list table thead .vmname {
width: 70px !important;
}
......
......@@ -24,15 +24,15 @@
<table class="list-machines" style="display: none">
<thead>
<tr>
<th id="selection" class="select-running">
<th class="selection select-running">
<input type="checkbox"/>
<div class="expand-icon"></div>
</th>
<th id="os">{% trans "OS" %}</th>
<th id="name">{% trans "Name" %}</th>
<th id="flavor">{% trans "Flavor" %}</th>
<th id="group">{% trans "Group" %}</th>
<th id="status">{% trans "Status" %}</th>
<th class="vmos">{% trans "OS" %}</th>
<th class="vmname">{% trans "Name" %}</th>
<th class="vmflavor">{% trans "Flavor" %}</th>
<th class="vmgroup">{% trans "Group" %}</th>
<th class="vmstatus">{% trans "Status" %}</th>
</tr>
</thead>
<tbody class="machines"></tbody>
......@@ -48,7 +48,7 @@
<script>
// select/deselect all from checkbox widget of table headers
$("table thead tr th#selection :checkbox").live('change', function() {
$("table thead tr th.selection :checkbox").live('change', function() {
if ( $(this).is(":checked") ) {
$(":checkbox").attr("checked", true);
}
......@@ -84,7 +84,7 @@ $("ul.dropdown-selector li.select-group a").live('click', function() {
});
// menu toggle, running menu
$("table.list-machines thead tr th#selection .expand-icon").click( function (obj) {
$("table.list-machines thead tr th.selection .expand-icon").click( function (obj) {
$(".dropdown-selector").slideToggle('medium');
return false;
});
......@@ -342,17 +342,19 @@ var vmTable = $("div.list table.list-machines").dataTable({
});
// basic functions executed on page load
if (images.length == 0) {
// populate image list
update_images();
}
if (flavors.length == 0) {
// configure flavors
update_flavors();
}
if (images.length == 0) {
// populate image list
update_images();
}
// 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())
......@@ -360,6 +362,7 @@ $(window).resize(function(){
else
$('.confirm_multiple').removeClass('fixed');
});
// start updating vm list
update_vms(UPDATE_INTERVAL);
......
......@@ -299,7 +299,7 @@ function update_machines_view(data){
existing.find(".status").text(STATUS_MESSAGES[server.status]);
} else if (['STOPPED','ERROR'].indexOf(server.status) >= 0 &&
[STATUS_MESSAGES['ACTIVE'], STATUS_MESSAGES['BUILD'], STATUS_MESSAGES['REBOOT'],
'Shutting down'].indexOf(existing.find(".status").text()) >= 0) {
'Shutting down', 'Starting'].indexOf(existing.find(".status").text()) >= 0) {
// from active, building, rebooting, or shutting down to stopped or on error
// shutting down is not an api state, it means the server is active
moved = existing.clone().appendTo(".terminated");
......@@ -328,6 +328,7 @@ function update_machines_view(data){
existing.find('.spinner').show();
}
}
//existing.find(".status").text(STATUS_MESSAGES[server.status]);
existing.find("a.name span.name").text(server.name.substring(0,100));
existing.find("a.ip span.public").text(String(server.addresses.values[0].values[0].addr).replace(',',' '));
} else if (server.status != 'DELETED') {
......@@ -355,8 +356,7 @@ function update_machines_view(data){
$('div.#' + server.id + ' a.action-shutdown').hide();
$('div.#' + server.id + ' a.action-destroy').addClass('destroy-padding');
}
} else if (server.status == 'DELETED') {
}
}
});
$("#spinner").hide();
......@@ -408,9 +408,11 @@ if (flavors.length == 0) {
// configure flavors
update_flavors();
}
// 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())
......@@ -418,6 +420,7 @@ $(window).resize(function(){
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