Closed (fixed)
Project:
Lightbox2
Version:
6.x-1.9
Component:
Javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2009 at 13:21 UTC
Updated:
17 May 2009 at 12:30 UTC
This bug follows #294361: Lightbox support for Drupal messages..
I use lightbox2 to display drupal error messages. All is ok, but I want a button on which my users can click to see again what was the messages.
So, I did:
<?php if ($show_messages && $messages): ?>
<div class="there_is_messages_link" onclick="$('.drupal-messages-box').triggerHandler('click');">
<span><?php print t('There is some messages (click to see)'); ?></span>
</div>
<div id="lightboxAutoModal" class="drupal-messages-box" style="display: none;" >
<?php print $messages; ?>
</div>
<?php endif; ?>
The problem here is when I try to click on my link, it displays an empty box.
I fixed the problem doing this:
end: function(caller) {
...
if (Lightbox.isSlideshow) {
for (var i = 0; i < Lightbox.slideIdCount; i++) {
window.clearTimeout(Lightbox.slideIdArray[i]);
}
$('#lightshowPause, #lightshowPlay').hide();
}
else if (Lightbox.isLightframe) {
$('#frameContainer').empty().hide();
}
else if (Lightbox.isVideo) {
$('#modalContainer').hide().html("");
}
else if (Lightbox.isModal) {
$('#modalContainer').hide();
}
},
The problem here is I think doing this I break the behavior of lightbox. I noticed that:
Comments
Comment #1
pounardI think all this project's mainteners are dead!
Comment #2
stella commentedFixed, though with a small change. Thanks! Will be included in the next dev release.
Comment #3
pounardNice, thanks!