[PR #3846] [MERGED] Fixes #2050: Image preview #12661

Closed
opened 2025-12-29 22:22:55 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3846
Author: @hSaria
Created: 1/4/2020
Status: Merged
Merged: 1/6/2020
Merged by: @jeremystretch

Base: developHead: 2050-image-preview


📝 Commits (3)

  • 792f383 Fixes #2050: Image preview for attachments
  • 067af26 Changelog (may conflict with other merges)
  • 9bd2af4 Merge branch 'develop' into 2050-image-preview

📊 Changes

3 files changed (+41 additions, -1 deletions)

View changed files

📝 docs/release-notes/version-2.6.md (+1 -0)
📝 netbox/project-static/js/forms.js (+39 -0)
📝 netbox/templates/inc/image_attachments.html (+1 -1)

📄 Description

Fixes: #2050

Image preview when hovering over an attachment's link. The preview is displayed only if the image can be rendered.

I've avoided using a library for this because it seemed they either require additional supporting code or are too overkill for the task, and also didn't want to introduce another dependency.

It works fine even when loading is taking a long time or the image in unavailable; I've put a 1s delay to my VM to test and the image would appear once loaded and is hidden until then.

Might get a PR conflict regarding the changelog; I can change that once the v2.6.12 headers are in.

image-preview

Cat not included with the PR. Cat sold separately.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/3846 **Author:** [@hSaria](https://github.com/hSaria) **Created:** 1/4/2020 **Status:** ✅ Merged **Merged:** 1/6/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `2050-image-preview` --- ### 📝 Commits (3) - [`792f383`](https://github.com/netbox-community/netbox/commit/792f38334a61ab2ee1004148f60dac0dab847939) Fixes #2050: Image preview for attachments - [`067af26`](https://github.com/netbox-community/netbox/commit/067af26892f4a3a92814150bead550a5964f5ae0) Changelog (may conflict with other merges) - [`9bd2af4`](https://github.com/netbox-community/netbox/commit/9bd2af48a393d8cd2366b594e5f397ee0f5bef2e) Merge branch 'develop' into 2050-image-preview ### 📊 Changes **3 files changed** (+41 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.6.md` (+1 -0) 📝 `netbox/project-static/js/forms.js` (+39 -0) 📝 `netbox/templates/inc/image_attachments.html` (+1 -1) </details> ### 📄 Description ### Fixes: #2050 Image preview when hovering over an attachment's link. The preview is displayed only if the image can be rendered. I've avoided using a library for this because it seemed they either require additional supporting code or are too overkill for the task, and also didn't want to introduce another dependency. It works fine even when loading is taking a long time or the image in unavailable; I've put a 1s delay to my VM to test and the image would appear once loaded and is hidden until then. Might get a PR conflict regarding the changelog; I can change that once the v2.6.12 headers are in. ![image-preview](https://user-images.githubusercontent.com/34197532/71770056-4a495400-2f20-11ea-98c5-06a21c283ca1.gif) > Cat not included with the PR. Cat sold separately. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:22:55 +01:00
adam closed this issue 2025-12-29 22:22:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12661