2022-01-20 22:44:32 +08:00
|
|
|
$(document).ready( function () {
|
2023-06-15 20:14:10 +08:00
|
|
|
|
|
|
|
|
// Use Jquery to hide div ca_state
|
|
|
|
|
|
2022-11-16 00:07:58 +08:00
|
|
|
$('#station_locations_table').DataTable({
|
2024-01-04 11:03:11 +08:00
|
|
|
"stateSave": true,
|
|
|
|
|
"language": {
|
2024-01-04 11:18:20 +08:00
|
|
|
url: getDataTablesLanguageUrl(),
|
2024-01-04 11:03:11 +08:00
|
|
|
}
|
2022-11-16 00:07:58 +08:00
|
|
|
});
|
2023-06-15 20:14:10 +08:00
|
|
|
|
|
|
|
|
$("#canada_state").hide();
|
2024-05-22 20:36:37 +08:00
|
|
|
$("#aland_state").hide();
|
2024-05-22 20:43:31 +08:00
|
|
|
$("#asiatic_russia_state").hide();
|
2024-05-22 20:47:45 +08:00
|
|
|
$("#belarus_state").hide();
|
2024-05-22 20:51:38 +08:00
|
|
|
$("#mexico_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2023-06-15 20:14:10 +08:00
|
|
|
|
|
|
|
|
var selectedDXCCID = $('#dxcc_select').find(":selected").val();
|
|
|
|
|
|
|
|
|
|
if(selectedDXCCID == '1'){
|
|
|
|
|
$("#canada_state").show();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 20:43:31 +08:00
|
|
|
$("#asiatic_russia_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#mexico_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2023-06-15 20:14:10 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-22 20:36:37 +08:00
|
|
|
// Show Aland States if Aland is selected
|
|
|
|
|
if(selectedDXCCID == '5'){
|
|
|
|
|
$("#aland_state").show();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 20:43:31 +08:00
|
|
|
$("#asiatic_russia_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#mexico_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 20:43:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Show Asiatic Russia States if Asiatic Russia is selected
|
|
|
|
|
if(selectedDXCCID == '15'){
|
|
|
|
|
$("#asiatic_russia_state").show();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#mexico_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 20:36:37 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-22 20:47:45 +08:00
|
|
|
// Show Belarus States if Belarus is selected
|
|
|
|
|
if(selectedDXCCID == '27'){
|
|
|
|
|
$("#belarus_state").show();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#mexico_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 20:47:45 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-22 20:51:38 +08:00
|
|
|
// Show Mexico States if Mexico is selected
|
|
|
|
|
if(selectedDXCCID == '50'){
|
|
|
|
|
$("#mexico_state").show();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Show EU Russia States if EU Russia is selected
|
|
|
|
|
if(selectedDXCCID == '54'){
|
|
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
|
|
|
|
$("#eu_russia_state").show();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Show Argentina States if Argentina is selected
|
|
|
|
|
if(selectedDXCCID == '100'){
|
|
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
|
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#argentina_state").show();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Show Brazil States if Brazil is selected
|
|
|
|
|
if(selectedDXCCID == '108'){
|
|
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
|
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#argentina_state").hide();
|
|
|
|
|
$("#brazil_state").show();
|
2024-05-22 20:51:38 +08:00
|
|
|
}
|
|
|
|
|
|
2023-06-15 20:14:10 +08:00
|
|
|
$('#dxcc_select').change(function(){
|
2024-05-23 21:45:38 +08:00
|
|
|
if($(this).val() == '1'){
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").show();
|
|
|
|
|
$("#us_state").hide();
|
|
|
|
|
$("#eu_russia_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 20:36:37 +08:00
|
|
|
} else if($(this).val() == '5') {
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
2024-05-22 20:36:37 +08:00
|
|
|
$("#aland_state").show();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 20:43:31 +08:00
|
|
|
} else if($(this).val() == '15') {
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
2024-05-22 20:43:31 +08:00
|
|
|
$("#asiatic_russia_state").show();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 20:47:45 +08:00
|
|
|
} else if($(this).val() == '27') {
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#mexico_state").hide();
|
2024-05-22 20:47:45 +08:00
|
|
|
$("#belarus_state").show();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 20:51:38 +08:00
|
|
|
} else if($(this).val() == '50') {
|
|
|
|
|
$("#mexico_state").show();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
$("#eu_russia_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 21:09:19 +08:00
|
|
|
} else if($(this).val() == '54') {
|
|
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
|
|
|
|
$("#eu_russia_state").show();
|
2024-05-22 21:16:29 +08:00
|
|
|
$("#argentina_state").hide();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
2024-05-22 21:16:29 +08:00
|
|
|
} else if($(this).val() == '100') {
|
|
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
|
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#argentina_state").show();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#brazil_state").hide();
|
|
|
|
|
} else if($(this).val() == '108') {
|
|
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
|
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").hide();
|
|
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#argentina_state").hide();
|
|
|
|
|
$("#brazil_state").show();
|
2023-06-15 20:14:10 +08:00
|
|
|
} else {
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#mexico_state").hide();
|
|
|
|
|
$("#belarus_state").hide();
|
|
|
|
|
$("#asiatic_russia_state").hide();
|
|
|
|
|
$("#aland_state").hide();
|
2023-06-15 20:14:10 +08:00
|
|
|
$("#canada_state").hide();
|
|
|
|
|
$("#us_state").show();
|
2024-05-23 21:45:38 +08:00
|
|
|
$("#eu_russia_state").hide();
|
|
|
|
|
$("#argentina_state").hide();
|
|
|
|
|
$("#brazil_state").hide();
|
2023-06-15 20:14:10 +08:00
|
|
|
}
|
|
|
|
|
});
|
2022-11-16 00:07:58 +08:00
|
|
|
} );
|