Skip to content
Snippets Groups Projects
Commit b90fd90e authored by Julian's avatar Julian
Browse files

Move week_view JS to separate file

parent 346722de
No related branches found
No related tags found
1 merge request!236Resolve "Improve week view for mobile devices (size s)"
Pipeline #45882 passed
$(document).ready(function () {
$("#id_group").change(function () {
$("#id_teacher").val("").formSelect();
});
$("#id_teacher").change(function () {
$("#id_group").val("").formSelect();
});
$("#toggle-row.pre-hidden").hide();
});
$("#toggle-button").click(function () {
$("#toggle-row").toggle();
})
$(".unfold-trigger").click(function (event) {
let target = event.target;
target.classList.toggle("vertical");
let next_container = $(target).parent().next(".horizontal-scroll-container");
if (next_container.length >= 1) {
next_container[0].classList.toggle("vertical");
}
})
\ No newline at end of file
...@@ -440,28 +440,5 @@ ...@@ -440,28 +440,5 @@
</div> </div>
{% endif %} {% endif %}
<script> <script src="{% static 'js/alsijil/week_view.js' %}" type="text/javascript"></script>
$(document).ready(function () {
$("#id_group").change(function () {
$("#id_teacher").val("").formSelect();
});
$("#id_teacher").change(function () {
$("#id_group").val("").formSelect();
});
$("#toggle-row.pre-hidden").hide();
});
$("#toggle-button").click(function () {
$("#toggle-row").toggle();
})
$(".unfold-trigger").click(function (event) {
console.log(event);
let target = event.target;
target.classList.toggle("vertical");
let next_container = $(target).parent().next(".horizontal-scroll-container");
if (next_container.length >= 1){
next_container[0].classList.toggle("vertical");
}
})
</script>
{% endblock %} {% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment