Remove dead code
This commit is contained in:
parent
6b586f6e07
commit
5f898194f5
2 changed files with 20 additions and 78 deletions
|
|
@ -190,15 +190,6 @@ function teszt(id, correctAns) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function scrollTo(where) {
|
|
||||||
$("html, body").animate(
|
|
||||||
{
|
|
||||||
scrollTop: $(where).offset().top - 100,
|
|
||||||
},
|
|
||||||
1000,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function howMany() {
|
function howMany() {
|
||||||
var localString = "localStorage.teszt";
|
var localString = "localStorage.teszt";
|
||||||
numberOfPreviousTests = 1; //number of previous tests+1
|
numberOfPreviousTests = 1; //number of previous tests+1
|
||||||
|
|
@ -266,28 +257,13 @@ setInterval(function () {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
eredmeny();
|
eredmeny();
|
||||||
|
|
||||||
// Initialize year dropdown with dynamic years from question data
|
// Populate the year dropdown, then the month dropdown for the default "all".
|
||||||
if (typeof initializeYearDropdown === "function") {
|
initializeYearDropdown().then(() => initializeMonthDropdown("all/"));
|
||||||
initializeYearDropdown().then(() => {
|
|
||||||
// Initialize month dropdown for default "all" year selection
|
|
||||||
if (typeof initializeMonthDropdown === "function") {
|
|
||||||
initializeMonthDropdown("all/");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$(window).on("mousewheel", function () {
|
$(window).on("mousewheel", function () {
|
||||||
$("body").stop();
|
$("body").stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ajaxError(function (event, jqxhr, settings) {
|
|
||||||
if (!settings.secondExec) {
|
|
||||||
settings.secondExec = true;
|
|
||||||
setTimeout(function () {
|
|
||||||
$.ajax(settings);
|
|
||||||
}, 500);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
aspect();
|
aspect();
|
||||||
|
|
||||||
$("#bfooldal").click(function () {
|
$("#bfooldal").click(function () {
|
||||||
|
|
@ -333,36 +309,7 @@ $(document).ready(function () {
|
||||||
isSearch = false;
|
isSearch = false;
|
||||||
});
|
});
|
||||||
$("#evszam").change(function () {
|
$("#evszam").change(function () {
|
||||||
const selectedYear = $("#evszam").val();
|
initializeMonthDropdown($("#evszam").val());
|
||||||
|
|
||||||
// Initialize month dropdown dynamically based on selected year
|
|
||||||
if (typeof initializeMonthDropdown === "function") {
|
|
||||||
initializeMonthDropdown(selectedYear);
|
|
||||||
} else {
|
|
||||||
// Fallback to original logic if dynamic function not available
|
|
||||||
if (selectedYear == "2006/") {
|
|
||||||
$(".f2006").show();
|
|
||||||
$(".f2016").hide();
|
|
||||||
$(".f").hide();
|
|
||||||
$(".fnem17").hide();
|
|
||||||
} else if (selectedYear == "2016/") {
|
|
||||||
$(".f2006").hide();
|
|
||||||
$(".f2016").show();
|
|
||||||
$(".f").show();
|
|
||||||
$(".fnem17").show();
|
|
||||||
} else if (selectedYear == "2017/") {
|
|
||||||
$(".f2006").hide();
|
|
||||||
$(".f2016").hide();
|
|
||||||
$(".f").show();
|
|
||||||
$(".fnem17").hide();
|
|
||||||
} else {
|
|
||||||
$(".f2006").hide();
|
|
||||||
$(".f2016").hide();
|
|
||||||
$(".f").show();
|
|
||||||
$(".fnem17").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#honap").val("all");
|
$("#honap").val("all");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ const initializeMonthDropdown = (selectedYear) => {
|
||||||
// Convert to sorted array and create options
|
// Convert to sorted array and create options
|
||||||
const uniqueMonths = Array.from(monthSet).sort();
|
const uniqueMonths = Array.from(monthSet).sort();
|
||||||
uniqueMonths.forEach((month) => {
|
uniqueMonths.forEach((month) => {
|
||||||
monthOptions += `<option value="${month}" class="fdynamic">${getMonthLabel(month)}</option>`;
|
monthOptions += `<option value="${month}">${getMonthLabel(month)}</option>`;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Extract year from selected value (e.g., "2024/" -> "2024")
|
// Extract year from selected value (e.g., "2024/" -> "2024")
|
||||||
|
|
@ -220,44 +220,39 @@ const initializeMonthDropdown = (selectedYear) => {
|
||||||
// Special handling for known year patterns
|
// Special handling for known year patterns
|
||||||
if (year === "2006") {
|
if (year === "2006") {
|
||||||
// Preserve existing 2006 logic but add any new months found
|
// Preserve existing 2006 logic but add any new months found
|
||||||
monthOptions +=
|
monthOptions += '<option value="1">Február-Március</option>';
|
||||||
'<option value="1" class="f2006">Február-Március</option>';
|
monthOptions += '<option value="2">Május-Június</option>';
|
||||||
monthOptions += '<option value="2" class="f2006">Május-Június</option>';
|
monthOptions += '<option value="3">Október-November</option>';
|
||||||
monthOptions +=
|
|
||||||
'<option value="3" class="f2006">Október-November</option>';
|
|
||||||
|
|
||||||
// Add any dynamic months not covered by the standard ones
|
// Add any dynamic months not covered by the standard ones
|
||||||
uniqueMonths.forEach((month) => {
|
uniqueMonths.forEach((month) => {
|
||||||
if (!["1", "2", "3"].includes(month)) {
|
if (!["1", "2", "3"].includes(month)) {
|
||||||
monthOptions += `<option value="${month}" class="f2006">${getMonthLabel(month)}</option>`;
|
monthOptions += `<option value="${month}">${getMonthLabel(month)}</option>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (year === "2016") {
|
} else if (year === "2016") {
|
||||||
// Preserve existing 2016 logic but add any new months found
|
// Preserve existing 2016 logic but add any new months found
|
||||||
monthOptions += '<option value="1" class="f">Május-Június</option>';
|
monthOptions += '<option value="1">Május-Június</option>';
|
||||||
monthOptions += '<option value="2" class="f">Október-November</option>';
|
monthOptions += '<option value="2">Október-November</option>';
|
||||||
monthOptions +=
|
monthOptions += '<option value="m1">1. Mintafeladatsor</option>';
|
||||||
'<option value="m1" class="f2016">1. Mintafeladatsor</option>';
|
monthOptions += '<option value="m2">2. Mintafeladatsor</option>';
|
||||||
monthOptions +=
|
monthOptions += '<option value="m3">3. Mintafeladatsor</option>';
|
||||||
'<option value="m2" class="f2016">2. Mintafeladatsor</option>';
|
|
||||||
monthOptions +=
|
|
||||||
'<option value="m3" class="f2016">3. Mintafeladatsor</option>';
|
|
||||||
|
|
||||||
// Add any dynamic months not covered
|
// Add any dynamic months not covered
|
||||||
uniqueMonths.forEach((month) => {
|
uniqueMonths.forEach((month) => {
|
||||||
if (!["1", "2", "m1", "m2", "m3"].includes(month)) {
|
if (!["1", "2", "m1", "m2", "m3"].includes(month)) {
|
||||||
monthOptions += `<option value="${month}" class="f">${getMonthLabel(month)}</option>`;
|
monthOptions += `<option value="${month}">${getMonthLabel(month)}</option>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (year === "2017") {
|
} else if (year === "2017") {
|
||||||
// Preserve existing 2017 logic but add any new months found
|
// Preserve existing 2017 logic but add any new months found
|
||||||
monthOptions += '<option value="1" class="f">Május-Június</option>';
|
monthOptions += '<option value="1">Május-Június</option>';
|
||||||
monthOptions += '<option value="2" class="f">Október-November</option>';
|
monthOptions += '<option value="2">Október-November</option>';
|
||||||
|
|
||||||
// Add any dynamic months
|
// Add any dynamic months
|
||||||
uniqueMonths.forEach((month) => {
|
uniqueMonths.forEach((month) => {
|
||||||
if (!["1", "2"].includes(month)) {
|
if (!["1", "2"].includes(month)) {
|
||||||
monthOptions += `<option value="${month}" class="f">${getMonthLabel(month)}</option>`;
|
monthOptions += `<option value="${month}">${getMonthLabel(month)}</option>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -266,16 +261,16 @@ const initializeMonthDropdown = (selectedYear) => {
|
||||||
const hasStandard2 = uniqueMonths.includes("2");
|
const hasStandard2 = uniqueMonths.includes("2");
|
||||||
|
|
||||||
if (hasStandard1) {
|
if (hasStandard1) {
|
||||||
monthOptions += '<option value="1" class="f">Május-Június</option>';
|
monthOptions += '<option value="1">Május-Június</option>';
|
||||||
}
|
}
|
||||||
if (hasStandard2) {
|
if (hasStandard2) {
|
||||||
monthOptions += '<option value="2" class="f">Október-November</option>';
|
monthOptions += '<option value="2">Október-November</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add any non-standard months
|
// Add any non-standard months
|
||||||
uniqueMonths.forEach((month) => {
|
uniqueMonths.forEach((month) => {
|
||||||
if (!["1", "2"].includes(month)) {
|
if (!["1", "2"].includes(month)) {
|
||||||
monthOptions += `<option value="${month}" class="f">${getMonthLabel(month)}</option>`;
|
monthOptions += `<option value="${month}">${getMonthLabel(month)}</option>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue