From 99df19347b36ef72f3d33dec44797f7b217feecf Mon Sep 17 00:00:00 2001 From: = Date: Sun, 19 Jan 2025 12:31:25 -0500 Subject: [PATCH] Fix schedules formatting --- app/frontend/static/assets/css/base-style.css | 13 +++++ .../templates/panel/server_schedule_edit.html | 52 +++++++++++++------ .../templates/panel/server_schedules.html | 2 +- 3 files changed, 49 insertions(+), 18 deletions(-) diff --git a/app/frontend/static/assets/css/base-style.css b/app/frontend/static/assets/css/base-style.css index 29df20c2..53fd40f9 100644 --- a/app/frontend/static/assets/css/base-style.css +++ b/app/frontend/static/assets/css/base-style.css @@ -30946,4 +30946,17 @@ body.invoice-page.invoice-2 table tr td { text-align: center; } +/* Hide scrollbar for Chrome, Safari and Opera */ +.no-scroll::-webkit-scrollbar { + display: none; +} + +/* Hide scrollbar for IE, Edge and Firefox */ +.no-scroll { + -ms-overflow-style: none; + /* IE and Edge */ + scrollbar-width: none; + /* Firefox */ +} + /*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/app/frontend/templates/panel/server_schedule_edit.html b/app/frontend/templates/panel/server_schedule_edit.html index 1153de26..d6b64429 100644 --- a/app/frontend/templates/panel/server_schedule_edit.html +++ b/app/frontend/templates/panel/server_schedule_edit.html @@ -105,7 +105,7 @@ data['lang']) }} -
+
@@ -113,21 +113,21 @@
-
+
-
+
-
+
@@ -349,10 +349,12 @@ function yesnoCheck() { if (document.getElementById('action').value == "command") { - document.getElementById("ifYes").style.display = "block"; + document.getElementById("ifYes").classList.add("d-block"); + document.getElementById("ifYes").classList.remove("d-none"); document.getElementById("command_input").required = true; } else { - document.getElementById("ifYes").style.display = "none"; + document.getElementById("ifYes").classList.add("d-none"); + document.getElementById("ifYes").classList.remove("d-block"); document.getElementById("command_input").required = false; } if (document.getElementById('action').value == "backup") { @@ -368,40 +370,56 @@ } function basicAdvanced() { if (document.getElementById('difficulty').value == "advanced") { - document.getElementById("ifAdvanced").style.display = "block"; - document.getElementById("ifReaction").style.display = "none"; - document.getElementById("ifBasic").style.display = "none"; + document.getElementById("ifAdvanced").classList.add("d-block"); + document.getElementById("ifReaction").classList.add("d-none"); + document.getElementById("ifBasic").classList.add("d-none"); + document.getElementById("ifAdvanced").classList.remove("d-none"); + document.getElementById("ifReaction").classList.remove("d-block"); + document.getElementById("ifBasic").classList.remove("d-block"); document.getElementById("delay").required = false; document.getElementById("parent").required = false; document.getElementById("interval").required = false; document.getElementById("time").required = false; + document.getElementById("ifDays").classList.add("d-none"); + document.getElementById("ifDays").classList.remove("d-block"); } else if (document.getElementById('difficulty').value == "reaction") { - document.getElementById("ifReaction").style.display = "block"; - document.getElementById("ifBasic").style.display = "none"; - document.getElementById("ifAdvanced").style.display = "none"; + document.getElementById("ifReaction").classList.add("d-block"); + document.getElementById("ifBasic").classList.add("d-none"); + document.getElementById("ifAdvanced").classList.add("d-none"); + document.getElementById("ifReaction").classList.remove("d-none"); + document.getElementById("ifBasic").classList.remove("d-block"); + document.getElementById("ifAdvanced").classList.remove("d-block"); document.getElementById("delay").required = true; document.getElementById("parent").required = true; document.getElementById("interval").required = false; document.getElementById("time").required = false; + document.getElementById("ifDays").classList.add("d-none"); + document.getElementById("ifDays").classList.remove("d-block"); $("#cron").val(""); } else { - document.getElementById("ifAdvanced").style.display = "none"; - document.getElementById("ifReaction").style.display = "none"; - document.getElementById("ifBasic").style.display = "block"; + document.getElementById("ifAdvanced").classList.add("d-none"); + document.getElementById("ifReaction").classList.add("d-none"); + document.getElementById("ifAdvanced").classList.remove("d-block"); + document.getElementById("ifReaction").classList.remove("d-block"); + document.getElementById("ifBasic").classList.add("d-block"); + document.getElementById("ifBasic").classList.remove("d-none"); document.getElementById("delay").required = false; document.getElementById("parent").required = false; document.getElementById("interval").required = true; document.getElementById("time").required = true; + ifDays(); $("#cron").val(""); } } function ifDays() { if (document.getElementById('interval_type').value == "days") { - document.getElementById("ifDays").style.display = "block"; + document.getElementById("ifDays").classList.add("d-block"); + document.getElementById("ifDays").classList.remove("d-none"); document.getElementById("time").required = true; } else { - document.getElementById("ifDays").style.display = "none"; + document.getElementById("ifDays").classList.add("d-none"); + document.getElementById("ifDays").classList.remove("d-block"); document.getElementById("time").required = false; } } diff --git a/app/frontend/templates/panel/server_schedules.html b/app/frontend/templates/panel/server_schedules.html index 9d61ca74..d0f877c4 100644 --- a/app/frontend/templates/panel/server_schedules.html +++ b/app/frontend/templates/panel/server_schedules.html @@ -59,7 +59,7 @@ {% end %} {% if len(data['schedules']) > 0 %}
- +
{{ translate('serverSchedules', 'enabled',