- slide show dialog using OOJS UI
- setting a user option to only show it once
- translatable content
- images of the slides
Bug: T136830
Change-Id: Ia820aecb20aa6b239f1a64dd328683639baf399e
Allow RevisionSlider to work properly in both LTR and RTL contexts
by making sure that when the interface language is RTL, the entire
interface flips. "Backwards" and "Forwards" are reversed in RTL
context, and the code and behavior should respond to that.
Changes made:
* Make sure the container has a direction set
* Change the placement of the revision divs from absolute
positioning (that requires re-calculations when the page
is flipped to RTL) to divs that are display: inline-block
and have no right/left setting. This means that the DOM
will automatically flip its own visual order when the
container is set to RTL.
* Flip the calculation of positioning and the calculation
of which element the pointer is on when it is dragged
if the document is RTL.
* Mirror all scroll animations when the page is in RTL.
* Rename the scroll buttons to 'backwards' and 'forwards'
for clarity, as they are flipped when the interface is
RTL.
* Rename pointers to 'older' and 'newer' instead of
trusting their order in the DOM.
Bug: T136277
Change-Id: I7c903c2e9d8ee2a0ef2eeb7b99f2251f230a794e
MediaWiki uses the momentJS module to display standard timestamps;
this means you can avoid calculating the user offset, but also, it
means that all timestamps are internationalized and translated, and
use the standard view that MW uses in its interfaces.
We can store the user's offset in a RevisionSlider variable so we can
refer to it in timestamp construction, as well as manipulate it in
tests without touching any global user options that may affect other
tests.
Bug: T136825
Change-Id: I67d9859b8f33ab8a217128822e246e7ab67f6511
Although this was removed in I1c66fa4a9fa6e90f8318de3a4f656d629000d9ca together with
the en message, it got added again in I7c658b32e1a14ec3dfbb9158adb03ce17205682a by the
L10n-bot.
Change-Id: I0829e991fae7731fe60757c2a655c519a297443f
As suggested in a comment in T135198, do not show anything above the
diff when JavaScript disabled instead of always putting a message
there.
Change-Id: I1c66fa4a9fa6e90f8318de3a4f656d629000d9ca
For example when user name is not visible due to RevisionDelete the script
crashed. This makes it check if there is a user name defined and not try
to show it if there is none.
Bug: T135198
Change-Id: I43ce0e49e13ad6262cc60fd938c486ea3e328e64
Changes include:
- not passing in HTML attributes when creating tag elements,
- creating HTML elements instead of appending hand-crafted HTML,
- single append() calls instead of multiple consecutie appends,
- not using raw HTML messages when not needed,
- prefixing all CSS classes and IDs with "mw-" to avoid potential
name conflicts.
Change-Id: I164538bbaf44d46a4c66659f56e07ec7225d7fa9
Current rendering test passes but not really because test results meet
expectations but rather by accident.
Test revisions lacked ids, and current way of rendering revision made
all revision bars have id equal to "undefined" string. That made test
pass, although it is not what is expected (we expect three revisions
in tests but not that three revisions have the same id, and each of them
gets a pointer assigned to - the might look interesting in the browser,
though). Also the test will fail as soon as the way of rendering
revisions is switched to standard use of jquery's attr() instead of
handcrafting the HTML in the RevisionListView class.
This patch adds missing IDs to test Revisions where needed, and also
set config vars that are required to render Slider properly.
This also adds tests for cases where the exception is thrown.
This also makes RevisionList initialization consistent. RevisionList
expect to receive an array of revision data in a format that API
returns. Tests provided arrays of Revision objects instead. That
also works with a difference that API-like format uses "revid" as a field
containing revision ID, while Revision objects use a field named "id".
The way RevisionList was used in tests actually lead to have each
revision initialized twice, and on the second initialization it lost
its ID (due to field name difference). This changes test to provide
a API-like array instead of arrays of Revision objects to RevisionList.
Change-Id: I147270f28381038d05f8bcfd2317e8c269b2e458
Divs can not be directly inside <table>
elements, and apparently IE11 and Edge will thus
put these elements somewhere else / throw them away
/ do different things to other browsers.
Thus add the div to a row!
Bug: T134983
Change-Id: I1ad38298fc0d4ec7e6f45cb77ac0100900df9bd1