Skip to content

Commit

Permalink
Ajout d'un fichier JS sur la pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
Tendry-Rkt56 committed Jul 22, 2024
1 parent edffc5b commit 4c20710
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions assets/script/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const limit = document.getElementById('limit')

if (limit) {
limit.addEventListener('input', (e) => {
if (e.target.value < 1) e.target.value = 1
})
}
1 change: 1 addition & 0 deletions templates/admin.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link rel="stylesheet" href="{{asset('styles/admin.css')}}">
<link rel="stylesheet" href="{{asset('styles/index.css')}}">
<link rel="stylesheet" href="{{asset('styles/bootstrap.min.css')}}">
<script src="{{asset('script/input.js')}}" defer></script>
{% block stylesheets %}
{% endblock %}
{% block javascripts %}
Expand Down
1 change: 1 addition & 0 deletions templates/user.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link rel="stylesheet" href="{{asset('styles/header.css')}}">
<link rel="stylesheet" href="{{asset('styles/index.css')}}">
<script src="{{asset('script/header.js')}}" defer></script>
<script src="{{asset('script/input.js')}}" defer></script>
{% block stylesheets %}
{% endblock %}

Expand Down

0 comments on commit 4c20710

Please sign in to comment.