Wikia/app — pull request #541 by lizlux (2013-03-27 01:18:02+00:00)
Title: Bugid 98700 lightbox dom

Please don't merge yet, it's still in code review and QA.

This pull request addresses an issue that the Lightbox code has been dealing with for a long time. Previously, Lightbox was handling each media DOM element differently because there was no unified way for the DOM to communicate with the Lightbox. For consistency going forward, I've updated the DOM to match this format:

### For Images ###

The wrapping anchor tag is optional. If omitted, lightbox won't open when clicked but the image will still appear in the carousel.

### For Videos ###

Since the JS will be pushed out before the HTML is fully purged everywhere, the new JS is backwards compatible with the old DOM. There's tracking code that is called when the old DOM is detected, so we can know when it's safe to remove the fallback JS.

@federico-lox or @hakubo, please take a look at ImageTweaksHooks.php as there's some code changes that affect mobile.

@garthwebb is assigned to this code review.