This fixes three issues:
* the overlay way multiplied during history navigation, but only
the last one was cleaned up on exit
* the overlay was not cleaned up when loading a #mediaviewer URL
with an invalid file name
* the overlay was not cleaned up when there was an error creating
the viewer object
This is a quick fix, and does not change the fact that
bootstrapping is an unmaintainable mess which should be cleaned up.
Change-Id: I2838e5e709e7c7308b0a5b27eca24a2584d0a01e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/414
The way categories were handled made it impossible to add anything
after them (they always ended up as the last child of the parent
container). This commit fixes that, and also moves the repo link
behind them (as required by #270).
Change-Id: I7c561c43897054e60028bd524d8ad5ea85f39e36
Only show the survey button if the user's language matches and the site is
enabled, and log which site we are on.
The corresponding site configuration commit is
Ic07432649906890785769ce5127761e2c84316e2
Change-Id: I575bb286f4289489b80505c901f5a9e7aeecec8b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/261
* Remove $moduleInfo trick; it's an expensive way to save typing a few
characters. (If you are really keen to save those characters, consider
flattening the file hierarchy: does every mmv module have to have 'mmv' both
in its directory name *and* in the filename itself?)
* Using an anonymous, immediate function to create a scope and thereby avoid
polluting global scope is a JavaScript pattern that doesn't translate well to
PHP. The idiomatic way of doing that in PHP is to use namespaces. But you
don't even need to do that, since all the variables you are manipulating are
global anyway, now that $moduleInfo is gone.
* Use the same pattern as VisualEditor for registering multiple modules in
bulk.
* Always put extension info under 'other' section. If a value is configurable,
then it is not essential / inherent to the extension itself. The fact that
the extension is a beta feature is a property of the way it is deployed on
the Wikimedia cluster; it's not descriptive of the extension in itself. (I
would argue getting rid of the 'betafeatures' section everywhere for this
reason.)
Change-Id: Ifc0a05362db990e4c073761a00ba17326c5ebbdb
* intializeSelection was removed
* selectItem is replaced by chooseItem, sort of
(selectItem does not always update the UI, I think?)
* remove old workaround, bug was fixed upstream
This fixes the download button and unbreaks lots of unittests.
It does not fix the "Loading" text in the embed tab.
Change-Id: Iec7bf9ad5b516001231c7ba46fda962671aaddd8
- error caused by select() called during focus event
- HTMLElement not existing in older IEs
- filter rotation for older IEs causing black background bug in IE9
- IE9 lacking progress would have its progress bar never reach 100% and disappear
- Handle e.which value for clicks on IE < 9
Change-Id: I5727ef3f2a9f9aa77eac930f93320e6ce5964c78
Also make sure that the reuse dialog is positioned right, no
matter where its button is.
Also fixes some minor documentation problem with mw.mmv.ui.canvas
which I noticed in the process.
Change-Id: I86feed07738ebef012e63861ed909f3449b85a53
An empty download attribute means the file name from the URL is
used; any value would override the default file name.
Change-Id: Idf1d78c4b4570eb7ccd58b5da7d5ce10cfd91b70
Also do a bunch of refactoring to:
* keep LESS rules in more sane locations so it is not as hard to get an overview
(most of the metadata panel rules were in mmv.less)
* move mmv.mixins.less up one directory as it is not specific to the UI
* move the SVG icons as all of them were related to the UI
* remove the marging-right hack which was used to keep the title text from
overflowing the button; instead use a float and overflow properties to make
sure text that is too long gets hidden
Change-Id: Icc8ea2e766be67d86ae98c734721b2185bd6c36e
Fix of I37a6da620157b9254cdc44eca8b7bd482491e916, see bug 59234
and Ic9fdd081003b694dbd7e413ca25fffe782b912b5 for background.
Fix was done using the script from that commit.
Change-Id: Ic5084f09376ce8107b91cb5651f465958361368a
I think this takes care of all the different mutations of
weird states that happen when going from a small to large
images and transitions in the middle, see card/386.
Change-Id: I80527d746614c0bbda7a1084061d292e5d6394a8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/386
* Following design, use split button to display a pulldown
menu with possible image sizes. The download happens by
sending the special "download" parameter to the server.
* Offer link to preview image in the browser.
Change-Id: Ic9d895fead04c9128186c7376a0bb09f3596335c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/79
At the moment issues in core are preventing Media Viewer
from working on IE < 9. Let's disable it in those browsers for now.
Change-Id: Icdd29f3c00fb8eeb3d463e8b8718d54d6cd01a23
With apologies to anyone who gets a hundred merge conflicts
because of this :)
We had several different prefix styles (mlb-, mw-mlb-, mw-mmv-,
mw-mmv-mmv-, a few unprefixed), which was getting annoying,
and will be confusing to wiki editors who are trying to figure out
where a given style comes from. Such changes are better done before
going live because it breaks all local CSS tweaks on the wiki,
so I am renaming things now (also removing some stuff which wasnt
used anywhere).
Change-Id: I00447a25f0028e234169c6db941bedc99622eb8d