filter_1
This commit is contained in:
76
index.php
76
index.php
@@ -224,6 +224,7 @@
|
||||
<script>
|
||||
// Map ----------------------------------------------------------------------
|
||||
|
||||
|
||||
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
||||
|
||||
var mapLink = '<a href="http://openstreetmap.org">OpenStreetMap</a>';
|
||||
@@ -306,8 +307,6 @@
|
||||
|
||||
$('.check').click(function() {
|
||||
filter = this.name;
|
||||
console.log(filter);
|
||||
|
||||
if (jQuery(this).prop("checked")) {
|
||||
jQuery.each(marker, function(key, value) {
|
||||
if (value) {
|
||||
@@ -325,7 +324,6 @@
|
||||
|
||||
function check_all(){
|
||||
jQuery.each(marker, function(key, value) {
|
||||
console.log(value);
|
||||
if (value) { value[0].addTo(mymap); }
|
||||
});
|
||||
};
|
||||
@@ -333,56 +331,38 @@
|
||||
function uncheck_all()
|
||||
{
|
||||
jQuery.each(marker, function(key, value) {
|
||||
console.log(value);
|
||||
if (value) { value[0].remove(); }
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$('#check_art').click(function(){
|
||||
if (jQuery(this).prop("checked")) {
|
||||
$('.uart').prop( "checked", true );
|
||||
check_all();
|
||||
} else {
|
||||
$('.uart').prop( "checked", false );
|
||||
uncheck_all();
|
||||
}
|
||||
});
|
||||
|
||||
$('#check_kat').click(function(){
|
||||
console.log("test");
|
||||
if (jQuery(this).prop("checked")) {
|
||||
$('.ukat').prop( "checked", true );
|
||||
check_all();
|
||||
} else {
|
||||
$('.ukat').prop( "checked", false );
|
||||
uncheck_all();
|
||||
}
|
||||
});
|
||||
|
||||
$('#check_typ').click(function(){
|
||||
if (jQuery(this).prop("checked")) {
|
||||
$('.utyp').prop( "checked", true );
|
||||
check_all();
|
||||
} else {
|
||||
$('.utyp').prop( "checked", false );
|
||||
uncheck_all();
|
||||
}
|
||||
});
|
||||
|
||||
$('#check_art').click(function(){
|
||||
if (jQuery(this).prop("checked")) {
|
||||
$('.uart').prop( "checked", true );
|
||||
check_all();
|
||||
} else {
|
||||
$('.uart').prop( "checked", false );
|
||||
uncheck_all();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('input[type=radio][name=kategorie]').on('change', function() {
|
||||
$('.td_ubet').hide();
|
||||
$('.td_utyp').hide();
|
||||
$('.td_uart').hide();
|
||||
$('.td_ukat').hide();
|
||||
check_all();
|
||||
$("input[type=checkbox]").prop('checked', $(this).prop('checked'));
|
||||
switch ($(this).val()) {
|
||||
case 'UART':
|
||||
$('.td_uart').show();
|
||||
break;
|
||||
case 'UKAT':
|
||||
$('.td_ukat').show();
|
||||
break;
|
||||
case 'UTYP':
|
||||
$('.td_utyp').show();
|
||||
break;
|
||||
case 'UBET':
|
||||
$('.td_ubet').show();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$('.td_ubet').hide();
|
||||
$('.td_utyp').hide();
|
||||
$('.td_uart').hide();
|
||||
$('.td_ukat').show();
|
||||
$('input:radio[name=kategorie]').val(['UKAT']);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user