Commit 468a4f0f authored by Daniel Stan's avatar Daniel Stan

Merge branch 'wifi_map_modifs' into devel_vo

Conflicts:
	static/css/wifimap.css
	static/js/wifimap.js
parents 59c96141 23947078
......@@ -99,7 +99,7 @@
font-size: 75%;
}
.borne .pan_to {
.borne .pan_to , .borne .edit {
float: right;
margin-top: 10px;
font-size: 0.65em;
......@@ -110,6 +110,11 @@
color: red;
}
.borne .edit {
margin-left: 3px;
}
/* sorting */
.order {
......
......@@ -25,6 +25,7 @@ window.addEventListener('load',function () { WifiMap.init(); });
//Wifi map !
WifiMap = {
modeSwitcher: null,
'init': function() {
var that = this;
this.map = new OpenLayers.Map({'div': 'map','controls':[]});
......@@ -63,7 +64,7 @@ WifiMap = {
//Layer de base (OSM actuellement)
this.map.addLayers([this.layer]);
//Controles divers (ceux ci-dessous sont visibles)
this.map.addControl(new WifiMap.ModeSwitcher({'wifiMap': this}));
this.map.addControl(this.modeSwitcher = new WifiMap.ModeSwitcher({'wifiMap': this}));
this.map.addControl(new OpenLayers.Control.Navigation());
this.map.addControl(new OpenLayers.Control.PanZoom());
......@@ -303,6 +304,13 @@ WifiMap = {
else if( child.tagName == 'uptime')
templates.fillSpanClass(html,'uptime',
format_uptime(parseInt(getInnerText(child))));
else if( child.tagName == 'editable') {
var edit = templates.getInstance(html, 'edit');
edit.addEventListener('click', function (event) {
alert('Not implemented yet');
event.preventDefault();
});
}
else if( child.tagName == 'client_count') {
this.count = parseInt(getInnerText(child));
var c = parseInt(getInnerText(child));
......@@ -445,6 +453,7 @@ WifiMap = {
this.listeBornes[hostname].update_info(xml);
}
this.sort();
this.modeSwitcher.updateMap();
},
//Met à jour la date de dernière màj
......
......@@ -16,6 +16,8 @@ Dernière mise à jour il y a <label id="last_update"> </label>
<div id="toolbar">
<div id="borne_template" class="borne template">
<h3>
<a href="#" class="edit template"><img src="/static/img/edit.png"/>
</a>
<a href="#" class="pan_to template"><img src="/static/img/point.png"/>
<span class="location template content"></span>
</a>
......
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