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
Initialization tests for both classes were checking
if the rendered view or the view related to the pointer
contained an element with particular CSS class.
The structure of the view has apparently changed as it
no longer contains an element with a particular class
but the view's DIV itself get the CSS class.
Assertion in tests has been wrong and did not catch the
change (in particular, apparently jQuery's find returned
an empty object which does not evaluate to false in qunit assertion).
This changes initialization tests to check the CSS class of the view element.
It also reflects the removal of left/right pointer distinction made in
I9d56314ea4cf46402df56e0a038bfb965521896.
This also rename both test modules as they had misleading names.
Change-Id: I5956022af332c9915e983a020732edbe1dd75aef
As the pointers can switch side the idea
of having a left and right one will just lead
to confusion, so lets kill that idea now! :D
Change-Id: I9d56314ea4cf46402df56e0a038bfb9655218960
This creates a module for the draggable pointers for the RevisionSlider
mainly to encapsulate both the pointers' state and their HTML code.
Some animation methods such as slideToSide and slideToPosition
that are still flying around in init.js weren't added to the
module since I thought they should be part of the not yet existing
Slider module.
Change-Id: I1292bfb0bbd68f8d2de04b3b5e5f3133ec6363b8