Opened 11 years ago

Closed 11 years ago

#7266 closed enhancement (duplicate)

dojox.image.Lightbox - enhance to allow for longer title strings

Reported by: Josh Trutwin Owned by: dante
Priority: low Milestone: future
Component: Dojox Version: 1.1.1
Keywords: dojox.image.Lightbox title lines space Cc: josh@…
Blocked By: Blocking:

Description

Currently if you provide a long title="" param to a lightbox the text will get cut off on the second line. Talking to phiggins on IRC seems like some calculations could be made to determine how much space the title needs. Ideally lightbox would automatically look at the width of the title text based on the width the dialog will take and adjust the containerNode size appropriately - I am not sure how to make these calculations though. Another option might be to truncate and have a tooltip for the full text.

I have attached a very crude patch which will at least allow the user to specify the number of text lines they expect the title to take up on the lightbox dialog. This can be used as a quick fix to provide additional space. I didn't update the _scaleToFit method to account for this param so could have some problems with high values for textLines and images needing to be scaled.

Attachments (1)

Lightbox.patch (2.2 KB) - added by Josh Trutwin 11 years ago.
Working version of patch

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by Josh Trutwin

Note - patch made against svn trunk on 7/23/08

comment:2 Changed 11 years ago by dante

Milestone: tbd1.3
Owner: changed from Adam Peller to dante
Status: newassigned

comment:3 Changed 11 years ago by dante

Milestone: 1.3future

this patch is clearly untested. please re-attach after testing.

comment:4 in reply to:  3 Changed 11 years ago by Josh Trutwin

Replying to dante:

this patch is clearly untested. please re-attach after testing.

My apologies, piss poor showing on my part for my first patch submission - didn't test against the SVN build after hurriedly applying the 1.1.1 changes to trunk pull. :(

Uploading tested patch.

Changed 11 years ago by Josh Trutwin

Attachment: Lightbox.patch added

Working version of patch

comment:5 Changed 11 years ago by dante

Resolution: duplicate
Status: assignedclosed

so I'm closing this out in favor of #7272, which suggests calculating and is basically a duplicate of this. I'd like to avoid a param to allot lines and figure out the best way to allot new space to the footer (keeping in mind you are able to change the template and subclass etc, so try not to break that)

Note: See TracTickets for help on using tickets.