Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONCD-923 Implement an import map for JavaScript modules #2500

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion concordia/static/js/src/contribute.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global $ displayMessage buildErrorMessage */

import {reserveAssetForEditing} from './asset-reservation.js';
import {reserveAssetForEditing} from 'asset-reservation';

function lockControls($container) {
if (!$container) {
Expand Down
2 changes: 1 addition & 1 deletion concordia/static/js/src/viewer-split.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {seadragonViewer} from './viewer.js';
import {seadragonViewer} from 'viewer';
import Split from '/static/split.js/dist/split.es.js';

let pageSplit;
Expand Down
12 changes: 8 additions & 4 deletions concordia/templates/transcriptions/asset_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
data-tile-source-url="{% asset_media_url asset %}?canvas"
></script>

<script type="importmap">
{
"imports": {
"asset-reservation": "{% static 'js/asset-reservation.js' %}",
"viewer": "{% static 'js/viewer.js' %}"
}
}
</script>
<script module src="{% static 'openseadragon/build/openseadragon/openseadragon.min.js' %}"></script>
<script module src="{% static 'openseadragon-filtering/openseadragon-filtering.js' %}"></script>

Expand All @@ -39,10 +47,6 @@
<script type="module" src="{% static 'js/guide.js' %}"></script>
<script type="module" src="{% static 'js/quick-tips-setup.js' %}"></script>
<script type="module" src="{% static 'js/ocr.js' %}"></script>
<script type="module" src="{% static 'js/asset-reservation.js' %}"></script>
<script type="module" src="{% static 'js/viewer.js' %}"

></script>
{% endblock head_content %}

{% block breadcrumbs %}
Expand Down
Loading