mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 21:58:25 +02:00
Remove jquery dependency code (keep it for bootstrap-select)
This commit is contained in:
@ -63,12 +63,8 @@
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('button[data-bs-target="#uploadSolutionModal"]').click(function() {
|
||||
let modalBody = $("#uploadSolutionModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:upload_solution" pk=participation.pk %} #form-content")
|
||||
});
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initModal("uploadSolution", "{% url "participation:upload_solution" pk=participation.pk %}")
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -119,27 +119,15 @@
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
{% if notes is not None %}
|
||||
$('button[data-bs-target="#updatePassageModal"]').click(function() {
|
||||
let modalBody = $("#updatePassageModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:passage_update" pk=passage.pk %} #form-content")
|
||||
});
|
||||
initModal("updatePassage", "{% url "participation:passage_update" pk=passage.pk %}")
|
||||
|
||||
{% if my_note is not None %}
|
||||
$('button[data-bs-target="#updateNotesModal"]').click(function() {
|
||||
let modalBody = $("#updateNotesModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:update_notes" pk=my_note.pk %} #form-content")
|
||||
});
|
||||
initModal("updateNotesModal", "{% url "participation:update_notes" pk=my_note.pk %}")
|
||||
{% endif %}
|
||||
{% elif user.registration.participates %}
|
||||
$('button[data-bs-target="#uploadSynthesisModal"]').click(function() {
|
||||
let modalBody = $("#uploadSynthesisModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:upload_synthesis" pk=passage.pk %} #form-content")
|
||||
});
|
||||
initModal("uploadSynthesis", "{% url "participation:upload_synthesis" pk=passage.pk %}")
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
|
@ -88,30 +88,11 @@
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('button[data-bs-target="#updatePoolModal"]').click(function() {
|
||||
let modalBody = $("#updatePoolModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_update" pk=pool.pk %} #form-content")
|
||||
});
|
||||
|
||||
$('button[data-bs-target="#updateTeamsModal"]').click(function() {
|
||||
let modalBody = $("#updateTeamsModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_update_teams" pk=pool.pk %} #form-content")
|
||||
});
|
||||
|
||||
$('button[data-bs-target="#addPassageModal"]').click(function() {
|
||||
let modalBody = $("#addPassageModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:passage_create" pk=pool.pk %} #form-content")
|
||||
});
|
||||
|
||||
$('button[data-bs-target="#uploadNotesModal"]').click(function() {
|
||||
let modalBody = $("#uploadNotesModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_upload_notes" pk=pool.pk %} #form-content")
|
||||
});
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initModal("updatePool", "{% url "participation:pool_update" pk=pool.pk %}")
|
||||
initModal("updateTeams", "{% url "participation:pool_update_teams" pk=pool.pk %}")
|
||||
initModal("addPassage", "{% url "participation:passage_create" pk=pool.pk %}")
|
||||
initModal("uploadNotes", "{% url "participation:pool_upload_notes" pk=pool.pk %}")
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -199,22 +199,10 @@
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('button[data-bs-target="#uploadMotivationLetterModal"]').click(function() {
|
||||
let modalBody = $("#uploadMotivationLetterModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:upload_team_motivation_letter" pk=team.pk %} #form-content");
|
||||
});
|
||||
$('button[data-bs-target="#updateTeamModal"]').click(function() {
|
||||
let modalBody = $("#updateTeamModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:update_team" pk=team.pk %} #form-content");
|
||||
});
|
||||
$('button[data-bs-target="#leaveTeamModal"]').click(function() {
|
||||
let modalBody = $("#leaveTeamModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:team_leave" %} #form-content");
|
||||
});
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initModal("uploadMotivationLetter", "{% url "participation:upload_team_motivation_letter" pk=team.pk %}")
|
||||
initModal("updateTeam", "{% url "participation:update_team" pk=team.pk %}")
|
||||
initModal("leaveTeam", "{% url "participation:team_leave" %}")
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -116,13 +116,9 @@
|
||||
|
||||
{% block extrajavascript %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
{% if user.registration.is_admin %}
|
||||
$('button[data-bs-target="#addPoolModal"]').click(function() {
|
||||
let modalBody = $("#addPoolModal div.modal-body");
|
||||
if (!modalBody.html().trim())
|
||||
modalBody.load("{% url "participation:pool_create" %} #form-content")
|
||||
});
|
||||
initModal("addPool", "{% url "participation:pool_create" %}")
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user