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
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
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
This introduces styles for "not available" arrow, and styles for hovered arrow
and "active" (under left mouse button click arrow).
Bug: T135970
Change-Id: If5f7df475eef36dcb6d038297ad97717b8c96f77
This fixes a bug that would show a slider window where neither of
the pointers is visible after selecting the last revision of the current
window with the old revision pointer and then refreshing.
Change-Id: I15402d8ca7b8c783990a32e2d8426871763e20e1
This fixes a problem with not being able to drag a pointer to the newest revision,
and an extension allowing to drag pointers to revision further than there
are revisions visible in the plot.
This stops snapping a pointer to the "stopper" element, and introduces a grid
for a pointers to be moved in. Size of the grid reflects a size of the current
revision plot which prevents moving a pointer out of the plot.
Custom "containment" is added for the "newer" edge as jquery ui's "containment"
does not work for this particular case.
Bug: T135837
Change-Id: Ifc6ae29c6d64d2baf44ef2b8ff96a45ae86b4f5f
This adds labels for user, comment and article size to the revision
tooltip as well as the respective messages needed for the labels.
Bug: T135740
Change-Id: Ia65fb0bbbe3eb2405665d784bad157ea059e2d6e
This fixes a bug which caused the old revision pointer to appear yellow
when being moved on click after the pointers switched places.
Change-Id: Ibfa104e059e847c68667605b60efe5cbb003327f
The pointer weren't pointing exactly at the middle of a revision. It
appears to be off by 4px.
Bug: T135837
Change-Id: I750debb4ed82025dfb5b4ef9f988ff9bbeb36acb
Also adjusted margins and slider to side calculation to prevent
sliders from moving into the arrow bars.
Change-Id: I90078ff86ba8346baa6c9ab01474da871c046033