This commit is contained in:
Walter Hupfeld 2023-07-28 22:36:31 +02:00
parent 0ae8f915c4
commit e18ee929a6
3 changed files with 55 additions and 37 deletions

View File

@ -44,7 +44,6 @@ $arrWochentage = array (
7 => "Samstag" 7 => "Samstag"
); );
$arrCategory = array ( $arrCategory = array (
1 => "Unfall mit Getöteten", 1 => "Unfall mit Getöteten",
2 => "Unfall mit Schwerverletztem", 2 => "Unfall mit Schwerverletztem",
@ -108,7 +107,6 @@ $arrMarkerType = array (
5=>"truckMarker", 5=>"truckMarker",
); );
$arrIcon = array ( $arrIcon = array (
0 => "<i class='wa bg-primary fa fa-info'></i>", 0 => "<i class='wa bg-primary fa fa-info'></i>",
1 => "<i class='wa bg-danger fa fa-male'></i>", 1 => "<i class='wa bg-danger fa fa-male'></i>",

View File

@ -220,9 +220,8 @@
<div id="loader"><img src="css/images/ajax-loader.gif"></div> <div id="loader"><img src="css/images/ajax-loader.gif"></div>
<script> <script>
// Map ---------------------------------------------------------------------- // Map ----------------------------------------------------------------------
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>); var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
@ -311,7 +310,6 @@
if (jQuery(this).prop("checked")) { if (jQuery(this).prop("checked")) {
jQuery.each(marker, function(key, value) { jQuery.each(marker, function(key, value) {
console.log(value);
if (value) { if (value) {
if (filter.match(value[1])) { value[0].addTo(mymap); } if (filter.match(value[1])) { value[0].addTo(mymap); }
} }
@ -325,11 +323,29 @@
} }
}) })
function check_all(){
jQuery.each(marker, function(key, value) {
console.log(value);
if (value) { value[0].addTo(mymap); }
});
};
function uncheck_all()
{
jQuery.each(marker, function(key, value) {
console.log(value);
if (value) { value[0].remove(); }
});
};
$('#check_art').click(function(){ $('#check_art').click(function(){
if (jQuery(this).prop("checked")) { if (jQuery(this).prop("checked")) {
$('.uart').prop( "checked", true ); $('.uart').prop( "checked", true );
check_all();
} else { } else {
$('.uart').prop( "checked", false ); $('.uart').prop( "checked", false );
uncheck_all();
} }
}); });
@ -337,24 +353,30 @@
console.log("test"); console.log("test");
if (jQuery(this).prop("checked")) { if (jQuery(this).prop("checked")) {
$('.ukat').prop( "checked", true ); $('.ukat').prop( "checked", true );
check_all();
} else { } else {
$('.ukat').prop( "checked", false ); $('.ukat').prop( "checked", false );
uncheck_all();
} }
}); });
$('#check_typ').click(function(){ $('#check_typ').click(function(){
if (jQuery(this).prop("checked")) { if (jQuery(this).prop("checked")) {
$('.utyp').prop( "checked", true ); $('.utyp').prop( "checked", true );
check_all();
} else { } else {
$('.utyp').prop( "checked", false ); $('.utyp').prop( "checked", false );
uncheck_all();
} }
}); });
$('#check_art').click(function(){ $('#check_art').click(function(){
if (jQuery(this).prop("checked")) { if (jQuery(this).prop("checked")) {
$('.uart').prop( "checked", true ); $('.uart').prop( "checked", true );
check_all();
} else { } else {
$('.uart').prop( "checked", false ); $('.uart').prop( "checked", false );
uncheck_all();
} }
}); });

View File

@ -106,7 +106,6 @@ function nl2br2($string) {
$strTable.="<tr><td><input type='checkbox' name='UKATEGORIE_".$row['UKATEGORIE']."' id='UKATEGORIE_".$row['UKATEGORIE']."' class='check ukat' checked='checked' ></td>" $strTable.="<tr><td><input type='checkbox' name='UKATEGORIE_".$row['UKATEGORIE']."' id='UKATEGORIE_".$row['UKATEGORIE']."' class='check ukat' checked='checked' ></td>"
."<td>".$arrCategory[$row['UKATEGORIE']]."</td><td>".$row['anz']."</td></tr>\n"; ."<td>".$arrCategory[$row['UKATEGORIE']]."</td><td>".$row['anz']."</td></tr>\n";
} }
$strTable.="</table>"; $strTable.="</table>";
@ -132,7 +131,6 @@ function nl2br2($string) {
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_KRAD' id='BETEILIGT_KRAD' class='check' checked='checked' ></td><td>Krafträder</td><td>".$row['krad']."</td></tr>"; $strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_KRAD' id='BETEILIGT_KRAD' class='check' checked='checked' ></td><td>Krafträder</td><td>".$row['krad']."</td></tr>";
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_LKW' id='BETEILIGT_LKW' class='check' checked='checked' ></td><td>LKWs</td><td>".$row['lkw']."</td></tr>\n"; $strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_LKW' id='BETEILIGT_LKW' class='check' checked='checked' ></td><td>LKWs</td><td>".$row['lkw']."</td></tr>\n";
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_SONSTIGES' id='BETEILIGT_SONSTIGES' class='check' checked='checked' ></td><td>Sonstiges</td><td>".$row['sonstiges']."</td></tr>\n"; $strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_SONSTIGES' id='BETEILIGT_SONSTIGES' class='check' checked='checked' ></td><td>Sonstiges</td><td>".$row['sonstiges']."</td></tr>\n";
} }
/* /*
$strSQL="SELECT count(*) as count $strSQL="SELECT count(*) as count