Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mesh
meshmap
Commits
2135b492
Commit
2135b492
authored
Jun 22, 2020
by
Eric
Browse files
enhancement: link and button to get back and forth from node_report to the map.
Fixes
#16
just for @ke6bxt :)
parent
023b2d20
Changes
3
Hide whitespace changes
Inline
Side-by-side
scripts/map_functions.inc
View file @
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
({
...
...
webpage/css/meshmap-default.css
View file @
2135b492
...
...
@@ -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
webpage/node_report.php
View file @
2135b492
...
...
@@ -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*****/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment