Commit graph

96 commits

Author SHA1 Message Date
Moriel Schottlender 7b75c1ebf2 Use momentjs to display internationalized timestamps
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
2016-06-03 13:20:35 +00:00
WMDE-Fisch 05ea211e8b Fire event for wikipage.content hook
Bug: T136827
Change-Id: If3e92716c4db71b9aeae3fb624c17174cf909b7d
2016-06-03 11:52:49 +02:00
Jakob 9ec481052a Merge "Add resize cursor to pointers" 2016-06-03 09:14:47 +00:00
WMDE-Fisch 1a7fe36941 Add resize cursor to pointers
Also prevent cursor flickering when dragging.

Bug: T136099
Bug: T136833
Change-Id: Ie04c5ad9669c1e839b34bc8f649cc9264f70b666
2016-06-03 11:12:49 +02:00
WMDE-Fisch 1a8a4312de Move dependencies to extension.json
Also removed unused dependency.

Bug: T135198
Change-Id: I1ee53ec9d7e123bdca84701b9557aeeeade815ff
2016-06-02 18:16:23 +02:00
jenkins-bot 04df38c25f Merge "Use parsed comment instead of custom parsing" 2016-06-02 15:46:02 +00:00
Brian Wolff 39d8d9229a Make files not executable
I know it doesn't matter, but it was kind of bothering me.

Change-Id: Iae9f8b17a3fb5ced362dc2da95e67e20db8af5a5
2016-06-02 13:48:09 +00:00
WMDE-Fisch f8446590cb Use parsed comment instead of custom parsing
Bug: T135740
Change-Id: I49757b5bcf2c47f459538bd4383325882a15336f
2016-06-02 13:47:41 +00:00
Jakob 19c50267e7 Merge "Dont push state to history in cases where not possible" 2016-06-02 12:10:27 +00:00
Jakob 3482b4a968 Merge "Add change size to tooltip" 2016-06-02 12:01:12 +00:00
WMDE-leszek 0956cf51e9 Merge "Do not center tooltip text" 2016-06-02 10:16:29 +00:00
WMDE-Fisch f6854e0bd4 Do not center tooltip text
Bug: T135740
Change-Id: I6c3b825b27736f693260bc3a6447b6328449e0d6
2016-06-02 12:14:01 +02:00
addshore 7d996ec788 Dont push state to history in cases where not possible
This fixes some issues with older versions of IE

Bug: T136714
Change-Id: I20d35e16ff4b31c2f719cc72c80ca7c57d5b528e
2016-06-02 12:02:39 +02:00
WMDE-Fisch da43204662 Add change size to tooltip
Bug: T135740

Change-Id: I50833c5b65c821eb885b261a15de2088cd15da6d
2016-06-01 17:05:09 +02:00
Leszek Manicki c14fa78bc0 Remove unused parameters when creating Pointer objects
Change-Id: I2bc5337d2a48fb5dd6b81d6c95584f79974d7e9f
2016-06-01 16:49:26 +02:00
Leszek Manicki b86194eacb Fix updating revision bar styles when going back/forward in history
This left unchanged in I164538bbaf44d46a4c66659f56e07ec7225d7fa9

Change-Id: Ied950472458a61efbfae5850d070f7047a222879
2016-06-01 16:45:15 +02:00
Leszek Manicki f9d9a4a4b7 When JavaScript disabled do not show RevisionSlider
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
2016-05-31 19:49:08 +00:00
Leszek Manicki 225f48ac52 Do not fail when name of the user performing the revision is not available
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
2016-05-31 19:48:53 +00:00
Leszek Manicki a2774984c4 Make JavaScript code and CSS follow the style guide.
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
2016-05-31 14:57:14 +02:00
jenkins-bot 72e059034a Merge "Fix opacity on load in IE & Edge" 2016-05-31 10:38:56 +00:00
addshore e0aa879b99 Fix opacity on load in IE & Edge
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
2016-05-30 12:24:42 +01:00
jenkins-bot 768df0fa7e Merge "Adjust arrow styles" 2016-05-30 10:51:27 +00:00
Leszek Manicki f642fb44dc Adjust arrow styles
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
2016-05-30 11:54:24 +02:00
Jakob Warkotsch 49dea1cf68 Show correct slider window after refresh when the last revision is selected.
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
2016-05-27 16:10:59 +02:00
Leszek Manicki b0466a9615 Fix pointer pointer dragging to edge revisions
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
2016-05-27 15:37:05 +02:00
WMDE-leszek dc3e840f72 Merge "Set correct pointer color on click." 2016-05-26 15:25:18 +00:00
WMDE-leszek 1aaad847f1 Merge "Show a pointer cursor on revision wrappers." 2016-05-26 15:19:32 +00:00
Jakob Warkotsch d4dd4c3576 Add labels to revision tooltips.
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
2016-05-26 17:10:29 +02:00
WMDE-leszek 7f46eb45fc Merge "Make pointer offset depend on whether pointer is the upper pointer." 2016-05-26 15:00:49 +00:00
Jakob Warkotsch eb21b1a623 Set correct pointer color on click.
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
2016-05-26 16:54:56 +02:00
Jakob Warkotsch 910039cd6e Show a pointer cursor on revision wrappers.
Bug: T134993
Change-Id: I3412e03aba726fde6194b3cac88765655e69b8aa
2016-05-26 16:12:35 +02:00
Leszek Manicki 321659c70f Remove "legend" annotations and move scrolling button hint to a tooltip
This also removes a "diff size" axis legend.

