Closed Bug 1146777 Opened 10 years ago Closed 10 years ago

use lightbox for images

Categories

(bugzilla.mozilla.org :: User Interface, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

Attachments

(1 file)

lightboxes is the most frequently feature which people tell me they use bugzillajs for. we should implement it on the modal bug view.
Assignee: nobody → glob
Attached patch 1146777_1.patchSplinter Review
- adds icon next to images in the attachments table and associated comments - clicking on icon or attachment name/number displays with a lightbox - ligthbox code cribbed from bugzillajs - i've been careful to defer loading of images until requested, which is why a generic image icon is used instead of a thumbnail
Attachment #8584279 - Flags: review?(dkl)
BugzillaJS also uses light boxes for any link to something that looks like an image (currently, URLS ending with (jpg|gif|png) ). And people have been requesting to link to use light boxes for more https://github.com/gkoberger/BugzillaJS/issues/97
(In reply to Anthony Ricaud (:rik) from comment #2) > BugzillaJS also uses light boxes for any link to something that looks like > an image (currently, URLS ending with (jpg|gif|png) ). And people have been > requesting to link to use light boxes for more > https://github.com/gkoberger/BugzillaJS/issues/97 can you file this as a new bug please?
Comment on attachment 8584279 [details] [diff] [review] 1146777_1.patch Review of attachment 8584279 [details] [diff] [review]: ----------------------------------------------------------------- Overall works well. Fix on commit. r=dkl ::: extensions/BugModal/web/bug_modal.js @@ +200,5 @@ > }); > } > > + // lightboxes > + $('.lightbox, .comment-text .lightbox + span a') If you click [details] in a comment, it tries to load a lightbox of the image but fails as it is action=edit. Seems the query selector is matching all of the <a> inside the <span>. Possible fix is: $('.lightbox, .comment-text .lightbox + span a[name*="attach_"]')
Attachment #8584279 - Flags: review?(dkl) → review+
> $('.lightbox, .comment-text .lightbox + span a[name*="attach_"]') i ended using :first-of-type to ensure we match just the first link (i was concerned about incorrectly matching on formatted comments). To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git b527e84..ae43a6a master -> master
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I did not receive emails for this bug so this is a test from format=modal to see if there is an issue with respecting the "Automatically add me to the CC list of bugs I change" preference
Component: User Interface: Modal → User Interface
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: