This sorta has a few other miscellaneous fixes in it, but it works!
There are maybe still funky behaviours left. Test it?
Also refactor some bits, so we aren't accessing mw.mediaViewer in the
interface code.
Change-Id: I69db8e7b4ff5f994ba706fd4965688f3c26859f4
Next/prev caused an attach() call which in turn
replaced the lightbox elements with themselves
causing the browser to exit fullscreen mode
because the full screened element was shortly
removed from the DOM (to be replaced by the same content),
Unfortunately this cannot be covered by a test case
because the screen would have to truly go into fullscreen
mode for the bug to happen. Having QUnit go fullscreen
seems unreasonable both for local testing (annoying)
and automated testing (could fail to really fo fullscreen
because user confirmation is requested by the browser).
Change-Id: I57a2668179d6749188d7b5a3efcd06216b7747a9
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/139
Currently LIP.resizeCallBack was called even when lightbox was not appended, so I added a test to check the same.
Change-Id: Ie3a40a5d98f12a95b1d54e130896f67b71e927fa
Looks drastic at first, but grows on you.
I based this on an extreme, the firefox inner scrollbar.
Which is huge when hovered.
I kind of wish the close button was a bit bigger, though.
Change-Id: I2f47280c4e7c4bff299149de24741e3381f0b5e9
Third try, merged latest changes and added a test.
Run loading test against a wikipedia.org image.
Change-Id: I4e5a137e0f6dbedc45ec2c8393590919e23a26be
Every patch we've submitted up until now has been magically very good
at jshint, because I'm appropriately OCD about it, but now we can actually
point at results.
Also we'll enable voting very soon.
Change-Id: I028fa78a47778c8a4050f6b77623c6bfdc4f9c5b
Also listen for popState events so users can use their browser's back
functionality to close the lightbox or go backwards, etc.
Bug: 56469
Change-Id: Id44fea9008adb391817250c2897693f45bead717
There's just no other adjective for this, it is _super_ nice.
There may be refinements later as the designers get things together.
Bug: 56499
Change-Id: I200684a19c190444587f520595186e9ae5afbea6
Keep modules in separate dirs, move images to their module dirs, and fix
up the module declarations so they still work.
Also moved viewer.svg into the root.
Bug: 56421
Change-Id: Ia84ddfd3b91c784c42d9ba243c5cfd46354f139f