fix(fastapi): only include comment-edit.js where needed

Closes: #178

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-18 16:42:26 -08:00
parent 672af707ad
commit dbe5cb4a33
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
4 changed files with 9 additions and 3 deletions

View file

@ -17,6 +17,9 @@
</h3>
</div>
<!-- On-the-fly comment editing functions -->
<script type="text/javascript" src="/static/js/comment-edit.js"></script>
{% for comment in comments %}
{% include "partials/account/comment.html" %}
{% endfor %}

View file

@ -15,6 +15,9 @@
</div>
</div>
<!-- On-the-fly comment editing functions -->
<script type="text/javascript" src="/static/js/comment-edit.js"></script>
{% set pkgname = package.Name %}
{% set pkgbase_id = pkgbase.ID %}
{% include "partials/packages/comments.html" %}

View file

@ -15,8 +15,5 @@
<!-- Include local typeahead -->
<script type="text/javascript" src="/static/js/typeahead.js"></script>
<!-- On-the-fly comment editing functions -->
<script type="text/javascript" src="/static/js/comment-edit.js"></script>
<title>AUR ({{ language }}) - {{ title | tr }}</title>
</head>

View file

@ -14,6 +14,9 @@
</div>
</div>
<!-- On-the-fly comment editing functions -->
<script type="text/javascript" src="/static/js/comment-edit.js"></script>
{% set pkgname = result.Name %}
{% set pkgbase_id = result.ID %}
{% set comments = comments %}