Allow more customization on the default toggle system
authorMoritz Oberhauser <moritz.oberhauser@gmail.com>
Thu, 6 Apr 2017 10:43:18 +0000 (12:43 +0200)
committerMoritz Oberhauser <moritz.oberhauser@gmail.com>
Sat, 20 May 2017 13:27:53 +0000 (15:27 +0200)
commit2d95d36a8ed296813e686e9b756c2bb7c306950f
tree3b52fe813fea8c2aa0595df618aedafc31b59600
parentf375de9a3e1f49d4edcb80508a40219afed11414
Allow more customization on the default toggle system

The naming convention remains unchainched. Default toggles are added if no mw-collapsible-toggle child element is present. Premade toggles have already one ore more mw-collapsible-toggle elements defined.

Default and premade toggles (mw-collapsible-toggle) still cannot be mixed/combined with remote toggles (mw-customtoggle).

* The default toggle got less rigid by removing dependency on <a> elements.
* Support for multiple premade toggles was introduced.
* The expand/collapse messages can be used by premade toggles via mw-collapsible-text.
* Removed the linksPassthru option. This step allowed merging premadeToggleHandler into actionHandler.
* The pass through functionality is now applied to all <a> elements since the default toggle does no longer depends on those.
* Removed mw-collapsible-bracket because it was not used and is deprecated by mw-collapsible-text.
* The test suite was adapted to reflect the latest changes.

Change-Id: Ic8627c4c185e8e4175e6fef1c8e1c2190e54edaa
resources/src/jquery/jquery.makeCollapsible.js
tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js