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
* Removed deprecated testCount, which is no longer supported in this way.
It's only useful when wanting to explicitly expect 0 assertions (normally
considered an error).
* Replaced use of testCount = 0, with assert.expect( 0 ).
Change-Id: I8fe82032d3af2a1ad2ed7febdb90a95d56dd3fc4
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
Having many modules makes the startup module in the head
unnecessarily longer. Things should only be in their own
module if they're going to be loaded on demand on their
own or are a shared dependency of separate modules that
are.
This change brings down the amount of modules declared by
Media Viewer from 53 to 8. The ones that remain are
mostly things loaded on demand.
Bug: T103706
Change-Id: I5b0d29209599285b93217e96def818e641646c73
These two tests fail on my local machine. I am making the two
assertions independent from
a) the order of HTML attributes (the test should not care about
the order, only if the attributes are there or not)
b) the message (both messages are possible and valid, the question
which message should appear is not part of that specific test).
Change-Id: I69b4793d365d3afebb869c787316e4242cb15b25
Added mmv.HtmlUtils.htmlToTextWithTags()
which is similar to htmlToTextWithLinks()
but allows <b> and <i>
Added test for mmv.HtmlUtils.htmlToTextWithTags()
Most text fields now use htmlToTextWithTags()
except Permission field which is not supposed to
have HTML
Bug: T69887
Change-Id: I16833f218e2f64586aa13925356fa2b8b7ec3100
metadataPanel overrides the grow() and shrink() methods in Permission
class instance, so the text is changed also when user clicks the
"view more" link inside the box.
Bug: T71233
Change-Id: I66fe57980c6f469d86e3d52b67d01e06a3a14270
This is complete, but it would be better if the HEAD request
was actually aborted by Varnish when the viewDuration parameter is
present, or if the hit pointed to a script that does that.
Change-Id: I66cafd97427756411e967de1901324af2215e3ae
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1001
Also fixes popup texts which should have been updated in the parent commit
and the panel opening mechanism which did not work when the below-the-fold
description box was display:none-d.
Change-Id: I5fc37429a7dc7a8f1517fa42375cd140d7d11674
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
* when the caption is available, use it as the image title
* otherwise, fall back to description if available
* otherwise, fall back to filename
* if both caption and description are available, show caption as
title and show description below the fold; otherwise don't show anything
below the fold.
Change-Id: I9738ca46620d7cf3b30f6e46790a37966d4b9eaf
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
* move license and terms link from title area to attribution area
* remove some ineffective styling for elements which have already been removed
in earlier changes
Change-Id: I5bd41e337a4c8133bfa27e4c4d03162b2d6e35bb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833
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