Skip to content

Commit

Permalink
Move variables from utils.js to renderNormalizerOutputOOIs.js (#3412)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Klopper <[email protected]>
  • Loading branch information
dekkers and underdarknl authored Aug 29, 2024
1 parent 5dfcfa6 commit b0d62b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 3 additions & 1 deletion rocky/assets/js/renderNormalizerOutputOOIs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { language, organization_code } from "./utils.js";
const htmlElement = document.getElementsByTagName("html")[0];
const language = htmlElement.getAttribute("lang");
const organization_code = htmlElement.getAttribute("data-organization-code");

const buttons = document.querySelectorAll(
".expando-button.normalizer-list-table-row",
Expand Down
5 changes: 0 additions & 5 deletions rocky/assets/js/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
const htmlElement = document.getElementsByTagName("html")[0];
const language = htmlElement.getAttribute("lang");
const organization_code = htmlElement.getAttribute("data-organization-code");

export { language, organization_code };
2 changes: 1 addition & 1 deletion rocky/rocky/templates/tasks/normalizers.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ <h1>{% translate "Normalizers" %}</h1>
{% block html_at_end_body %}
{{ block.super }}
{% compress js %}
<script type="module" src="{% static "js/renderNormalizerOutputOOIs.js" %}" nonce="{{ request.csp_nonce }}"></script>
<script src="{% static "js/renderNormalizerOutputOOIs.js" %}" nonce="{{ request.csp_nonce }}"></script>
{% endcompress %}
{% endblock html_at_end_body %}

0 comments on commit b0d62b9

Please sign in to comment.