Due to a jQuery bug, errors in local code (gadgets, user scripts)
can cause onready handlers to not be executed. For MMV this causes
catastrophic failure, with a black screen of death on exit.
This change makes sure that the setup code necessary for Media
Viewer to work is executed at latest when MV is invoked, even if some
onready handlers were skipped.
Opening MediaViewer via a hash-URL will still not work if the onready
handler fails, but that's hard to avoid and it is not a catastrophic
failure anymore. This change can be reverted when bug 70772 gets fixed.
Bug: 70756
Change-Id: Ida3b780791bc9dfec29303567d33e3aa4f44dd81
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/891
Experimental revert of commit
d6c142fd2b to see if it caused
the weirdness in the versus charts:
http://multimedia-metrics.wmflabs.org/dashboards/mmv#media_viewer_vs_file_page-graphs-tab
That commit affecting file page load times is extremely unlikely.
A change in the test environment which exactly coincided with it is
equally unlikely. This is an easy way to tell which is the case.
Change-Id: I3581abd36d25494ca294db892480e25f6f4c5a73
OOJS polyfills Object.create now so there is no need to check for its
existence before loading OOJS-dependent code. On the other hand,
MediaViewer uses SVG icons extensively and the interface cannot be used
if they don't show up.
Bug: 70553
Change-Id: I716e12d4061cfc5c64ccca4563bc30a4394494af
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/863
This works because the title doesn't exist if there's no caption and we
won't get to this logic branch if the thumbnail is an explicit |thumb|
with a caption already.
Refactored caption-fetching a bit.
Change-Id: If84c890e7b71880db640a0993f8e3d6cd59951b8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/513
Using the "complete" property worked for the file page, but not
for media viewer because change the src of an img doesn't reset
the prop.
This introduces a custom event that cucumber can listen to in order
to know when the full resolution image had been loaded in media
viewer.
Change-Id: I40875166e70badbb35106c4a3536c706a7c815b4
Ensure that changing the preference via the quick link and
Special:Preferences is stored identically in the DB.
Change-Id: Ia37da1c6bfbb3edf0eba56f01105e4a5f3a5e4ba
OOJS uses es5-shim but does not use es5-sham so the following ES5
functions are not polyfilled:
Object.getPrototypeOf
Object.defineProperty
Object.getOwnPropertyDescriptor
Object.getOwnPropertyNames
Object.create
Object.defineProperties
Object.seal
Object.freeze
Object.preventExtensions
Object.isSealed
Object.isFrozen
Object.isExtensible
Grepping on them shows that Object.create is the only one in use in
OOJS, so checking for its existence should be enough to ensure that
OOJS works in the given browser.
Change-Id: Icf54a9c35b3599dd1831c10ffcd9f15573dc8b00
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/813
Categories are implemented via galleries, so they have the same
markup, but while galleries have human-written captions, category
captions just contain the file page.
Change-Id: I6a8548fe696418befc789e20b114778fc724c314
Add position:fixed to the metadata panel to stick it to the bottom
of the page.
This reverts the change in Ic37b4150288055c3fae8d22919ed7b1249db1f09
I can't recall if there was some intent behind that or it was an
accidental deletion; but this seems to work fine in Chrome and
FF.
Change-Id: Ic5fdce5fb3d6884df782f8bc9ec5c9a5c67edbd6
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/805
Changes document title (which is shown in history navigation)
to include the image name.
Bug: 67008
Change-Id: Id1b030f2b984571fb0877e35db2ca2ccc86f0130
Automatically reveal/hide full text as metadata panel is opened/closed.
Also makes metadata open/close a proper event.
Changes scrollTop calculation for the fully open metadatapanel so it is not
confused by the size of the panel changing.
Also rename MetadataPanel.$controlBar to $aboveFold (that field was missed
when the corresponding CSS class got renamed).
Change-Id: I7e66ca0f45c2188dab4b78508ad7f91154187de4
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/396
Reveal the full title + author + source when the user clicks one
of these, and make some related changes:
* expand the above-the-fold part of the metadata panel so they fit
* make the stripe buttons smaller and hide their text
* scroll the panel up if necessary
* modify tooltip texts when there is more text to show
Change-Id: I304297bc5e7be7b16e2fc4bde66ac19641b00029
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/396
* make Commons icon slightly larger than "use this file" icon so
it seems to be the same size (since the Commons icon has more
whitespace)
* re-add size adjustments for dynamic icon; IIRC this was needed
to make Wikipedia icons look good
Change-Id: I6cc2c66beb1d270c9367446661ef14139afa814e
Check for tipsy-ness, and for the existence of the opt out button. The
latter doesn't affect prod, but the former might.
Change-Id: Ia5ae8b160626d27750cb3e4938c27a461b9f0c64
The following visual adjustments have been made:
- Make color similar to other icons in the metadata panel.
- Highlight on hover to convey interactivity.
- Adjust to the "visual center". The icon was matematically centered, but since the angular separator adds empty space to the right, a 2px correction has been added so that it looks centered taking into account that extra space.
Change-Id: Ib4db723b38a8d6fc9528fe86756220b6525da95b