jquery.makeCollapsible improvements
authorKrinkle <krinkle@users.mediawiki.org>
Mon, 9 May 2011 17:21:35 +0000 (17:21 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Mon, 9 May 2011 17:21:35 +0000 (17:21 +0000)
commit447670a769d1bac72c38c1cdb7e5c8e4538c2e0d
tree8935c2eb280b5a96206fe880f498dae4cd727f95
parentfcfa72b43af54d2a0b3a6d0a01fa66a2b2097393
jquery.makeCollapsible improvements
* Check for validness of $defaultToggle only needed once (Follow-up r83309 CR)
* The new jQuery sortable plugin caused a minor breakage in other actions bound within table cells. Since, in contrary to the old wikibits script, the entire <th> is clickable and the triangle is a background image. This means anything that is clickable inside the <th> (such as [<a>Collapse</a>] propagates/bubbles up to the <th> and causes the column to be re-sorted. In other words, collapsing a table caused the last column to be sorted, and when expanded again in the opposite order. Fixed by adding event.stopPropagation(); (note, not "return false" as there may be custom events bound to the anchor tag which should be fired as well. We just need to stop propagation not all other event, such as for customToggles).
resources/jquery/jquery.makeCollapsible.js