Skip to content

Commit

Permalink
ui: update scripts
Browse files Browse the repository at this point in the history
* Updates scripts to load the UI because they are generated for ES5 and ES2015 now.

Co-Authored-by: Sébastien Délèze <sebastien.deleze@rero.ch>
  • Loading branch information
Sébastien Délèze committed Jun 14, 2021
1 parent 0a77c6b commit 8376223
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
33 changes: 19 additions & 14 deletions sonar/theme/templates/sonar/accounts/profile.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{# -*- coding: utf-8 -*-
Swiss Open Access Repository
Copyright (C) 2021 RERO
Swiss Open Access Repository
Copyright (C) 2021 RERO

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3 of the License.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see
<http: //www.gnu.org/licenses />.
#}

{% extends 'sonar/page_settings.html' %}
Expand All @@ -24,9 +25,13 @@
{%- endblock settings_body %}

{%- block javascript %}
<script src="/static/sonar-ui/runtime.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/polyfills.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/main.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/runtime-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/runtime-es2015.js?{{ ui_version }}" type="module"></script>
<script src="/static/sonar-ui/polyfills-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/polyfills-es2015.js?{{ ui_version }}" type="module"></script>
<script src="/static/sonar-ui/scripts.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/main-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/main-es2015.js?{{ ui_version }}" type="module"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
Expand Down
9 changes: 6 additions & 3 deletions sonar/theme/templates/sonar/manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@

<body>
<sonar-root></sonar-root>
<script src="/static/sonar-ui/runtime.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/polyfills.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/runtime-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/runtime-es2015.js?{{ ui_version }}" type="module"></script>
<script src="/static/sonar-ui/polyfills-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/polyfills-es2015.js?{{ ui_version }}" type="module"></script>
<script src="/static/sonar-ui/scripts.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/main.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/main-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/main-es2015.js?{{ ui_version }}" type="module"></script>
</body>

</html>
9 changes: 6 additions & 3 deletions sonar/theme/templates/sonar/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

{%- block javascript %}
{{ super() }}
<script src="/static/sonar-ui/runtime.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/polyfills.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/runtime-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/runtime-es2015.js?{{ ui_version }}" type="module"></script>
<script src="/static/sonar-ui/polyfills-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/polyfills-es2015.js?{{ ui_version }}" type="module"></script>
<script src="/static/sonar-ui/scripts.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/main.js?{{ ui_version }}"></script>
<script src="/static/sonar-ui/main-es5.js?{{ ui_version }}" nomodule defer></script>
<script src="/static/sonar-ui/main-es2015.js?{{ ui_version }}" type="module"></script>
{%- endblock javascript %}

0 comments on commit 8376223

Please sign in to comment.