Bug: T136098
Change-Id: I9705d6ab37c8d24b9bdb1fddaa895b2863e98043
2016-05-26 15:19:18 +02:00
Jakob Warkotsch f5d9347d93 Make pointer offset depend on whether pointer is the upper pointer.
Bug: T135837
Change-Id: I0ccc34751765f1f98dd29426d4efb3f3419f3932
2016-05-26 12:30:12 +02:00
WMDE-leszek 9b008b502d Merge "Fix bug that caused the most recent revision to never be visible." 2016-05-26 09:05:16 +00:00
Jakob Warkotsch 90ef5dbb23 Fix bug that caused the most recent revision to never be visible.
Bug: T135739
Change-Id: I00e30a585b3a38da7e405f200356163b20358df9
2016-05-26 10:56:25 +02:00
Jakob Warkotsch e3c9502686 Enable moving of the pointers by clicking on the revisions.
Bug: T134993
Change-Id: I6b467d8b89bdccc2d6e01fbd94ac5890a07d20b4
2016-05-24 13:45:30 +02:00
jenkins-bot 6de7022a8d Merge "Add annotation labels to the slider" 2016-05-22 11:30:34 +00:00
jenkins-bot 154649d2d9 Merge "Mark selected and intermediate revisions with colours" 2016-05-22 11:27:07 +00:00
WMDE-Fisch e126efa953 Add annotation labels to the slider
Bug: T133270
Change-Id: Ibfc16196d35305a56c63d6c23a174712442f31a8
2016-05-22 12:26:41 +01:00
jenkins-bot 91194c3c88 Merge "Fix pointer alignment." 2016-05-22 11:25:45 +00:00
jenkins-bot 6096164380 Merge "Internationalize the tooltip pieces" 2016-05-22 11:25:37 +00:00
Moriel Schottlender 2440c52bc0 Internationalize the tooltip pieces
Make sure that username and comment fields are bidi-isolated and
add an i18n message to "bytes".

Change-Id: I6a27cd7fdebf775dd86ccfc6084505aad4e931d2
2016-05-20 16:40:26 +02:00
Jakob Warkotsch 9ae092c4fe Fix pointer alignment.
The pointer weren't pointing exactly at the middle of a revision. It
appears to be off by 4px.

Bug: T135837
Change-Id: I750debb4ed82025dfb5b4ef9f988ff9bbeb36acb
2016-05-20 15:44:28 +02:00
jenkins-bot 2f93a591d2 Merge "Do not restrict width of the tooltip" 2016-05-20 10:43:51 +00:00
jenkins-bot a206b47670 Merge "Add navigation arrow bars" 2016-05-20 10:02:43 +00:00
WMDE-Fisch 43b3c36336 Add navigation arrow bars
Also adjusted margins and slider to side calculation to prevent
sliders from moving into the arrow bars.

Change-Id: I90078ff86ba8346baa6c9ab01474da871c046033
2016-05-20 09:44:36 +02:00
Leszek Manicki f2f29832e5 Mark selected and intermediate revisions with colours
Change-Id: If8e2268540a9e5f8110256e779cbee92c6a413ca
2016-05-19 18:39:58 +02:00
Leszek Manicki b0963da338 Do not restrict width of the tooltip
Longer edit summaries were squashed into 200-pixel-wide box.

Bug: T135742
Change-Id: Ic73c44df7d73b18d14f7eb10ee761f465276e72e
2016-05-19 17:16:10 +02:00
jenkins-bot b2c1de07b8 Merge "Adjust pointer size and make them drop shadow" 2016-05-19 13:22:29 +00:00
Jakob Warkotsch cf12a390f6 Resume slider scroll position after refresh.
This fixes a bug that caused the slider to always show the first "page"
after a refresh even if a different page was selected before the
refresh.

Change-Id: Ic5defd28f699617be6cf2ae5827e90f294d616b5
2016-05-19 15:03:38 +02:00