Commit ce43a861 authored by Eric - kg6wxc's avatar Eric - kg6wxc

Merge branch 'map_to_list_links' into 'master'

enhancement: link and button to get back and forth from node_report to the map.

Closes #16

See merge request !18
parents 4e136012 2135b492
......@@ -1234,6 +1234,36 @@ map.fullscreenControl.setPosition('verticalcenterleft');
EOD;
$Content .= <<< EOD
//********* "VIEW AS LIST" button ***********
//view as list (node_report.php)
L.Control.viewAsList = L.Control.extend({
options: {
position: 'verticalcenterleft'
},
onAdd: function(map) {
var viewAsListControl = L.DomUtil.create('div', 'leaflet-control-custom leaflet-bar');
viewAsListControl.style.backgroundColor = 'white';
viewAsListControl.style.width = '30px';
viewAsListControl.style.height = '30px';
viewAsListControl.title = 'View as list (node report)';
var link = L.DomUtil.create('a', 'leaflet-bar-part leaflet-bar-part-single', viewAsListControl);
var listIcon = L.DomUtil.create('div', 'viewAsListControl', link);
listIcon.style.fontSize = '20px';
listIcon.style.verticalAlign = 'middle';
viewAsListControl.onclick = function() {
window.location = "node_report.php"
}
return viewAsListControl;
}
});
L.control.viewAsList = function(opts) {
return new L.Control.viewAsList(opts);
}
L.control.viewAsList().addTo(map);
//*********** END "VIEW AS LIST" button *************
//the search button
L.control.search({
......
......@@ -328,4 +328,19 @@ MAP_DETAILS {
}
.popupTab:target {
display: block;
}
.viewAsListControl{
height: 30px;
width: 30px;
background-image: url("../images/list-icon.png");
background-repeat: no-repeat;
background-position: center;
}
.leaflet-ruler {
height: 30px !important;
width: 30px !important;
}
.leaflet-control-layers-toggle {
height: 30px !important;
width: 30px !important;
}
\ No newline at end of file
......@@ -75,7 +75,7 @@ $node_remove_js = <<< EOD
$(".remove_node_from_main_db_form").submit(function(event) {
event.preventDefault();
var form = $(this),
remove_node_from_main_db = form.find("input[type='hidden'][name='remove_node_from_main_db']").val(),
wifi_mac_address = form.find("input[type='hidden'][name='wifi_mac_address']").val(),
......@@ -84,7 +84,7 @@ $(".remove_node_from_main_db_form").submit(function(event) {
wlan_ip = form.find("input[type='hidden'][name='wlan_ip']").val(),
admin_page = form.find("input[type='hidden'][name='admin_page']").val(),
url = form.attr("action");
var posting = $.post(url, {
admin_page: admin_page,
remove_node_from_main_db: remove_node_from_main_db,
......@@ -94,7 +94,7 @@ $(".remove_node_from_main_db_form").submit(function(event) {
wlan_ip: wlan_ip
});
posting.done(function(data) {
$("#admin_content").html(data);
});
......@@ -150,13 +150,14 @@ echo "</head>\n";
* Modifications from here down to fit your specific needs
**********************************************************************************************************************/
echo "\n\n<body class=\"wide comments meshdata\">";
echo "<a name=\"top\" id=\"top\"></a>\n";
echo "<h1 class=\"page_title\">Mesh Map Nodes</h1>\n";
echo "\n\n<body class='wide comments meshdata'>";
echo "<a name='top' id='top'></a>\n";
echo "<h1 class='page_title' style='display: inline;'>Mesh Map Nodes</h1>\n";
echo "<a href='map_display.php' style='float: right;'>View on Map</a>\n";
echo "</div>\n";
echo "<div class=\"fw-container\">\n";
echo "<div class=\"fw-body\">\n";
echo "<div class=\"content\">\n";
echo "<div class='fw-container'>\n";
echo "<div class='fw-body'>\n";
echo "<div class='content'>\n";
//added kg6wxc may 2018
/*****START*****/
......
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