When an svg file is requested, returns the 1024px file and displays at
max possible size
Bug: T71237
Change-Id: I797794d1f9b1aa66cbb9bd9fec57274554292fb1
Updating user avatar icon to overhauled standard WikimediaUI icon.
Also:
- Using new icon default size instead of `80 x 80 px`. Icon is
resized by `background-size` in both applications anyways.
- Renaming 'user*' to 'user-avatar' for consistency across projects.
Bug: T123810
Change-Id: Ifb2027694af8f619663f00f4c50891772ee64746
Using window.devicePixelRatio directly means we won't be supporting Windows 8
and/or IE 10 & 11. But that seems intentional based on 828f6d6ac9db.
Bug: T206099
Change-Id: I53dbce0a8ddc69c4edfd4d10f98031aa4f7cd20a
Array.prototype.find is part of ES6 and not supported by older browser.
This change is a follow-up of 965b496850.
Bug: T205162
Change-Id: I0954c42a37668b0eb46c3e864a2e13152a6dc68a
Follows-up f59962e4a3.
wgUserLanguage contains the user interface language of the current
user. mw.language.data can contain several languages.
Also apply encodeURIComponent() to the parameter.
Change-Id: Ifaf5dc4be3fb8f87fbf1513866bcc68648c36ab1
Convert button-like interface elements in MMV from <a> and <div>
elements to <button> elements. Also add tabindex attribute in one
case for keyboard accessibility.
Bug: T161612
Change-Id: I37fb862f82099decd59ca7bb0beeb69b24584bb4
As we already allow visual markup in captions, I see no reason to not
whitelist sup and sub. These elements are even allowed in the
displaytitle whitelist for articles, so seems appropriate to have them
for media captions as well.
Bug: T186844
Change-Id: I4339ee85d139301770a4e15650c9dc0d64c136cd
Removing arbitrary close confirmation color treatment with green.
We don't feature such treatment anywhere else, nor are we planning
to do. Let's remove it.
Bug: T50067
Change-Id: Ia597a51cd9c5ca057720c720b1e3
Align SVG markup across Foundation products by:
- unifying XML declaration,
- removing unnecessary `standalone="no"` attribute as it's default,
- removing unnecessary `enable-background` attribute as it got removed
from standard
- removing all SVG editor metadata
- adding `width` and `height` attributes where missing,
- removing all `g` group elements except where necessary for transforms,
- putting attributes on `path`,
- removing unnecessary ids and
- unifying whitespace.
Also
- changing 'expand' and 'gear' icon colors to resemble general button style,
- while at this renaming 'gear_gray' to 'gear' including CSS reference,
- slightly adapt remaining colors to WikimediaUI color palette and
- deleting unused, unreferenced icon files.
Saving up to 79% file size before gzipping.
Bug: T178867
Change-Id: I9e54a3a972903811f5205def05397383f3484d63
Media Viewer tries to detect the file name from the thumbnail name.
That can break for the main image of a file page, which is normally
a preview (ie. a normal thumbnail) but for unhandled types it can
be some asset (such as a PDF icon).
Bug: T137477
Change-Id: Ie6b23d7ef213087971b320460129910f2efd248e
Adds setWarning(<element>,...) and clearWarning() to mw.mmv.ui.Dialog.
These functions can be used to display a warning ribbon with the given
text in the reuse dialogs, typically when the copyright status of the
file is problematic (e.g. non-free or tagged with {{wrong licence}}).
Bug: T76030
Bug: T71389
Bug: T71557
Change-Id: I7c477c810d391578ec64635357eda97a85ab2954
This is an old library that is broken in Chrome 61.
Rather than updating it we can just use $(window).scrollTop/Left
which works in all the browsers we currently support.
Fix MPSP.toggle to return a promise, instead of a deferred
(although this return value is not used yet).
Bug: T173618
Change-Id: Iaec56debbb808bd95cf65c1ebfe22bdf0116da68
Opera 12.10 supported unprefixed animations, gradients, transforms &
transitions. See http://www.opera.com/docs/changelogs/unified/1210/
Removing support for Opera 12.0x versions.
Change-Id: Id0e0afef1ab6ebda373d63b9c91c7ee731dafb7b
Depends-on: Ie8edbcd7f85c713ea2156706ea3a3a7b423d8d9d
Meanwhile I also updated a few places where a non-string was
passed to/expected from localStorage - this could’ve led to
inconsistencies because localStorage stringifies everything.
And I also removed CP.canSetMediaViewerEnabledOnClick, which
was no longer used anywhere except for a test case.
Bug: T137777
Change-Id: I21ad4ba15ca751bb03e5e2c523d09a45c0444ccf
This heavily relied on deferreds getting resolved synchroneously,
which (for .then) is no longer the case with jQuery 3.
There's also a difference in how chained .then's get resolved,
and $.when no longer propagates notify().
The changes in here are basically:
* fix use of $.when, manually passing along notify()
* use .then in some places, instead of .done, .fail, .progress
* fix progress bar hiding in setupProgressBar, which assumed sync
* fixed tests, mostly by using fake timers to give async stuff a
chance to execute
Bug: T164473
Change-Id: Ib51ddd8bc6254a477861588fb16f57565353afe1
This heavily relied on deferreds getting resolved synchroneously,
which (for .then) is no longer the case with jQuery 3.
There's also a difference in how chained .then's get resolved.
These tests did not wait for the deferreds to get resolved async,
so that had to change. Worse even: some functionality was tested
by assuming a handler would not be called (= the test in that
handler would not be called), which didn't make the test run,
because we never even waited for it to be called.
The changes in here are basically:
* make mmv.bootstrap.js correctly use .then instead of .done & fail
* let mmw.bootstrap.test.js tests wait for unresolved async promises
* check call counts instead of running tests inside of callbacks
* limit use of fake timer to the 1 test that needs it (it interferes
with async, which otherwise don't get resolved)
Bug: T164473
Change-Id: I3ca4f786890ad1646f71fe336afdb61e5c3b01c7
* Buttons are semantically better.
* Neither <div> nor <button> elements can have the 'alt' attribute
so switching to 'title' instead.
Reverts parts of I6ea62124018b1a0ec5110bb500f690cb2368f102.
Bug: T58471
Change-Id: I991b40d3387f8d6dd7cdad8ccc5cc9660b9f139a
Aligning to WikimediaUI style guide by replacing colors with
standard color palette equivalents, merging close colors
(ex: `#E6E6E6` & `#eee` become `#eaecf0` ) and slightly increase
contrast on a few to meet WCAG 2.0 level AA criteria.
Also:
- following other code bases like MobileFrontend or OOjs UI in
using `border-radius` property instead of obsolete mixin
- removing non-existing browser vendor prefixes in mixins
- removing non-used Less variables
- bringing CSS/Less code closer to coding standards and
- simplifying Less code where applicable
Change-Id: Icb936e14ff613471ea1da6df6341ec1b0543cfaf