mirror of https://gitlab.crans.org/bde/nk20
Removing jquery means changing the event API...
This commit is contained in:
parent
405479e5ad
commit
08b2fabe07
|
@ -182,7 +182,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
<script type="text/javascript">
|
||||
{% for button in highlighted %}
|
||||
{% if button.display %}
|
||||
document.getElementById("highlighted_button{{ button.id }}").click(function() {
|
||||
document.getElementById("highlighted_button{{ button.id }}").addEventListener("click", function() {
|
||||
addConso({{ button.destination_id }}, {{ button.amount }},
|
||||
{{ polymorphic_ctype }}, {{ button.category_id }}, "{{ button.category.name|escapejs }}",
|
||||
{{ button.id }}, "{{ button.name|escapejs }}");
|
||||
|
@ -193,7 +193,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
{% for category in categories %}
|
||||
{% for button in category.templates_filtered %}
|
||||
{% if button.display %}
|
||||
document.getElementById("button{{ button.id }}").click(function() {
|
||||
document.getElementById("button{{ button.id }}").addEventListener("click", function() {
|
||||
addConso({{ button.destination_id }}, {{ button.amount }},
|
||||
{{ polymorphic_ctype }}, {{ button.category_id }}, "{{ button.category.name|escapejs }}",
|
||||
{{ button.id }}, "{{ button.name|escapejs }}");
|
||||
|
@ -230,7 +230,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
<script type="text/javascript" id="search-script">
|
||||
{% for button in search_results %}
|
||||
{% if button.display %}
|
||||
document.getElementById("search_button{{ button.id }}").click(function() {
|
||||
document.getElementById("search_button{{ button.id }}").addEventListener("click", function() {
|
||||
addConso({{ button.destination_id }}, {{ button.amount }},
|
||||
{{ polymorphic_ctype }}, {{ button.category_id }}, "{{ button.category.name|escapejs }}",
|
||||
{{ button.id }}, "{{ button.name|escapejs }}");
|
||||
|
|
Loading…
Reference in New Issue