Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

#lightbox panels get no IDs

#52

The #lightbox element does not respect its class attribute. As a result, it gets no ID set, since the top level panel never gets passed through render_elements() again. The fix is to set the top level panel's class to include the class of the lightbox. Here's the patch:

diff --git a/apps/nitrogen/src/elements/layout/element_lightbox.erl b/apps/nitro
index ff542f1..d02ccf6 100644
--- a/apps/nitrogen/src/elements/layout/element_lightbox.erl
+++ b/apps/nitrogen/src/elements/layout/element_lightbox.erl
@@ -10,9 +10,8 @@ reflect() -> record_info(fields, lightbox).
 
 render_element(Record) -> 
     Panel = #panel {
-        id=Record#lightbox.id,
         anchor=Record#lightbox.anchor,
-        class=lightbox,
+        class=[lightbox|Record#lightbox.class],
         style="position: fixed; top: 0px; left: 0px; bottom: 0px; right: 0px; "
         body=[
             #panel {

Note that this is related to ticket #51 #container_12{} / #container_16{} ignore class attribute

UPDATE: Please forgive my unfamiliarity with how Nitrogen handles IDs in classes. I've updated the diff above to add the "lightbox" class as an atom rather than as a string concatenation. Besides looking a little cleaner, it makes sure that the rest of the classes are rendered properly, which they weren't before.

Reported by Brian O · April 22nd, 2010 @ 01:45 PM

State: new
Milestone: none
Assigned to: Rusty Klophaus Rusty Klophaus

Activity

  1. Brian O
    Brian O

    This should be fixed in changeset 6443d7388be122f2e7dbba01d5b1701542e3c5fc

    May 3rd, 2010 @ 04:59 PM

  2. Rusty Klophaus
  3. Rusty Klophaus
    Rusty Klophaus
    • Milestone cleared.
    • Milestone order changed from 0 to 0

    June 29th, 2010 @ 08:00 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.