Go to file
Moriel Schottlender abfcd2c01b RTLize RevisionSlider's behavior
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
2016-06-08 13:26:43 +00:00
i18n Localisation updates from https://translatewiki.net. 2016-06-07 22:45:51 +02:00
modules RTLize RevisionSlider's behavior 2016-06-08 13:26:43 +00:00
resources Adjust arrow styles 2016-05-30 11:54:24 +02:00
tests Use momentjs to display internationalized timestamps 2016-06-03 13:20:35 +00:00
.csslintrc Add csslint for CSS codestyle checks 2016-05-19 13:10:57 +02:00
.gitignore Initial commit. 2016-04-19 16:35:37 +02:00
.gitreview Add .gitreview 2016-04-18 13:54:12 +02:00
.jscsrc Make files not executable 2016-06-02 13:48:09 +00:00
.jshintignore Make files not executable 2016-06-02 13:48:09 +00:00
.jshintrc Make files not executable 2016-06-02 13:48:09 +00:00
composer.json Make files not executable 2016-06-02 13:48:09 +00:00
extension.json Merge "Use a gender-neutral label for user." 2016-06-07 08:54:13 +00:00
Gruntfile.js Make files not executable 2016-06-02 13:48:09 +00:00
package.json Make files not executable 2016-06-02 13:48:09 +00:00
phpcs.xml Initial commit. 2016-04-19 16:35:37 +02:00
README.md Add Readme with install and test instructions. 2016-05-11 17:44:35 +02:00
RevisionSlider.hooks.php Use ->text() to get message content 2016-06-02 18:01:57 +02:00

RevisionSlider extension

This MediaWiki extension shows a slider allowing selecting and comparing of revisions on a diff page

Installation

Check out this extension into the extensions folder of your MediaWiki installation and add the following line to your LocalSettings.php:

wfLoadExtension( 'RevisionSlider' );

Tests

Before executing tests run tho following in the root directory of the extension once:

composer install
npm install

For the tests run:

composer test
node_modules/.bin/grunt test

QUnit Tests

See https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing#Run_the_tests