mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
apply review comments
This commit is contained in:
@ -246,7 +246,11 @@ function select_item_builder(picture_getter) {
|
||||
const picture =
|
||||
typeof picture_getter === "function" ? picture_getter(item) : null;
|
||||
const img_html = picture
|
||||
? `<img src="${picture_getter(item)}" alt="item.text"/>`
|
||||
? `<img
|
||||
src="${picture_getter(item)}"
|
||||
alt="${item.text}"
|
||||
onerror="this.src = '/static/core/img/unknown.jpg'"
|
||||
/>`
|
||||
: "";
|
||||
|
||||
return $(`<div class="select-item">
|
||||
|
@ -11,7 +11,7 @@
|
||||
<link rel="stylesheet" href="{{ scss('core/markdown.scss') }}">
|
||||
<link rel="stylesheet" href="{{ scss('core/header.scss') }}">
|
||||
<link rel="stylesheet" href="{{ scss('core/navbar.scss') }}">
|
||||
<link rel="stylesheet" href="{{ static('core/select2/select2.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('vendored/select2/select2.min.css') }}">
|
||||
|
||||
{% block jquery_css %}
|
||||
{# Thile file is quite heavy (around 250kb), so declaring it in a block allows easy removal #}
|
||||
@ -25,7 +25,7 @@
|
||||
<script src="{{ static('vendored/jquery/jquery-3.6.2.min.js') }}"></script>
|
||||
<!-- Put here to always have acces to those functions on django widgets -->
|
||||
<script src="{{ static('core/js/script.js') }}"></script>
|
||||
<script defer src="{{ static('core/select2/select2.min.js') }}"></script>
|
||||
<script defer src="{{ static('vendored/select2/select2.min.js') }}"></script>
|
||||
<script defer src="{{ static('core/js/sith-select2.js') }}"></script>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user