Commit 1b48a492 authored by Daniel STAN's avatar Daniel STAN
Browse files

[wifimap/sort] cosmetique

parent 8a4d3b7c
......@@ -105,3 +105,20 @@
font-size: 0.65em;
font-weight: normal;
}
/* sorting */
.order {
display: none;
}
.order + label img {
cursor: pointer;
margin: 1px 1px 1px 1px;
vertical-align: middle;
}
.order:checked + label img {
border: 1px solid #FFF;
margin: 0;
}
......@@ -157,7 +157,6 @@ WifiMap = {
this.marker = new OpenLayers.Marker(this.mapPosition,icon);
this.layer = that.bornesLayers[type];
this.layer.addMarker(this.marker);
this.update_marker_size();
......@@ -457,19 +456,27 @@ WifiMap.ModeSwitcher = OpenLayers.Class(OpenLayers.Control.LayerSwitcher,
for( var i =0; i < 2*orders.length; i++) {
var j = Math.floor(i/2);
var choice = document.createElement('input');
var id = "choice" + i;
choice.type = 'radio';
var way = i % 2 ?'up':'down';
var label = document.createElement('label');
var img = document.createElement('img');
img.src = '/static/img/sort-' + way + '.png';
label.appendChild(img);
label.htmlFor = id;
choice.className = 'order ' + way;
choice.name = 'order';
choice.id = id;
choice.checked = way == orders[j].def;
choice.value = orders[j].name + '-' + way;
choice.onchange = this.updateOrder.bind(this);
this.orderChoice.appendChild(choice);
this.orderChoice.appendChild(document.createElement('span')); //Trick css
if( i % 2 ) {
//this.orderChoice.appendChild(document.createElement('span')); //Trick css
this.orderChoice.appendChild(label);
if( !(i % 2) )
this.orderChoice.appendChild(document.createTextNode(orders[j].label));
else
this.orderChoice.appendChild(document.createElement('br'));
}
}
},
......
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