Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted fixes #292

Merged
merged 3 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/capstone/transformer/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def __init__(self, *args, **kwargs): # type: ignore
label="Complexity",
widget=NumberInput(
attrs={
"id": "id_complexity_presentation",
"type": "range",
"min": 0,
"max": 6,
Expand Down Expand Up @@ -367,6 +368,7 @@ def __init__(self, *args, **kwargs): # type: ignore
label="Complexity",
widget=NumberInput(
attrs={
"id": "id_complexity_exercises",
"type": "range",
"min": 0,
"max": 6,
Expand Down
17 changes: 15 additions & 2 deletions app/capstone/transformer/static/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $(document).ready(function () {
$("#transform-template-file-upload").val("");
});

$("#id_complexity").on("input change", function () {
$("#id_complexity_presentation").on("input change", function () {
var value = $(this).val();
var text = "Default";
if (value == 0) text = "Very Basic";
Expand All @@ -68,7 +68,20 @@ $(document).ready(function () {
else if (value == 4) text = "Highly Advanced";
else if (value == 5) text = "Very Detailed";
else if (value == 6) text = "Extremely Detailed";
$("#complexity_value").text(text);
$("#complexity_value_presentation").text(text);
});

$("#id_complexity_exercises").on("input change", function () {
var value = $(this).val();
var text = "Default";
if (value == 0) text = "Very Basic";
else if (value == 1) text = "Basic";
else if (value == 2) text = "Moderate";
else if (value == 3) text = "Default";
else if (value == 4) text = "Highly Advanced";
else if (value == 5) text = "Very Detailed";
else if (value == 6) text = "Extremely Detailed";
$("#complexity_value_exercises").text(text);
});

$("#id_image_frequency").on("input change", function () {
Expand Down
14 changes: 14 additions & 0 deletions app/capstone/transformer/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,20 @@ a:hover {
transform: scale(1.05);
}

#formTypeTab .nav-link.active {
color: var(--background);
background-color: var(--foreground) !important;
}

#formTypeTab .nav-link {
border: 1px solid var(--foreground);
color: var(--foreground);
}

.nav-tabs {
border-bottom: var(--foreground) 1px solid;
}

.homepage-nav:hover {
transform: none;
}
Expand Down
20 changes: 10 additions & 10 deletions app/capstone/transformer/templates/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ <h1>Presentations</h1>
aria-label="History entry for date: {{ conversion.date }}"
role="tree"
aria-expanded="false"
aria-controls="collapse{{ forloop.counter }}"
id="heading{{ forloop.counter }}"
aria-controls="collapse-presentation"
id="presentation-heading"
data-bs-toggle="collapse"
data-bs-target="#collapse{{ forloop.counter }}">
data-bs-target="#collapse-presentation">
<h3 class="entry-date">{{ conversion.date }} UTC</h3>
<img class="entry-dropdown" src="{% static 'img/dropdown.svg' %}">
</button>
<div id="collapse{{ forloop.counter }}"
<div id="collapse-presentation"
class="collapse"
aria-labelledby="heading{{ forloop.counter }}"
aria-labelledby="presentation-heading""
data-parent="#accordion">
<div class="card-body">
<div class="row">
Expand Down Expand Up @@ -89,16 +89,16 @@ <h1>Exercises</h1>
aria-label="History entry for date: {{ exercise.date }}"
role="tree"
aria-expanded="false"
aria-controls="collapse{{ forloop.counter }}"
id="heading{{ forloop.counter }}"
aria-controls="collapse-exercises"
id="exercise-heading"
data-bs-toggle="collapse"
data-bs-target="#collapse{{ forloop.counter }}">
data-bs-target="#collapse-exercises">
<h3 class="entry-date">{{ exercise.date }} UTC</h3>
<img class="entry-dropdown" src="{% static 'img/dropdown.svg' %}">
</button>
<div id="collapse{{ forloop.counter }}"
<div id="collapse-exercises"
class="collapse"
aria-labelledby="heading{{ forloop.counter }}"
aria-labelledby="exercise-heading"
data-parent="#accordion">
<div class="card-body">
<div class="row">
Expand Down
4 changes: 2 additions & 2 deletions app/capstone/transformer/templates/transform.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h2 class="text-left" tabindex="0">Options</h2>
</a>
</p>
{{ TForm.complexity }}
<small id="complexity_value" class="mt-2">Default</small>
<small id="complexity_value_presentation" class="mt-2">Default</small>
</div>
<div class="mt-4 text-center d-flex flex-column align-items-center">
<p>
Expand Down Expand Up @@ -321,7 +321,7 @@ <h2 class="text-left" tabindex="0">Options</h2>
</a>
</p>
{{ EForm.complexity }}
<small id="complexity_value" class="mt-2">Default</small>
<small id="complexity_value_exercises" class="mt-2">Default</small>
</div>
<div class="mt-4 text-center d-flex flex-column align-items-center">
<p>
Expand Down
Loading