diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:42:29 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:42:29 +0200 |
commit | c79c6f8cfab2c5508b6f7538d7df2a15990eb7e3 (patch) | |
tree | 6cd110377c33a67dac6de821297c8a38ca98e8f3 | |
parent | 30a519cfd351a7dd8a3ce97cd63aaf52d356a6fe (diff) | |
download | Ishtar-c79c6f8cfab2c5508b6f7538d7df2a15990eb7e3.tar.bz2 Ishtar-c79c6f8cfab2c5508b6f7538d7df2a15990eb7e3.zip |
🐛 Document table: fix gallery view
-rw-r--r-- | changelog/en/changelog_2022-06-15.md | 1 | ||||
-rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 1 | ||||
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index cee9450e1..66c5c35ac 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -50,6 +50,7 @@ v4.0.XX - 2099-12-31 - tables: user, action, IP, routable IP ### Bug fixes ### +- document table: fix gallery view - geo sheet: - do not zoom or select point with no x, y coordinates - fix 2d point display diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 3e02cc0ff..c4abc57c6 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -51,6 +51,7 @@ v4.0.XX - 2099-12-31 - tables RGPD : informations sur utilisateur, action, IP, IP routable ### Corrections de dysfonctionnements ### +- tableau document : correction de la vue galerie - fiche géo : - retrait des fonctions de zoom et de sélection pour les points sans coordonnées x et y - correction de l'affichage de points 2D diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index ab9e7eb6f..025b05a56 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -1294,12 +1294,18 @@ var render_gallery = function(data_table, table_name, nb_select, gallery_id){ var thumb = ""; if ("main_image__thumbnail" in data){ thumb = data["main_image__thumbnail"]; + } else if ("thumbnail" in data){ + thumb = data["thumbnail"]; + if (!thumb.startsWith("media/") && !thumb.startsWith("/media/")) thumb = "/media/" + thumb; } else { thumb = static_path + "media/images/empty-image.png"; } var image = ""; if ("main_image__image" in data){ image = data["main_image__image"]; + } else if ("image" in data){ + image = data["image"]; + if (!image.startsWith("media/") && !image.startsWith("/media/")) image = "/media/" + image; } else { image = static_path + "media/images/empty-image.png"; } |