This function was not returning a jqXHR for a long time. It's usually
a mw.Api promise, but might be something else.
Change-Id: I59975cc9dfbea70e5ae666fcc9915f10bd199e4d
When calculating whether to show the 'read more' button on fields
that are configured 'descriptions', use a threshold to check if
the height is enough to be shown.
Bug: T87265
Change-Id: I0601e4fa92cb58903641a146500cf560bc029425
For the masonry view, the result widget resizes itself according to
the rows and other images in the row. Up until now the resize was
a bit buggy, occasionally missing height/width values. This is
mostly due to rounding errors, but also due to a small double
calculation that is now fixed with this code.
Change-Id: If18adc5280e4bdbb9174b7c7e6e4eadf3c1ab26d
Generalize MWResourceQueue and MWResourceProvider so they are
extending the general classes from ve-core. This also allows for
tests in ve-core on the resource queue system.
* Depends on ve-core change I5346081317e *
Change-Id: If34cd99334f4ccb93015c3646f68ae3040b9c5d7
In beta labs some local files displayed their links without http://
make sure they all are normalized to have the prefix.
Change-Id: Ia19de9b31e234138603495f06750d202654a8788
Mouseover and click events in the category widget should also call
their parent method.
Depends on the ooui change Ie576f4422
Change-Id: I73b574b28a5a60e4f046f3008407dbf4b1323b58
Change the media search widget to work with resource queues and
providers. Create providers based on the user's filerepo settings
and aggregate their responses with the media queue. Stop asking
for more results from providers that are depleted.
Also fixes a rather nasty infinite-loop bug where the API returns
only very few images, and the UI keeps asking for more.
Bug: T78161
Bug: T88764
Change-Id: I65aed3446cd1f056476c56e6e04522c70e49e595
It conflicts with the #toggle method. This happened to work because we
never called .toggle() here, but 8a53b2cd introduced such a call.
Follow-up to 8a53b2cd.
Bug: T88831
Change-Id: I4dd955d015d2bda50e4146b0ae2ddff557dcd346
Replace instances of .show() and .hide() with ooui 'hidden' class
to make performance better.
Related ooui change: Ibf7c99aa4aad
Bug: T87420
Bug: T88736
Change-Id: I3af8a322e88b7ba3364f350819d6dbcdc8b13270
Increase the timeOut for the typing delay so we send search API
requests less frequently when the user types a search term.
Bug: T88188
Change-Id: Ibaf7184fb0eb9a02b460b0a66eabade791aea620
Use a queue for the method that lays out the result images in
the rows; this queue will only run if the widget is visible,
to make sure that the calculations of the masonry view work
as they should.
In better words: Only cue the queue if the widget is visible.
Bug: T86802
Change-Id: Ia8a30a6a5cccd98a1201443d672e4a6ab4aa946f
* Set the src attribute only when the image is actually
visible in the search results.
* Display the thumbnail image we have from the search
results and then update with a larger one from the API.
* Request for more media results on a higher threshhold,
when the user views 2 rows above the last available
result.
* Correct the resizeToBoundingBox and simplify it to work
properly for a non-square bounding box regardless of
constraints.
Change-Id: If024b0335ce6a5d2d0eafdbfdfe1030dcaac3a75
Add an info panel to the MediaDialog to show the user information
about the chosen file from the new extmetadata API.
Also, change the way results are viewed:
* Present the search results with their proper ratio.
* Use masonry fit for the search results.
* Change the resizeToBoundingBox method in ve.dm.MWImageNode to accept
a specific side constraint, either 'width' or 'height'. This is also
going to be useful for adding and calculating 'scale' considerations
that affects the image height.
* Add info panel with details from extmetadata including author, license,
date of upload and creation, etc.
* Get descriptions and data according to wiki language.
Bug: T78161
Bug: T74061
Change-Id: I7b4d019825aa89dd178665bd9492a07af15954ac
Also moved around some code from MWCategoryInputWidget to
MWCategoryWidget to be a bit less evilly interdependent.
Change-Id: I0b8a58fb669e232a990b19c4b7f872a320bfab58
Having MWCategoryInputWidget inherit from ButonWidget makes things a lot easier.
The mousedown behaviour and the positioning of the popup need work but
that is unrelated to this patch.
Bug: T78039
Change-Id: Ic43e64a6a74b8679a15aa8031207ab722e061ab4
Follows-up b0e8900, 447e8de, d3f26e65.
Contrary to binding a reference, this-overiddes for inline
functions gets messy and fragile. There's also a minor
performance overhead that can be avoided. No separation of
concerns, eiter, as the object is held by the closure.
Also:
* Remove left-over instances of @method.
* Remove redundant '0' argument to setTimeout.
* Use null instead of $ for apply() on static methods like $.when.
* Use .empty().append() instead of .html(). Does the same but
without additional overhead and without confusion association
with "html" which isn't used (it doesn't serialise and re-parse
or clone, it just appends when given one or more nodes).
Change-Id: I797a3667c67d52568150be9be5d043d149f22077
Make the image results align to the full width of the dialog. This
fix uses dynamic values of the width of the container rather than
a hard-coded value so it should work properly on all themes.
Bug: T78050
Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016
Aside from the confusion and differences between substr() and
substring() and IE8 bugs with substr(), substr() was removed from
the spec as of ECMAScript 5. It's been standardised in the
optional Annex B section of ES5.
Change-Id: I221ef6ae6956ce20dd9bb74510500f747d04c3b1
New changes:
5e60f12 Ensure clipboard key is removed from paste target
32397d8 Update OOjs UI to v0.4.0
Local changes to compensate for new OOUI version, and updated wfUseMW call.
Change-Id: I005f7b23a36e04f1305d4aa037c19a5c7db9a699
canonicalQueryValue can be null at this point, so let's not insert it
into an array that contains strings.
Bug: T76868
Change-Id: I8096a9c1017e883d28124bf807d2d375ae98452a
To do things like strip off invalid invisible characters from the end of names.
(see bug)
Also rename that function because it covers more than just hidden status now
Bug: T74080
Change-Id: I8374695a991c4d3e397992ad9277b99d9288eec4
New changes:
ff237d4 Fix z-indexes in core
e88d43e Localisation updates from https://translatewiki.net.
cf61803 Consistently use ve.ui.WindowManager everywhere
f9dfdb8 Update OOjs UI to v0.1.0-pre (23565e7519)
f79f7e3 Update OOjs UI to v0.1.0-pre (8f8896196f)
c8201dd Update OOjs UI to v0.1.0-pre (9ed4cf2557)
Local changes for the breaking change to OptionWidget and sub-classes.
Change-Id: Ife6abd312d4dc97be67cb84eea4cb9c6a0a31b1d